From 09f51fb24fc199ae25a7e1453077ac329063660b Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 2 Oct 2022 18:26:57 -0500 Subject: [PATCH 01/38] remove ts-proto dependencies and add telescope --- bin/protoc-gen-ts_proto_yarn_2 | 2 - package-lock.json | 9160 +++++++++++++++++++++++++++++++- package.json | 2 +- scripts/codegen-cosmos-sdk.sh | 87 - scripts/codegen.js | 37 + scripts/codegen.sh | 109 - 6 files changed, 8941 insertions(+), 456 deletions(-) delete mode 100755 bin/protoc-gen-ts_proto_yarn_2 delete mode 100755 scripts/codegen-cosmos-sdk.sh create mode 100755 scripts/codegen.js delete mode 100755 scripts/codegen.sh diff --git a/bin/protoc-gen-ts_proto_yarn_2 b/bin/protoc-gen-ts_proto_yarn_2 deleted file mode 100755 index 977d9bd3..00000000 --- a/bin/protoc-gen-ts_proto_yarn_2 +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('ts-proto/build/plugin') diff --git a/package-lock.json b/package-lock.json index b2eb44b1..4f653850 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,145 +13,8468 @@ "protobufjs": "~6.11.2" }, "devDependencies": { + "@osmonauts/telescope": "^0.36.2", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", - "ts-proto": "^1.126.1", "typescript": "~4.7" } }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", + "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.13", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-module-transforms": "^7.18.9", + "@babel/helpers": "^7.18.9", + "@babel/parser": "^7.18.13", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.18.13", + "@babel/types": "^7.18.13", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", + "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.13", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers/node_modules/@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers/node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", + "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function/node_modules/@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function/node_modules/@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function/node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.1.tgz", + "integrity": "sha512-0yu8vNATgLy4ivqMNBIwb1HebCelqN7YX8SL3FDXORv/RqT0zEEWUCH4GH44JsSrvCu6GqnAdR5EBFAPeNBB4Q==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-default-from": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.10.tgz", + "integrity": "sha512-5H2N3R2aQFxkV4PIBUR/i7PUSwgTZjouJKzI8eKswfIjT0PhvzkPn0t0wIS5zn6maQuvtT0t1oHtMUz61LOuow==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-default-from": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", + "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.18.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-default-from": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.18.6.tgz", + "integrity": "sha512-Kr//z3ujSVNx6E9z9ih5xXXMqK07VVTuqPmqGe6Mss/zW5XPeLZeSDZoP9ab/hT4wPKqAgjl2PnhPrcpk8Seew==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", + "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", + "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", + "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.10.tgz", + "integrity": "sha512-q5mMeYAdfEbpBAgzl7tBre/la3LeCxmDO1+wMXRdPWbcoMjR3GiXlCLk7JBZVVye0bqTGNMbt0yYVXX1B1jEWQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.9", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz", + "integrity": "sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/plugin-syntax-typescript": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", + "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.18.10", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@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-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.18.9", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.9", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.18.9", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.18.9", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.18.10", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "dependencies": { + "@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" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz", + "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", + "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.13", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.13", + "@babel/types": "^7.18.13", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", + "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cosmwasm/ts-codegen": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@cosmwasm/ts-codegen/-/ts-codegen-0.17.0.tgz", + "integrity": "sha512-kmeCaNjLXn/ogaRxxcY9BCu2LKsHdpitp7SgM4Pizt13aqDBruLXU3yKU2XmldNB6NjmaYzSwToCs2PmHIxzBA==", + "dev": true, + "dependencies": { + "@babel/core": "7.18.10", + "@babel/generator": "7.18.12", + "@babel/parser": "7.18.11", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-proposal-export-default-from": "7.18.10", + "@babel/plugin-proposal-object-rest-spread": "7.18.9", + "@babel/plugin-transform-runtime": "7.18.10", + "@babel/preset-env": "7.18.10", + "@babel/preset-typescript": "^7.18.6", + "@babel/runtime": "^7.18.9", + "@babel/traverse": "7.18.11", + "@babel/types": "7.18.10", + "@pyramation/json-schema-to-typescript": " 11.0.4", + "case": "1.6.3", + "dargs": "7.0.0", + "deepmerge": "4.2.2", + "dotty": "0.1.2", + "fuzzy": "0.1.3", + "glob": "8.0.3", + "inquirerer": "0.1.3", + "long": "^5.2.0", + "minimist": "1.2.6", + "mkdirp": "1.0.4", + "parse-package-name": "1.0.0", + "rimraf": "3.0.2", + "shelljs": "0.8.5", + "wasm-ast-types": "^0.11.3" + }, + "bin": { + "cosmwasm-ts-codegen": "main/ts-codegen.js" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@babel/core": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", + "integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.10", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-module-transforms": "^7.18.9", + "@babel/helpers": "^7.18.9", + "@babel/parser": "^7.18.10", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.18.10", + "@babel/types": "^7.18.10", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@babel/generator": { + "version": "7.18.12", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz", + "integrity": "sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.10", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@babel/parser": { + "version": "7.18.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz", + "integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@babel/traverse": { + "version": "7.18.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz", + "integrity": "sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.10", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.11", + "@babel/types": "^7.18.10", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@babel/types": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", + "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@cosmwasm/ts-codegen/node_modules/long": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/transform/node_modules/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/transform/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/transform/node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/transform/node_modules/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 + }, + "node_modules/@jest/transform/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/transform/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/types/node_modules/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/types/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/types/node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/types/node_modules/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 + }, + "node_modules/@jest/types/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/types/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "node_modules/@osmonauts/ast": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.0.tgz", + "integrity": "sha512-ybcuClvO4Tym9Dymy79yQzQtgFzUGo/IZ5hOF3Q1bbQ8qeol+uMxhs8GhZfmqQpVzw/WOyjVazEPrzohiL/bYg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.9", + "@babel/types": "7.18.13", + "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/types": "^0.15.1", + "@osmonauts/utils": "^0.4.0", + "case": "1.6.3", + "dotty": "0.1.2" + } + }, + "node_modules/@osmonauts/proto-parser": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.1.tgz", + "integrity": "sha512-xFY2ad0T2hSRinRy+oDNaDs3sA5yWukijFOMzuhb68h64F5cWtc6+FsPTZ7k0fY3lCCwbJS6NRH/rNuVlRQk9g==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.9", + "@osmonauts/types": "^0.15.1", + "@pyramation/protobufjs": "6.11.4", + "dotty": "0.1.2", + "glob": "8.0.3", + "mkdirp": "1.0.4" + } + }, + "node_modules/@osmonauts/telescope": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.2.tgz", + "integrity": "sha512-QkrwZ/Y3u6TjPv4hZ9FW+kopOq449eig0Ny6El/KKO8v5T7QqL3Q4d+lQYgbkT6urUiApv+3xUc38kwV9rPfZQ==", + "dev": true, + "dependencies": { + "@babel/core": "7.18.13", + "@babel/generator": "7.18.13", + "@babel/parser": "^7.18.13", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-proposal-export-default-from": "7.18.10", + "@babel/plugin-proposal-object-rest-spread": "7.18.9", + "@babel/plugin-transform-runtime": "7.18.10", + "@babel/preset-env": "7.18.10", + "@babel/preset-typescript": "^7.17.12", + "@babel/runtime": "^7.18.9", + "@babel/traverse": "7.18.13", + "@babel/types": "7.18.13", + "@cosmwasm/ts-codegen": "0.17.0", + "@osmonauts/ast": "^0.31.0", + "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/types": "^0.15.1", + "@osmonauts/utils": "^0.4.0", + "@types/parse-package-name": "0.1.0", + "case": "1.6.3", + "dargs": "7.0.0", + "deepmerge": "4.2.2", + "dotty": "0.1.2", + "fuzzy": "0.1.3", + "glob": "8.0.3", + "inquirerer": "0.1.3", + "long": "^5.2.0", + "minimatch": "5.1.0", + "minimist": "1.2.6", + "mkdirp": "1.0.4", + "parse-package-name": "1.0.0", + "rimraf": "3.0.2", + "shelljs": "0.8.5" + }, + "bin": { + "telescope": "main/telescope.js" + } + }, + "node_modules/@osmonauts/telescope/node_modules/long": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==", + "dev": true + }, + "node_modules/@osmonauts/types": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.1.tgz", + "integrity": "sha512-ZW0YWGT310SQ2V3w5rSRNNF6O6W7mm0fAkJUP+M0UzsQp1+KDT6nV+/E52Z6arPvN+mQGvWii1YmlQpTIIsTJw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.9", + "@osmonauts/utils": "^0.4.0", + "case": "1.6.3" + } + }, + "node_modules/@osmonauts/utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.4.0.tgz", + "integrity": "sha512-+4ThyiTxyiQiC+lK3aji1zXYnSmHy3DxvMYInEPFwHRWbsvixbq99TGP8jxhhBovtGsnSzPCE/296iuVGEA4MQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.9" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@pyramation/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@pyramation/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-L5kToHAEc1Q87R8ZwWFaNa4tPHr8Hnm+U+DRdUVq3tUtk+EX4pCqSd34Z6EMxNi/bjTzt1syAG9J2Oo1YFlqSg==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@pyramation/json-schema-to-typescript": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@pyramation/json-schema-to-typescript/-/json-schema-to-typescript-11.0.4.tgz", + "integrity": "sha512-+aSzXDLhMHOEdV2cJ7Tjg/9YenjHU5BCmClVygzwxJZ1R16NOfEn7lTAwVzb/2jivOSnhjHzMJbnSf8b6rd1zg==", + "dev": true, + "dependencies": { + "@pyramation/json-schema-ref-parser": "9.0.6", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.6.2" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@pyramation/json-schema-to-typescript/node_modules/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, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@pyramation/json-schema-to-typescript/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@pyramation/json-schema-to-typescript/node_modules/glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dev": true, + "dependencies": { + "@types/glob": "^7.1.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/ahmadnassri" + }, + "peerDependencies": { + "glob": "^7.1.6" + } + }, + "node_modules/@pyramation/json-schema-to-typescript/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@pyramation/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-SvWDkDSo3XOBCzLtjC36QYZOoeCw3/HGAi8wuVj6aM3HrFp6lKgYtxsQ0QymbnagDD582k/roGg3CcXfxeM2Hg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@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" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.24.44", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.44.tgz", + "integrity": "sha512-ka0W0KN5i6LfrSocduwliMMpqVgohtPFidKdMEOUjoOFCHcOOYkKsPRxfs5f15oPNHTm6ERAm0GV/+/LTKeiWg==", + "dev": true + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/lodash": { + "version": "4.14.186", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz", + "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==", + "dev": true + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "15.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", + "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + }, + "node_modules/@types/parse-package-name": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@types/parse-package-name/-/parse-package-name-0.1.0.tgz", + "integrity": "sha512-+vF4M3Cd3Ec22Uwb+OKhDrSAcXQ5I6evRx+1letx4KzfzycU+AOEDHnCifus8In11i8iYNFXPfzg9HWTcC1h+Q==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/ast-stringify": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ast-stringify/-/ast-stringify-0.1.0.tgz", + "integrity": "sha512-J1PgFYV3RG6r37+M6ySZJH406hR82okwGvFM9hLXpOvdx4WC4GEW8/qiw6pi1hKTrqcRvoHP8a7mp87egYr6iA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.11.2" + } + }, + "node_modules/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, + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", + "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.2", + "core-js-compat": "^3.21.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "dev": true + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001414", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001414.tgz", + "integrity": "sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/case": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/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, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/ci-info": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", + "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", + "dev": true + }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dev": true, + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/core-js-compat": { + "version": "3.25.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.4.tgz", + "integrity": "sha512-gCEcIEEqCR6230WroNunK/653CWKhqyCKJ9b+uESqOt/WFJA8B4lTnnQFdpYY5vmBcwJAA90Bo5vXs+CVsf6iA==", + "dev": true, + "dependencies": { + "browserslist": "^4.21.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dotty": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dotty/-/dotty-0.1.2.tgz", + "integrity": "sha512-V0EWmKeH3DEhMwAZ+8ZB2Ao4OK6p++Z0hsDtZq3N0+0ZMVqkzrcEGROvOnZpLnvBg5PTNG23JEDLAm64gPaotQ==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.270", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", + "integrity": "sha512-KNhIzgLiJmDDC444dj9vEOpZEgsV96ult9Iff98Vanumn+ShJHd5se8aX6KeVxdc0YQeqdrezBZv89rleDbvSg==", + "dev": true + }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/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, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/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 + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/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, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/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, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/fuzzy": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fuzzy/-/fuzzy-0.1.3.tgz", + "integrity": "sha512-/gZffu4ykarLrCiP3Ygsa86UAo1E5vEVlvTrpkKywXSbP9Xhln3oSp9QSV57gEq3JFFpGJ4GZ+5zdEp3FcUh4w==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/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, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/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, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/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, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/inquirer-autocomplete-prompt": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-0.11.1.tgz", + "integrity": "sha512-VM4eNiyRD4CeUc2cyKni+F8qgHwL9WC4LdOr+mEC85qP/QNsDV+ysVqUrJYhw1TmDQu1QVhc8hbaL7wfk8SJxw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^2.0.0", + "chalk": "^1.1.3", + "figures": "^2.0.0", + "inquirer": "3.1.1", + "lodash": "^4.17.4", + "run-async": "^2.3.0", + "util": "^0.10.3" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/ansi-escapes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", + "integrity": "sha512-tH/fSoQp4DrEodDK3QpdiWiZTSe7sBJ9eOqcQBZ0o9HTM+5M/viSEn+sPMoTuPjQQ8n++w3QJoPEjt8LVPcrCg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "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" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==", + "dev": true + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "dependencies": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/inquirer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.1.1.tgz", + "integrity": "sha512-H50sHQwgvvaTBd3HpKMVtL/u6LoHDvYym51gd7bGQe/+9HkCE+J0/3N5FJLfd6O6oz44hHewC2Pc2LodzWVafQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.0.0", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inquirer-autocomplete-prompt/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/inquirerer": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/inquirerer/-/inquirerer-0.1.3.tgz", + "integrity": "sha512-yGgLUOqPxTsINBjZNZeLi3cv2zgxXtw9feaAOSJf2j6AqIT5Uxs5ZOqOrfAf+xP65Sicla1FD3iDxa3D6TsCAQ==", + "dev": true, + "dependencies": { + "colors": "^1.1.2", + "inquirer": "^6.0.0", + "inquirer-autocomplete-prompt": "^0.11.1" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-haste-map": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-util/node_modules/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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-util/node_modules/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, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-util/node_modules/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 + }, + "node_modules/jest-util/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-util/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-worker/node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/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 + }, + "node_modules/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, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/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 + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/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, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", + "dev": true + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "node_modules/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, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/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, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/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, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-package-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-package-name/-/parse-package-name-1.0.0.tgz", + "integrity": "sha512-kBeTUtcj+SkyfaW4+KBe0HtsloBJ/mKTPoxpVdA57GZiPerREsUWJOhVj9anXweFiJkm5y8FG1sxFZkZ0SN6wg==", + "dev": true + }, + "node_modules/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "hasInstallScript": true, + "dependencies": { + "@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" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/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 + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.1.tgz", + "integrity": "sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dev": true, + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/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, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha512-Cun9QucwK6MIrp3mry/Y7hqD1oFqTYLQ4pGxaHTjIdaFDWRGGLikqp6u8LcWJnzpoALg9hap+JGk8sFIUuEGNA==", + "dev": true + }, + "node_modules/rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha512-3xPNZGW93oCjiO7PtKxRK6iOVYBWBvtf9QHDfU23Oc+dLIQmAV//UnyXV/yihv81VS/UqoQPk4NegS8EFi55Hg==", + "dev": true, + "dependencies": { + "rx-lite": "*" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/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 + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/shelljs/node_modules/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, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/shelljs/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/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, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/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, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/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, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/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, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/wasm-ast-types": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/wasm-ast-types/-/wasm-ast-types-0.11.3.tgz", + "integrity": "sha512-rNJNKznUMgt8Bb01xPoyjM13VQmXzDIBG49oV09k4RusRELZu7pQWejBy08lV5BQjcIYKpWkqiUnAZJp73ZmOA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.9", + "@babel/types": "7.18.10", + "@jest/transform": "28.1.3", + "ast-stringify": "0.1.0", + "case": "1.6.3", + "deepmerge": "4.2.2" + } + }, + "node_modules/wasm-ast-types/node_modules/@babel/types": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", + "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "dev": true + }, + "@babel/core": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", + "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.13", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-module-transforms": "^7.18.9", + "@babel/helpers": "^7.18.9", + "@babel/parser": "^7.18.13", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.18.13", + "@babel/types": "^7.18.13", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", + "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "dev": true, + "requires": { + "@babel/types": "^7.18.13", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", + "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", + "dev": true, + "requires": { + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", + "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.1.tgz", + "integrity": "sha512-0yu8vNATgLy4ivqMNBIwb1HebCelqN7YX8SL3FDXORv/RqT0zEEWUCH4GH44JsSrvCu6GqnAdR5EBFAPeNBB4Q==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-default-from": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.18.10.tgz", + "integrity": "sha512-5H2N3R2aQFxkV4PIBUR/i7PUSwgTZjouJKzI8eKswfIjT0PhvzkPn0t0wIS5zn6maQuvtT0t1oHtMUz61LOuow==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-default-from": "^7.18.6" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", + "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.18.8" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@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-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@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-default-from": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.18.6.tgz", + "integrity": "sha512-Kr//z3ujSVNx6E9z9ih5xXXMqK07VVTuqPmqGe6Mss/zW5XPeLZeSDZoP9ab/hT4wPKqAgjl2PnhPrcpk8Seew==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@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-import-assertions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", + "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@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-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-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", + "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.18.6", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", + "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", + "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "regenerator-transform": "^0.15.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.10.tgz", + "integrity": "sha512-q5mMeYAdfEbpBAgzl7tBre/la3LeCxmDO1+wMXRdPWbcoMjR3GiXlCLk7JBZVVye0bqTGNMbt0yYVXX1B1jEWQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.9", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "semver": "^6.3.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz", + "integrity": "sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/plugin-syntax-typescript": "^7.18.6" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/preset-env": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", + "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.18.8", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.18.10", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@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-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.18.9", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.9", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.18.9", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.18.9", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.18.10", + "babel-plugin-polyfill-corejs2": "^0.3.2", + "babel-plugin-polyfill-corejs3": "^0.5.3", + "babel-plugin-polyfill-regenerator": "^0.4.0", + "core-js-compat": "^3.22.1", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "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/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + } + }, + "@babel/runtime": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz", + "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", + "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.13", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.13", + "@babel/types": "^7.18.13", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", + "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + } + }, + "@cosmwasm/ts-codegen": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@cosmwasm/ts-codegen/-/ts-codegen-0.17.0.tgz", + "integrity": "sha512-kmeCaNjLXn/ogaRxxcY9BCu2LKsHdpitp7SgM4Pizt13aqDBruLXU3yKU2XmldNB6NjmaYzSwToCs2PmHIxzBA==", + "dev": true, + "requires": { + "@babel/core": "7.18.10", + "@babel/generator": "7.18.12", + "@babel/parser": "7.18.11", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-proposal-export-default-from": "7.18.10", + "@babel/plugin-proposal-object-rest-spread": "7.18.9", + "@babel/plugin-transform-runtime": "7.18.10", + "@babel/preset-env": "7.18.10", + "@babel/preset-typescript": "^7.18.6", + "@babel/runtime": "^7.18.9", + "@babel/traverse": "7.18.11", + "@babel/types": "7.18.10", + "@pyramation/json-schema-to-typescript": " 11.0.4", + "case": "1.6.3", + "dargs": "7.0.0", + "deepmerge": "4.2.2", + "dotty": "0.1.2", + "fuzzy": "0.1.3", + "glob": "8.0.3", + "inquirerer": "0.1.3", + "long": "^5.2.0", + "minimist": "1.2.6", + "mkdirp": "1.0.4", + "parse-package-name": "1.0.0", + "rimraf": "3.0.2", + "shelljs": "0.8.5", + "wasm-ast-types": "^0.11.3" + }, + "dependencies": { + "@babel/core": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", + "integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.10", + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-module-transforms": "^7.18.9", + "@babel/helpers": "^7.18.9", + "@babel/parser": "^7.18.10", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.18.10", + "@babel/types": "^7.18.10", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.18.12", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz", + "integrity": "sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.10", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/parser": { + "version": "7.18.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz", + "integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==", + "dev": true + }, + "@babel/traverse": { + "version": "7.18.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz", + "integrity": "sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.10", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.11", + "@babel/types": "^7.18.10", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", + "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "long": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==", + "dev": true + } + } + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/transform": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "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.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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" + } + } + } + }, + "@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "requires": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.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.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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" + } + } + } + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "@osmonauts/ast": { + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.0.tgz", + "integrity": "sha512-ybcuClvO4Tym9Dymy79yQzQtgFzUGo/IZ5hOF3Q1bbQ8qeol+uMxhs8GhZfmqQpVzw/WOyjVazEPrzohiL/bYg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.9", + "@babel/types": "7.18.13", + "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/types": "^0.15.1", + "@osmonauts/utils": "^0.4.0", + "case": "1.6.3", + "dotty": "0.1.2" + } + }, + "@osmonauts/proto-parser": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.1.tgz", + "integrity": "sha512-xFY2ad0T2hSRinRy+oDNaDs3sA5yWukijFOMzuhb68h64F5cWtc6+FsPTZ7k0fY3lCCwbJS6NRH/rNuVlRQk9g==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.9", + "@osmonauts/types": "^0.15.1", + "@pyramation/protobufjs": "6.11.4", + "dotty": "0.1.2", + "glob": "8.0.3", + "mkdirp": "1.0.4" + } + }, + "@osmonauts/telescope": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.2.tgz", + "integrity": "sha512-QkrwZ/Y3u6TjPv4hZ9FW+kopOq449eig0Ny6El/KKO8v5T7QqL3Q4d+lQYgbkT6urUiApv+3xUc38kwV9rPfZQ==", + "dev": true, + "requires": { + "@babel/core": "7.18.13", + "@babel/generator": "7.18.13", + "@babel/parser": "^7.18.13", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-proposal-export-default-from": "7.18.10", + "@babel/plugin-proposal-object-rest-spread": "7.18.9", + "@babel/plugin-transform-runtime": "7.18.10", + "@babel/preset-env": "7.18.10", + "@babel/preset-typescript": "^7.17.12", + "@babel/runtime": "^7.18.9", + "@babel/traverse": "7.18.13", + "@babel/types": "7.18.13", + "@cosmwasm/ts-codegen": "0.17.0", + "@osmonauts/ast": "^0.31.0", + "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/types": "^0.15.1", + "@osmonauts/utils": "^0.4.0", + "@types/parse-package-name": "0.1.0", + "case": "1.6.3", + "dargs": "7.0.0", + "deepmerge": "4.2.2", + "dotty": "0.1.2", + "fuzzy": "0.1.3", + "glob": "8.0.3", + "inquirerer": "0.1.3", + "long": "^5.2.0", + "minimatch": "5.1.0", + "minimist": "1.2.6", + "mkdirp": "1.0.4", + "parse-package-name": "1.0.0", + "rimraf": "3.0.2", + "shelljs": "0.8.5" + }, + "dependencies": { + "long": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", + "integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==", + "dev": true + } + } + }, + "@osmonauts/types": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.1.tgz", + "integrity": "sha512-ZW0YWGT310SQ2V3w5rSRNNF6O6W7mm0fAkJUP+M0UzsQp1+KDT6nV+/E52Z6arPvN+mQGvWii1YmlQpTIIsTJw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.9", + "@osmonauts/utils": "^0.4.0", + "case": "1.6.3" + } + }, + "@osmonauts/utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.4.0.tgz", + "integrity": "sha512-+4ThyiTxyiQiC+lK3aji1zXYnSmHy3DxvMYInEPFwHRWbsvixbq99TGP8jxhhBovtGsnSzPCE/296iuVGEA4MQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.9" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "@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": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "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": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "@pyramation/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@pyramation/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-L5kToHAEc1Q87R8ZwWFaNa4tPHr8Hnm+U+DRdUVq3tUtk+EX4pCqSd34Z6EMxNi/bjTzt1syAG9J2Oo1YFlqSg==", + "dev": true, + "requires": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "@pyramation/json-schema-to-typescript": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@pyramation/json-schema-to-typescript/-/json-schema-to-typescript-11.0.4.tgz", + "integrity": "sha512-+aSzXDLhMHOEdV2cJ7Tjg/9YenjHU5BCmClVygzwxJZ1R16NOfEn7lTAwVzb/2jivOSnhjHzMJbnSf8b6rd1zg==", + "dev": true, + "requires": { + "@pyramation/json-schema-ref-parser": "9.0.6", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.6.2" + }, + "dependencies": { + "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" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dev": true, + "requires": { + "@types/glob": "^7.1.3" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@pyramation/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-SvWDkDSo3XOBCzLtjC36QYZOoeCw3/HGAi8wuVj6aM3HrFp6lKgYtxsQ0QymbnagDD582k/roGg3CcXfxeM2Hg==", + "dev": true, + "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" + } + }, + "@sinclair/typebox": { + "version": "0.24.44", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.44.tgz", + "integrity": "sha512-ka0W0KN5i6LfrSocduwliMMpqVgohtPFidKdMEOUjoOFCHcOOYkKsPRxfs5f15oPNHTm6ERAm0GV/+/LTKeiWg==", + "dev": true + }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/lodash": { + "version": "4.14.186", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz", + "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==", + "dev": true + }, + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, + "@types/node": { + "version": "15.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", + "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + }, + "@types/parse-package-name": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@types/parse-package-name/-/parse-package-name-0.1.0.tgz", + "integrity": "sha512-+vF4M3Cd3Ec22Uwb+OKhDrSAcXQ5I6evRx+1letx4KzfzycU+AOEDHnCifus8In11i8iYNFXPfzg9HWTcC1h+Q==", + "dev": true + }, + "@types/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "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": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "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" + } + }, + "ast-stringify": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ast-stringify/-/ast-stringify-0.1.0.tgz", + "integrity": "sha512-J1PgFYV3RG6r37+M6ySZJH406hR82okwGvFM9hLXpOvdx4WC4GEW8/qiw6pi1hKTrqcRvoHP8a7mp87egYr6iA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.11.2" + } + }, + "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-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", + "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.2", + "core-js-compat": "^3.21.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "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" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.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==", + "dev": true, + "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": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "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 + }, + "caniuse-lite": { + "version": "1.0.30001414", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001414.tgz", + "integrity": "sha512-t55jfSaWjCdocnFdKQoO+d2ct9C59UZg4dY3OnUlSZ447r8pUtIKdp0hpAzrGFultmTC+Us+KpKi4GZl/LXlFg==", + "dev": true + }, + "case": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "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" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "ci-info": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", + "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", + "dev": true + }, + "cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "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==", + "dev": true, + "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": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-js-compat": { + "version": "3.25.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.4.tgz", + "integrity": "sha512-gCEcIEEqCR6230WroNunK/653CWKhqyCKJ9b+uESqOt/WFJA8B4lTnnQFdpYY5vmBcwJAA90Bo5vXs+CVsf6iA==", + "dev": true, + "requires": { + "browserslist": "^4.21.4" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "dotty": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dotty/-/dotty-0.1.2.tgz", + "integrity": "sha512-V0EWmKeH3DEhMwAZ+8ZB2Ao4OK6p++Z0hsDtZq3N0+0ZMVqkzrcEGROvOnZpLnvBg5PTNG23JEDLAm64gPaotQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.270", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", + "integrity": "sha512-KNhIzgLiJmDDC444dj9vEOpZEgsV96ult9Iff98Vanumn+ShJHd5se8aX6KeVxdc0YQeqdrezBZv89rleDbvSg==", + "dev": true + }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "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 + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "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 + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } }, - "node_modules/@protobufjs/codegen": { + "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" + } + }, + "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" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "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==", + "dev": true + }, + "fuzzy": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fuzzy/-/fuzzy-0.1.3.tgz", + "integrity": "sha512-/gZffu4ykarLrCiP3Ygsa86UAo1E5vEVlvTrpkKywXSbP9Xhln3oSp9QSV57gEq3JFFpGJ4GZ+5zdEp3FcUh4w==", + "dev": true + }, + "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-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "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 + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "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": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "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": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "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" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + } }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "inquirer-autocomplete-prompt": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-0.11.1.tgz", + "integrity": "sha512-VM4eNiyRD4CeUc2cyKni+F8qgHwL9WC4LdOr+mEC85qP/QNsDV+ysVqUrJYhw1TmDQu1QVhc8hbaL7wfk8SJxw==", + "dev": true, + "requires": { + "ansi-escapes": "^2.0.0", + "chalk": "^1.1.3", + "figures": "^2.0.0", + "inquirer": "3.1.1", + "lodash": "^4.17.4", + "run-async": "^2.3.0", + "util": "^0.10.3" + }, "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "ansi-escapes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", + "integrity": "sha512-tH/fSoQp4DrEodDK3QpdiWiZTSe7sBJ9eOqcQBZ0o9HTM+5M/viSEn+sPMoTuPjQQ8n++w3QJoPEjt8LVPcrCg==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "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" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==", + "dev": true + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "inquirer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.1.1.tgz", + "integrity": "sha512-H50sHQwgvvaTBd3HpKMVtL/u6LoHDvYym51gd7bGQe/+9HkCE+J0/3N5FJLfd6O6oz44hHewC2Pc2LodzWVafQ==", + "dev": true, + "requires": { + "ansi-escapes": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.0.0", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "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": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + } } }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + "inquirerer": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/inquirerer/-/inquirerer-0.1.3.tgz", + "integrity": "sha512-yGgLUOqPxTsINBjZNZeLi3cv2zgxXtw9feaAOSJf2j6AqIT5Uxs5ZOqOrfAf+xP65Sicla1FD3iDxa3D6TsCAQ==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "inquirer": "^6.0.0", + "inquirer-autocomplete-prompt": "^0.11.1" + } }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + "is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true }, - "node_modules/@protobufjs/utf8": { + "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": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.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 + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "jest-haste-map": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "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.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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" + } + } + } + }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.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": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "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": "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" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "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" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "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 + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "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 + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", + "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" + } + }, + "next-tick": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true }, - "node_modules/@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "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 + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "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": "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" + } }, - "node_modules/@types/object-hash": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", - "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", + "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 }, - "node_modules/dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "parse-package-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-package-name/-/parse-package-name-1.0.0.tgz", + "integrity": "sha512-kBeTUtcj+SkyfaW4+KBe0HtsloBJ/mKTPoxpVdA57GZiPerREsUWJOhVj9anXweFiJkm5y8FG1sxFZkZ0SN6wg==", "dev": true }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } + "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 + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true }, - "node_modules/dprint-node": { + "path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.7.tgz", - "integrity": "sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==", - "dev": true, - "dependencies": { - "detect-libc": "^1.0.3" - } + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, - "node_modules/object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", - "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true }, - "node_modules/prettier": { + "pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true + }, + "prettier": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } + "dev": true }, - "node_modules/protobufjs": { + "protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", - "hasInstallScript": true, - "dependencies": { + "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", @@ -165,229 +8488,552 @@ "@types/long": "^4.0.1", "@types/node": ">=13.7.0", "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" } }, - "node_modules/ts-poet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.1.0.tgz", - "integrity": "sha512-PFwbNJjGrb44wzHUGQicG2/nhjR+3+k7zYLDTa8D61NVUitl7K/JgIc9/P+8oMNenntKzLc8tjLDOkPrxIhm6A==", + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, - "dependencies": { - "dprint-node": "^1.0.7" + "requires": { + "resolve": "^1.1.6" } }, - "node_modules/ts-proto": { - "version": "1.126.1", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.126.1.tgz", - "integrity": "sha512-PKrcgd0mCQJDY7tp+th349uYhnjs2Tz7wSqm9+DBcodl3YCKPt1pFtFmApOZdQ8WlghhgKAuJDIRQJBd6jD5YA==", + "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": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", "dev": true, - "dependencies": { - "@types/object-hash": "^1.3.0", - "dataloader": "^1.4.0", - "object-hash": "^1.3.1", - "protobufjs": "^6.11.3", - "ts-poet": "^6.1.0", - "ts-proto-descriptors": "1.7.1" - }, - "bin": { - "protoc-gen-ts_proto": "protoc-gen-ts_proto" + "requires": { + "regenerate": "^1.4.2" } }, - "node_modules/ts-proto-descriptors": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.7.1.tgz", - "integrity": "sha512-oIKUh3K4Xts4v29USGLfUG+2mEk32MsqpgZAOUyUlkrcIdv34yE+k2oZ2Nzngm6cV/JgFdOxRCqeyvmWHuYAyw==", + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", + "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", "dev": true, - "dependencies": { - "long": "^4.0.0", - "protobufjs": "^6.8.8" + "requires": { + "@babel/runtime": "^7.8.4" } }, - "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "regexpu-core": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.1.tgz", + "integrity": "sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==", "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", + "dev": true + }, + "regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" }, - "engines": { - "node": ">=4.2.0" + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } } - } - }, - "dependencies": { - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "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": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "glob": "^7.1.3" + }, + "dependencies": { + "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" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha512-Cun9QucwK6MIrp3mry/Y7hqD1oFqTYLQ4pGxaHTjIdaFDWRGGLikqp6u8LcWJnzpoALg9hap+JGk8sFIUuEGNA==", + "dev": true }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha512-3xPNZGW93oCjiO7PtKxRK6iOVYBWBvtf9QHDfU23Oc+dLIQmAV//UnyXV/yihv81VS/UqoQPk4NegS8EFi55Hg==", + "dev": true, + "requires": { + "rx-lite": "*" + } }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + "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 }, - "@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, - "@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "dependencies": { + "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" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } }, - "@types/object-hash": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz", - "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==", + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "detect-libc": { + "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "dprint-node": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.7.tgz", - "integrity": "sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==", + "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": { - "detect-libc": "^1.0.3" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "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" + } }, - "object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", - "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", - "dev": true + "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" + } }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, "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" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "dependencies": { + "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" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "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" } }, - "ts-poet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.1.0.tgz", - "integrity": "sha512-PFwbNJjGrb44wzHUGQicG2/nhjR+3+k7zYLDTa8D61NVUitl7K/JgIc9/P+8oMNenntKzLc8tjLDOkPrxIhm6A==", + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, "requires": { - "dprint-node": "^1.0.7" + "thenify": ">= 3.1.0 < 4" } }, - "ts-proto": { - "version": "1.126.1", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.126.1.tgz", - "integrity": "sha512-PKrcgd0mCQJDY7tp+th349uYhnjs2Tz7wSqm9+DBcodl3YCKPt1pFtFmApOZdQ8WlghhgKAuJDIRQJBd6jD5YA==", + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", "dev": true, "requires": { - "@types/object-hash": "^1.3.0", - "dataloader": "^1.4.0", - "object-hash": "^1.3.1", - "protobufjs": "^6.11.3", - "ts-poet": "^6.1.0", - "ts-proto-descriptors": "1.7.1" + "es5-ext": "~0.10.46", + "next-tick": "1" } }, - "ts-proto-descriptors": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.7.1.tgz", - "integrity": "sha512-oIKUh3K4Xts4v29USGLfUG+2mEk32MsqpgZAOUyUlkrcIdv34yE+k2oZ2Nzngm6cV/JgFdOxRCqeyvmWHuYAyw==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "long": "^4.0.0", - "protobufjs": "^6.8.8" + "os-tmpdir": "~1.0.2" + } + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "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": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": 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, + "requires": { + "is-number": "^7.0.0" } }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "typescript": { "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "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": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + } + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "wasm-ast-types": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/wasm-ast-types/-/wasm-ast-types-0.11.3.tgz", + "integrity": "sha512-rNJNKznUMgt8Bb01xPoyjM13VQmXzDIBG49oV09k4RusRELZu7pQWejBy08lV5BQjcIYKpWkqiUnAZJp73ZmOA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.9", + "@babel/types": "7.18.10", + "@jest/transform": "28.1.3", + "ast-stringify": "0.1.0", + "case": "1.6.3", + "deepmerge": "4.2.2" + }, + "dependencies": { + "@babel/types": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", + "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } } } } diff --git a/package.json b/package.json index e384c74b..f1594679 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,10 @@ "protobufjs": "~6.11.2" }, "devDependencies": { + "@osmonauts/telescope": "^0.36.2", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", - "ts-proto": "^1.126.1", "typescript": "~4.7" } } diff --git a/scripts/codegen-cosmos-sdk.sh b/scripts/codegen-cosmos-sdk.sh deleted file mode 100755 index 1232a77a..00000000 --- a/scripts/codegen-cosmos-sdk.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -set -o errexit -o nounset -o pipefail -command -v shellcheck >/dev/null && shellcheck "$0" - -TS_PROTO_OPTS="esModuleInterop=true,forceLong=long,useOptionals=messages,useDate=false" - -OUT_DIR="./src" -COSMOS_SDK_DIR="./cosmos-sdk-0.45/proto" -COSMOS_SDK_THIRD_PARTY_DIR="./cosmos-sdk-0.45/third_party/proto" - -PLUGIN_PATH="$(realpath ./bin)/protoc-gen-ts_proto_yarn_2" - -mkdir -p "$OUT_DIR" - -protoc \ - --plugin="$PLUGIN_PATH" \ - --ts_proto_yarn_2_out="$OUT_DIR" \ - --proto_path="$COSMOS_SDK_DIR" \ - --proto_path="$COSMOS_SDK_THIRD_PARTY_DIR" \ - --ts_proto_yarn_2_opt="$TS_PROTO_OPTS" \ - "$COSMOS_SDK_DIR/cosmos/auth/v1beta1/auth.proto" \ - "$COSMOS_SDK_DIR/cosmos/auth/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/auth/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/authz/v1beta1/authz.proto" \ - "$COSMOS_SDK_DIR/cosmos/authz/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/authz/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/authz/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/bank/v1beta1/bank.proto" \ - "$COSMOS_SDK_DIR/cosmos/bank/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/bank/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/bank/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/bank/v1beta1/authz.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/abci/v1beta1/abci.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/kv/v1beta1/kv.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/query/v1beta1/pagination.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/reflection/v1beta1/reflection.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/snapshots/v1beta1/snapshot.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/store/v1beta1/commit_info.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/store/v1beta1/listening.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/tendermint/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/base/v1beta1/coin.proto" \ - "$COSMOS_SDK_DIR/cosmos/capability/v1beta1/capability.proto" \ - "$COSMOS_SDK_DIR/cosmos/capability/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/crisis/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/crisis/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/crypto/ed25519/keys.proto" \ - "$COSMOS_SDK_DIR/cosmos/crypto/multisig/keys.proto" \ - "$COSMOS_SDK_DIR/cosmos/crypto/multisig/v1beta1/multisig.proto" \ - "$COSMOS_SDK_DIR/cosmos/crypto/secp256k1/keys.proto" \ - "$COSMOS_SDK_DIR/cosmos/distribution/v1beta1/distribution.proto" \ - "$COSMOS_SDK_DIR/cosmos/distribution/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/distribution/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/distribution/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/evidence/v1beta1/evidence.proto" \ - "$COSMOS_SDK_DIR/cosmos/evidence/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/evidence/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/evidence/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/feegrant/v1beta1/feegrant.proto" \ - "$COSMOS_SDK_DIR/cosmos/feegrant/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/feegrant/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/feegrant/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/genutil/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/gov/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/gov/v1beta1/gov.proto" \ - "$COSMOS_SDK_DIR/cosmos/gov/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/gov/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/mint/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/mint/v1beta1/mint.proto" \ - "$COSMOS_SDK_DIR/cosmos/mint/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/params/v1beta1/params.proto" \ - "$COSMOS_SDK_DIR/cosmos/params/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/slashing/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/slashing/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/slashing/v1beta1/slashing.proto" \ - "$COSMOS_SDK_DIR/cosmos/slashing/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/staking/v1beta1/genesis.proto" \ - "$COSMOS_SDK_DIR/cosmos/staking/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/staking/v1beta1/staking.proto" \ - "$COSMOS_SDK_DIR/cosmos/staking/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/staking/v1beta1/authz.proto" \ - "$COSMOS_SDK_DIR/cosmos/tx/signing/v1beta1/signing.proto" \ - "$COSMOS_SDK_DIR/cosmos/tx/v1beta1/service.proto" \ - "$COSMOS_SDK_DIR/cosmos/tx/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/upgrade/v1beta1/query.proto" \ - "$COSMOS_SDK_DIR/cosmos/upgrade/v1beta1/upgrade.proto" \ - "$COSMOS_SDK_DIR/cosmos/vesting/v1beta1/tx.proto" \ - "$COSMOS_SDK_DIR/cosmos/vesting/v1beta1/vesting.proto" diff --git a/scripts/codegen.js b/scripts/codegen.js new file mode 100755 index 00000000..d8eb183e --- /dev/null +++ b/scripts/codegen.js @@ -0,0 +1,37 @@ +#!/usr/bin/env node + +const { join } = require('path'); +const telescope = require('@osmonauts/telescope').default; + +telescope({ + protoDirs: [ + 'wasmd-0.25/proto', + 'wasmd-0.25/third_party/proto', + 'cosmos-sdk-0.45/proto', + 'cosmos-sdk-0.45/third_party/proto' + ], + outPath: join(__dirname, '/../src'), + options: { + includePackageVar: true, + typingsFormat: { + useExact: true, + timestamp: 'timestamp', + duration: 'duration' + }, + lcdClients: { + enabled: false + }, + rpcClients: { + enabled: true, + camelCase: false + }, + aminoEncoding: { + enabled: false + } + } +}).then(() => { + console.log('✨ All Done!'); +}, (e) => { + console.error(e); + process.exit(1); +}); \ No newline at end of file diff --git a/scripts/codegen.sh b/scripts/codegen.sh deleted file mode 100755 index c7986f13..00000000 --- a/scripts/codegen.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -set -o errexit -o nounset -o pipefail -command -v shellcheck >/dev/null && shellcheck "$0" - -TS_PROTO_OPTS="esModuleInterop=true,forceLong=long,useOptionals=messages,useDate=false" - -OUT_DIR="./src" -PLUGIN_PATH="$(realpath ./bin)/protoc-gen-ts_proto_yarn_2" - -mkdir -p "$OUT_DIR" - -echo "Processing wasmd 0.25 proto files ..." -WASMD_DIR="./wasmd-0.25/proto" -WASMD_THIRD_PARTY_DIR="./wasmd-0.25/third_party/proto" -CONFIO_DIR="$WASMD_THIRD_PARTY_DIR/confio" -COSMOS_DIR="$WASMD_THIRD_PARTY_DIR/cosmos" -IBC_DIR="$WASMD_THIRD_PARTY_DIR/ibc" -protoc \ - --plugin="$PLUGIN_PATH" \ - --ts_proto_yarn_2_out="$OUT_DIR" \ - --proto_path="$WASMD_DIR" \ - --proto_path="$WASMD_THIRD_PARTY_DIR" \ - --ts_proto_yarn_2_opt="$TS_PROTO_OPTS" \ - "$CONFIO_DIR/proofs.proto" \ - "$COSMOS_DIR/auth/v1beta1/auth.proto" \ - "$COSMOS_DIR/auth/v1beta1/genesis.proto" \ - "$COSMOS_DIR/auth/v1beta1/query.proto" \ - "$COSMOS_DIR/bank/v1beta1/bank.proto" \ - "$COSMOS_DIR/bank/v1beta1/genesis.proto" \ - "$COSMOS_DIR/bank/v1beta1/query.proto" \ - "$COSMOS_DIR/bank/v1beta1/tx.proto" \ - "$COSMOS_DIR/base/abci/v1beta1/abci.proto" \ - "$COSMOS_DIR/base/kv/v1beta1/kv.proto" \ - "$COSMOS_DIR/base/query/v1beta1/pagination.proto" \ - "$COSMOS_DIR/base/reflection/v1beta1/reflection.proto" \ - "$COSMOS_DIR/base/snapshots/v1beta1/snapshot.proto" \ - "$COSMOS_DIR/base/store/v1beta1/commit_info.proto" \ - "$COSMOS_DIR/base/store/v1beta1/snapshot.proto" \ - "$COSMOS_DIR/base/tendermint/v1beta1/query.proto" \ - "$COSMOS_DIR/base/v1beta1/coin.proto" \ - "$COSMOS_DIR/capability/v1beta1/capability.proto" \ - "$COSMOS_DIR/capability/v1beta1/genesis.proto" \ - "$COSMOS_DIR/crisis/v1beta1/genesis.proto" \ - "$COSMOS_DIR/crisis/v1beta1/tx.proto" \ - "$COSMOS_DIR/crypto/ed25519/keys.proto" \ - "$COSMOS_DIR/crypto/multisig/keys.proto" \ - "$COSMOS_DIR/crypto/multisig/v1beta1/multisig.proto" \ - "$COSMOS_DIR/crypto/secp256k1/keys.proto" \ - "$COSMOS_DIR/distribution/v1beta1/distribution.proto" \ - "$COSMOS_DIR/distribution/v1beta1/genesis.proto" \ - "$COSMOS_DIR/distribution/v1beta1/query.proto" \ - "$COSMOS_DIR/distribution/v1beta1/tx.proto" \ - "$COSMOS_DIR/evidence/v1beta1/evidence.proto" \ - "$COSMOS_DIR/evidence/v1beta1/genesis.proto" \ - "$COSMOS_DIR/evidence/v1beta1/query.proto" \ - "$COSMOS_DIR/evidence/v1beta1/tx.proto" \ - "$COSMOS_DIR/genutil/v1beta1/genesis.proto" \ - "$COSMOS_DIR/gov/v1beta1/genesis.proto" \ - "$COSMOS_DIR/gov/v1beta1/gov.proto" \ - "$COSMOS_DIR/gov/v1beta1/query.proto" \ - "$COSMOS_DIR/gov/v1beta1/tx.proto" \ - "$COSMOS_DIR/mint/v1beta1/genesis.proto" \ - "$COSMOS_DIR/mint/v1beta1/mint.proto" \ - "$COSMOS_DIR/mint/v1beta1/query.proto" \ - "$COSMOS_DIR/params/v1beta1/params.proto" \ - "$COSMOS_DIR/params/v1beta1/query.proto" \ - "$COSMOS_DIR/slashing/v1beta1/genesis.proto" \ - "$COSMOS_DIR/slashing/v1beta1/query.proto" \ - "$COSMOS_DIR/slashing/v1beta1/slashing.proto" \ - "$COSMOS_DIR/slashing/v1beta1/tx.proto" \ - "$COSMOS_DIR/staking/v1beta1/genesis.proto" \ - "$COSMOS_DIR/staking/v1beta1/query.proto" \ - "$COSMOS_DIR/staking/v1beta1/staking.proto" \ - "$COSMOS_DIR/staking/v1beta1/tx.proto" \ - "$COSMOS_DIR/tx/signing/v1beta1/signing.proto" \ - "$COSMOS_DIR/tx/v1beta1/service.proto" \ - "$COSMOS_DIR/tx/v1beta1/tx.proto" \ - "$COSMOS_DIR/upgrade/v1beta1/query.proto" \ - "$COSMOS_DIR/upgrade/v1beta1/upgrade.proto" \ - "$COSMOS_DIR/vesting/v1beta1/tx.proto" \ - "$COSMOS_DIR/vesting/v1beta1/vesting.proto" \ - "$IBC_DIR/applications/transfer/v1/genesis.proto" \ - "$IBC_DIR/applications/transfer/v1/query.proto" \ - "$IBC_DIR/applications/transfer/v1/transfer.proto" \ - "$IBC_DIR/applications/transfer/v1/tx.proto" \ - "$IBC_DIR/applications/transfer/v2/packet.proto" \ - "$IBC_DIR/core/channel/v1/channel.proto" \ - "$IBC_DIR/core/channel/v1/genesis.proto" \ - "$IBC_DIR/core/channel/v1/query.proto" \ - "$IBC_DIR/core/channel/v1/tx.proto" \ - "$IBC_DIR/core/client/v1/client.proto" \ - "$IBC_DIR/core/client/v1/genesis.proto" \ - "$IBC_DIR/core/client/v1/query.proto" \ - "$IBC_DIR/core/client/v1/tx.proto" \ - "$IBC_DIR/lightclients/localhost/v1/localhost.proto" \ - "$IBC_DIR/lightclients/solomachine/v1/solomachine.proto" \ - "$IBC_DIR/lightclients/tendermint/v1/tendermint.proto" \ - "$IBC_DIR/core/commitment/v1/commitment.proto" \ - "$IBC_DIR/core/connection/v1/connection.proto" \ - "$IBC_DIR/core/connection/v1/genesis.proto" \ - "$IBC_DIR/core/connection/v1/query.proto" \ - "$IBC_DIR/core/connection/v1/tx.proto" \ - "$IBC_DIR/core/types/v1/genesis.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/genesis.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/ibc.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/proposal.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/query.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/tx.proto" \ - "$WASMD_DIR/cosmwasm/wasm/v1/types.proto" From bf6ab1061c6d1cb55ef807569c043d8c0b46d92f Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 2 Oct 2022 18:30:50 -0500 Subject: [PATCH 02/38] update npm scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1594679..233499c8 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ ], "scripts": { "format": "prettier --write --loglevel warn \"./src/**/*.ts\"", - "codegen": "rm -rf ./src && ./scripts/codegen.sh && ./scripts/codegen-cosmos-sdk.sh && npm run format", + "codegen": "./scripts/codegen.js && yarn format", "prepare-publishing": "./scripts/prepare-publishing.sh", "build": "rm -rf ./build && tsc && npm run prepare-publishing" }, From e5e00c0c546da3c5bdb788ec61d96cfa619e3196 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 2 Oct 2022 20:07:59 -0500 Subject: [PATCH 03/38] codegen options --- package-lock.json | 66 +++++++++++++++++++++++----------------------- package.json | 4 +-- scripts/codegen.js | 25 +++++++++++++++--- 3 files changed, 56 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f653850..0eb44184 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.2", + "@osmonauts/telescope": "^0.36.3", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,14 +2408,14 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.0.tgz", - "integrity": "sha512-ybcuClvO4Tym9Dymy79yQzQtgFzUGo/IZ5hOF3Q1bbQ8qeol+uMxhs8GhZfmqQpVzw/WOyjVazEPrzohiL/bYg==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.1.tgz", + "integrity": "sha512-5FmPS5DcQAulDOhjZicvg7BQgS9UMCrp9Xnvb8iUPv9YFOw1WPCrHeq+zqd088+jkMdHJATvxMsazYPNZ6fMAg==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/proto-parser": "^0.19.2", "@osmonauts/types": "^0.15.1", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", @@ -2423,23 +2423,23 @@ } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.1.tgz", - "integrity": "sha512-xFY2ad0T2hSRinRy+oDNaDs3sA5yWukijFOMzuhb68h64F5cWtc6+FsPTZ7k0fY3lCCwbJS6NRH/rNuVlRQk9g==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.2.tgz", + "integrity": "sha512-MGlLk5BBYfuXEsxyhXLRAGw15g2gidPNDAUfTwAMu6NvdHiY2DHcrSIv4tG8Ceudnv1nNC5e1T3BU0Vg+t4lew==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@osmonauts/types": "^0.15.1", - "@pyramation/protobufjs": "6.11.4", + "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", "mkdirp": "1.0.4" } }, "node_modules/@osmonauts/telescope": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.2.tgz", - "integrity": "sha512-QkrwZ/Y3u6TjPv4hZ9FW+kopOq449eig0Ny6El/KKO8v5T7QqL3Q4d+lQYgbkT6urUiApv+3xUc38kwV9rPfZQ==", + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.3.tgz", + "integrity": "sha512-q4jr6okDiqh4heyO5+UiyCbp7lJ2//lzUuH2xOiRqVlfQOwwwvS1T8C0bR4oJyGZeodXwaF0jT3+C+eo7pp22Q==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,8 +2455,8 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.0", - "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/ast": "^0.31.1", + "@osmonauts/proto-parser": "^0.19.2", "@osmonauts/types": "^0.15.1", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", @@ -2660,9 +2660,9 @@ } }, "node_modules/@pyramation/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-SvWDkDSo3XOBCzLtjC36QYZOoeCw3/HGAi8wuVj6aM3HrFp6lKgYtxsQ0QymbnagDD582k/roGg3CcXfxeM2Hg==", + "version": "6.11.5", + "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.5.tgz", + "integrity": "sha512-gr+Iv6d7Iwq3PmNsTeQtL6TUONJs0WqbHFikett4zLquRK7egWuifZSKsqV8+o1UBNZcv52Z1HhgwTqNJe75Ag==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -6859,14 +6859,14 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.0.tgz", - "integrity": "sha512-ybcuClvO4Tym9Dymy79yQzQtgFzUGo/IZ5hOF3Q1bbQ8qeol+uMxhs8GhZfmqQpVzw/WOyjVazEPrzohiL/bYg==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.1.tgz", + "integrity": "sha512-5FmPS5DcQAulDOhjZicvg7BQgS9UMCrp9Xnvb8iUPv9YFOw1WPCrHeq+zqd088+jkMdHJATvxMsazYPNZ6fMAg==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/proto-parser": "^0.19.2", "@osmonauts/types": "^0.15.1", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", @@ -6874,23 +6874,23 @@ } }, "@osmonauts/proto-parser": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.1.tgz", - "integrity": "sha512-xFY2ad0T2hSRinRy+oDNaDs3sA5yWukijFOMzuhb68h64F5cWtc6+FsPTZ7k0fY3lCCwbJS6NRH/rNuVlRQk9g==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.2.tgz", + "integrity": "sha512-MGlLk5BBYfuXEsxyhXLRAGw15g2gidPNDAUfTwAMu6NvdHiY2DHcrSIv4tG8Ceudnv1nNC5e1T3BU0Vg+t4lew==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@osmonauts/types": "^0.15.1", - "@pyramation/protobufjs": "6.11.4", + "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", "mkdirp": "1.0.4" } }, "@osmonauts/telescope": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.2.tgz", - "integrity": "sha512-QkrwZ/Y3u6TjPv4hZ9FW+kopOq449eig0Ny6El/KKO8v5T7QqL3Q4d+lQYgbkT6urUiApv+3xUc38kwV9rPfZQ==", + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.3.tgz", + "integrity": "sha512-q4jr6okDiqh4heyO5+UiyCbp7lJ2//lzUuH2xOiRqVlfQOwwwvS1T8C0bR4oJyGZeodXwaF0jT3+C+eo7pp22Q==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,8 +6906,8 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.0", - "@osmonauts/proto-parser": "^0.19.1", + "@osmonauts/ast": "^0.31.1", + "@osmonauts/proto-parser": "^0.19.2", "@osmonauts/types": "^0.15.1", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", @@ -7087,9 +7087,9 @@ } }, "@pyramation/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-SvWDkDSo3XOBCzLtjC36QYZOoeCw3/HGAi8wuVj6aM3HrFp6lKgYtxsQ0QymbnagDD582k/roGg3CcXfxeM2Hg==", + "version": "6.11.5", + "resolved": "https://registry.npmjs.org/@pyramation/protobufjs/-/protobufjs-6.11.5.tgz", + "integrity": "sha512-gr+Iv6d7Iwq3PmNsTeQtL6TUONJs0WqbHFikett4zLquRK7egWuifZSKsqV8+o1UBNZcv52Z1HhgwTqNJe75Ag==", "dev": true, "requires": { "@protobufjs/aspromise": "^1.1.2", diff --git a/package.json b/package.json index 233499c8..976b7292 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ ], "scripts": { "format": "prettier --write --loglevel warn \"./src/**/*.ts\"", - "codegen": "./scripts/codegen.js && yarn format", + "codegen": "rm -rf ./src && ./scripts/codegen.js && yarn format", "prepare-publishing": "./scripts/prepare-publishing.sh", "build": "rm -rf ./build && tsc && npm run prepare-publishing" }, @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.2", + "@osmonauts/telescope": "^0.36.3", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index d8eb183e..a61952e7 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -13,10 +13,27 @@ telescope({ outPath: join(__dirname, '/../src'), options: { includePackageVar: true, - typingsFormat: { - useExact: true, - timestamp: 'timestamp', - duration: 'duration' + bundle: { + enabled: false + }, + prototypes: { + excluded: { + protos: [ + 'cosmos/authz/v1beta1/event.proto', + 'cosmos/base/reflection/v2alpha1/reflection.proto', + 'cosmos/crypto/secp256r1/keys.proto' + ] + }, + methods: { + fromJSON: true, + toJSON: true + }, + typingsFormat: { + useExact: true, + useDeepPartial: true, + timestamp: 'timestamp', + duration: 'duration' + } }, lcdClients: { enabled: false From ba6a08545a8b56266d5ab7e53f565529239a3744 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 2 Oct 2022 20:30:39 -0500 Subject: [PATCH 04/38] build option --- package-lock.json | 74 +++++++++++++++++++++++----------------------- package.json | 2 +- scripts/codegen.js | 1 + 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0eb44184..369a6e63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.3", + "@osmonauts/telescope": "^0.36.4", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,28 +2408,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.1.tgz", - "integrity": "sha512-5FmPS5DcQAulDOhjZicvg7BQgS9UMCrp9Xnvb8iUPv9YFOw1WPCrHeq+zqd088+jkMdHJATvxMsazYPNZ6fMAg==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.2.tgz", + "integrity": "sha512-jwn4mIDizHioW4CD35r2dMCrpsRbqBMbzPze14lHy2zLB2xIHwrM7LZRVxGRuDg1iwJcGzUuIoBwRP1ajXuDVA==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.2", - "@osmonauts/types": "^0.15.1", + "@osmonauts/proto-parser": "^0.19.3", + "@osmonauts/types": "^0.15.2", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.2.tgz", - "integrity": "sha512-MGlLk5BBYfuXEsxyhXLRAGw15g2gidPNDAUfTwAMu6NvdHiY2DHcrSIv4tG8Ceudnv1nNC5e1T3BU0Vg+t4lew==", + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.3.tgz", + "integrity": "sha512-lq5Sd9r/Nxw29V0Cj0OXub1m40EuUMQFyI/VByP9bhFfoV6IPjJeEbxWzS/OXUgY5PBukgRY3wmHE5BZefvCwg==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.1", + "@osmonauts/types": "^0.15.2", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.3.tgz", - "integrity": "sha512-q4jr6okDiqh4heyO5+UiyCbp7lJ2//lzUuH2xOiRqVlfQOwwwvS1T8C0bR4oJyGZeodXwaF0jT3+C+eo7pp22Q==", + "version": "0.36.4", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.4.tgz", + "integrity": "sha512-2BV1wyGdukdrdJ4RaZZQiHMSJieNix+6sksh1+CRsHrSNZbhqmTGteVVrYFa2i3UO6pc7BEXeKUrjm5bNYSvOQ==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,9 +2455,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.1", - "@osmonauts/proto-parser": "^0.19.2", - "@osmonauts/types": "^0.15.1", + "@osmonauts/ast": "^0.31.2", + "@osmonauts/proto-parser": "^0.19.3", + "@osmonauts/types": "^0.15.2", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2486,9 +2486,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.1.tgz", - "integrity": "sha512-ZW0YWGT310SQ2V3w5rSRNNF6O6W7mm0fAkJUP+M0UzsQp1+KDT6nV+/E52Z6arPvN+mQGvWii1YmlQpTIIsTJw==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.2.tgz", + "integrity": "sha512-Or/c+ICoS26vb7x/ruy+pxgSCYte6GiFhKSCFvg58IrgcMwWzETn91+wfOZNOadeDbMT2WHUKNUi9cbxsVSeww==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -6859,28 +6859,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.1.tgz", - "integrity": "sha512-5FmPS5DcQAulDOhjZicvg7BQgS9UMCrp9Xnvb8iUPv9YFOw1WPCrHeq+zqd088+jkMdHJATvxMsazYPNZ6fMAg==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.2.tgz", + "integrity": "sha512-jwn4mIDizHioW4CD35r2dMCrpsRbqBMbzPze14lHy2zLB2xIHwrM7LZRVxGRuDg1iwJcGzUuIoBwRP1ajXuDVA==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.2", - "@osmonauts/types": "^0.15.1", + "@osmonauts/proto-parser": "^0.19.3", + "@osmonauts/types": "^0.15.2", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.2.tgz", - "integrity": "sha512-MGlLk5BBYfuXEsxyhXLRAGw15g2gidPNDAUfTwAMu6NvdHiY2DHcrSIv4tG8Ceudnv1nNC5e1T3BU0Vg+t4lew==", + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.3.tgz", + "integrity": "sha512-lq5Sd9r/Nxw29V0Cj0OXub1m40EuUMQFyI/VByP9bhFfoV6IPjJeEbxWzS/OXUgY5PBukgRY3wmHE5BZefvCwg==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.1", + "@osmonauts/types": "^0.15.2", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.3.tgz", - "integrity": "sha512-q4jr6okDiqh4heyO5+UiyCbp7lJ2//lzUuH2xOiRqVlfQOwwwvS1T8C0bR4oJyGZeodXwaF0jT3+C+eo7pp22Q==", + "version": "0.36.4", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.4.tgz", + "integrity": "sha512-2BV1wyGdukdrdJ4RaZZQiHMSJieNix+6sksh1+CRsHrSNZbhqmTGteVVrYFa2i3UO6pc7BEXeKUrjm5bNYSvOQ==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,9 +6906,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.1", - "@osmonauts/proto-parser": "^0.19.2", - "@osmonauts/types": "^0.15.1", + "@osmonauts/ast": "^0.31.2", + "@osmonauts/proto-parser": "^0.19.3", + "@osmonauts/types": "^0.15.2", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6936,9 +6936,9 @@ } }, "@osmonauts/types": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.1.tgz", - "integrity": "sha512-ZW0YWGT310SQ2V3w5rSRNNF6O6W7mm0fAkJUP+M0UzsQp1+KDT6nV+/E52Z6arPvN+mQGvWii1YmlQpTIIsTJw==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.2.tgz", + "integrity": "sha512-Or/c+ICoS26vb7x/ruy+pxgSCYte6GiFhKSCFvg58IrgcMwWzETn91+wfOZNOadeDbMT2WHUKNUi9cbxsVSeww==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", diff --git a/package.json b/package.json index 976b7292..8a8c4a77 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.3", + "@osmonauts/telescope": "^0.36.4", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index a61952e7..1e8b2d54 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -13,6 +13,7 @@ telescope({ outPath: join(__dirname, '/../src'), options: { includePackageVar: true, + useSDKTypes: false, bundle: { enabled: false }, From 5a896fe1e4361410b2722de4d4dd7cf5dfe177b6 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 2 Oct 2022 23:05:48 -0500 Subject: [PATCH 05/38] inline/extensions --- package-lock.json | 74 +++++++++++++++++++++++----------------------- package.json | 2 +- scripts/codegen.js | 9 ++++-- 3 files changed, 45 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 369a6e63..00caed44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.4", + "@osmonauts/telescope": "^0.36.7", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,28 +2408,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.2.tgz", - "integrity": "sha512-jwn4mIDizHioW4CD35r2dMCrpsRbqBMbzPze14lHy2zLB2xIHwrM7LZRVxGRuDg1iwJcGzUuIoBwRP1ajXuDVA==", + "version": "0.31.4", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.4.tgz", + "integrity": "sha512-XGsQfAGtDLyVy8E42dHVf1Xs9xIw3CrwFx4bE9JWKl3oOe9POOcaSi5eRVbpBb0YGAJB52tK5ZeVnBgGrqeZLA==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.3", - "@osmonauts/types": "^0.15.2", + "@osmonauts/proto-parser": "^0.19.4", + "@osmonauts/types": "^0.15.3", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.3.tgz", - "integrity": "sha512-lq5Sd9r/Nxw29V0Cj0OXub1m40EuUMQFyI/VByP9bhFfoV6IPjJeEbxWzS/OXUgY5PBukgRY3wmHE5BZefvCwg==", + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.4.tgz", + "integrity": "sha512-7skwr7EW4pJzg+4UrVvJpxwy1QTFK4Gt1sbfWAf2SlMT3trtpocxr+ecYyZhxcNfUjLFdtqgfTXU3nBn6vAGEg==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.2", + "@osmonauts/types": "^0.15.3", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.36.4", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.4.tgz", - "integrity": "sha512-2BV1wyGdukdrdJ4RaZZQiHMSJieNix+6sksh1+CRsHrSNZbhqmTGteVVrYFa2i3UO6pc7BEXeKUrjm5bNYSvOQ==", + "version": "0.36.7", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.7.tgz", + "integrity": "sha512-8JUmMIPCezqeZUPoF72rbp75HPE7x7SUcwDm/h8ESvrbtRBGRdD035a/7M8nq6/hNOo3aTz1pkyR6Gvkv0bHEA==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,9 +2455,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.2", - "@osmonauts/proto-parser": "^0.19.3", - "@osmonauts/types": "^0.15.2", + "@osmonauts/ast": "^0.31.4", + "@osmonauts/proto-parser": "^0.19.4", + "@osmonauts/types": "^0.15.3", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2486,9 +2486,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.2.tgz", - "integrity": "sha512-Or/c+ICoS26vb7x/ruy+pxgSCYte6GiFhKSCFvg58IrgcMwWzETn91+wfOZNOadeDbMT2WHUKNUi9cbxsVSeww==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.3.tgz", + "integrity": "sha512-+KrzMr5sij626EH7W28/BbU9tbjXyEZbU0jkFQCQEopT7rxwGlRCi5LTWbER4NKc+33Tb6/ulrQH87fXpR1m4g==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -6859,28 +6859,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.2.tgz", - "integrity": "sha512-jwn4mIDizHioW4CD35r2dMCrpsRbqBMbzPze14lHy2zLB2xIHwrM7LZRVxGRuDg1iwJcGzUuIoBwRP1ajXuDVA==", + "version": "0.31.4", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.4.tgz", + "integrity": "sha512-XGsQfAGtDLyVy8E42dHVf1Xs9xIw3CrwFx4bE9JWKl3oOe9POOcaSi5eRVbpBb0YGAJB52tK5ZeVnBgGrqeZLA==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.3", - "@osmonauts/types": "^0.15.2", + "@osmonauts/proto-parser": "^0.19.4", + "@osmonauts/types": "^0.15.3", "@osmonauts/utils": "^0.4.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.3.tgz", - "integrity": "sha512-lq5Sd9r/Nxw29V0Cj0OXub1m40EuUMQFyI/VByP9bhFfoV6IPjJeEbxWzS/OXUgY5PBukgRY3wmHE5BZefvCwg==", + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.4.tgz", + "integrity": "sha512-7skwr7EW4pJzg+4UrVvJpxwy1QTFK4Gt1sbfWAf2SlMT3trtpocxr+ecYyZhxcNfUjLFdtqgfTXU3nBn6vAGEg==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.2", + "@osmonauts/types": "^0.15.3", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.36.4", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.4.tgz", - "integrity": "sha512-2BV1wyGdukdrdJ4RaZZQiHMSJieNix+6sksh1+CRsHrSNZbhqmTGteVVrYFa2i3UO6pc7BEXeKUrjm5bNYSvOQ==", + "version": "0.36.7", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.7.tgz", + "integrity": "sha512-8JUmMIPCezqeZUPoF72rbp75HPE7x7SUcwDm/h8ESvrbtRBGRdD035a/7M8nq6/hNOo3aTz1pkyR6Gvkv0bHEA==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,9 +6906,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.2", - "@osmonauts/proto-parser": "^0.19.3", - "@osmonauts/types": "^0.15.2", + "@osmonauts/ast": "^0.31.4", + "@osmonauts/proto-parser": "^0.19.4", + "@osmonauts/types": "^0.15.3", "@osmonauts/utils": "^0.4.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6936,9 +6936,9 @@ } }, "@osmonauts/types": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.2.tgz", - "integrity": "sha512-Or/c+ICoS26vb7x/ruy+pxgSCYte6GiFhKSCFvg58IrgcMwWzETn91+wfOZNOadeDbMT2WHUKNUi9cbxsVSeww==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.3.tgz", + "integrity": "sha512-+KrzMr5sij626EH7W28/BbU9tbjXyEZbU0jkFQCQEopT7rxwGlRCi5LTWbER4NKc+33Tb6/ulrQH87fXpR1m4g==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", diff --git a/package.json b/package.json index 8a8c4a77..f0103b40 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.4", + "@osmonauts/telescope": "^0.36.7", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 1e8b2d54..7e7664f9 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -12,17 +12,20 @@ telescope({ ], outPath: join(__dirname, '/../src'), options: { - includePackageVar: true, useSDKTypes: false, bundle: { enabled: false }, prototypes: { + includePackageVar: true, excluded: { protos: [ 'cosmos/authz/v1beta1/event.proto', 'cosmos/base/reflection/v2alpha1/reflection.proto', - 'cosmos/crypto/secp256r1/keys.proto' + 'cosmos/crypto/secp256r1/keys.proto', + 'ibc/core/port/v1/query.proto', + 'ibc/lightclients/solomachine/v2/solomachine.proto', + 'tendermint/libs/bits/types.proto' ] }, methods: { @@ -41,6 +44,8 @@ telescope({ }, rpcClients: { enabled: true, + inline: true, + extensions: false, camelCase: false }, aminoEncoding: { From 55dc8b08a0f7386c5e0d3e23ad52aca8f8e58edb Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 02:25:54 -0500 Subject: [PATCH 06/38] codegen settings --- package-lock.json | 98 +++++++++++++++++++++++----------------------- package.json | 2 +- scripts/codegen.js | 3 +- 3 files changed, 52 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 00caed44..43624648 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.7", + "@osmonauts/telescope": "^0.38.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,28 +2408,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.31.4", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.4.tgz", - "integrity": "sha512-XGsQfAGtDLyVy8E42dHVf1Xs9xIw3CrwFx4bE9JWKl3oOe9POOcaSi5eRVbpBb0YGAJB52tK5ZeVnBgGrqeZLA==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.0.tgz", + "integrity": "sha512-TgkXQWmolWxt7EQ40X/HewkaCzPB5cun6MNavQZYgR8/veCfjPaU/gkzSKgmhwQqQ7LvM/aMrWx4ri0qzlOgwA==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.4", - "@osmonauts/types": "^0.15.3", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/types": "^0.16.0", + "@osmonauts/utils": "^0.5.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.4.tgz", - "integrity": "sha512-7skwr7EW4pJzg+4UrVvJpxwy1QTFK4Gt1sbfWAf2SlMT3trtpocxr+ecYyZhxcNfUjLFdtqgfTXU3nBn6vAGEg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.0.tgz", + "integrity": "sha512-cQ9d92jsrQlYfVcfkZqGzKperxrl8VuELS5t5p681O7d+1P5IfsNYnk56N2Z6dG3nbfBqIvPkImt/Gg4y5GBCQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.3", + "@osmonauts/types": "^0.16.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.36.7", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.7.tgz", - "integrity": "sha512-8JUmMIPCezqeZUPoF72rbp75HPE7x7SUcwDm/h8ESvrbtRBGRdD035a/7M8nq6/hNOo3aTz1pkyR6Gvkv0bHEA==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.0.tgz", + "integrity": "sha512-sv6MzIxi5MgiAM+vAqJP8FnvL1LkIQfSgO5/bc2pUVxQheTBQQw3wlV0/uku2iH5NayjLvpFo4li3txzLk7TaQ==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,10 +2455,10 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.4", - "@osmonauts/proto-parser": "^0.19.4", - "@osmonauts/types": "^0.15.3", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/ast": "^0.33.0", + "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/types": "^0.16.0", + "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -2486,20 +2486,20 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.3.tgz", - "integrity": "sha512-+KrzMr5sij626EH7W28/BbU9tbjXyEZbU0jkFQCQEopT7rxwGlRCi5LTWbER4NKc+33Tb6/ulrQH87fXpR1m4g==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.16.0.tgz", + "integrity": "sha512-7KnfomlOy7Xvd+9rD9SR1mApzq6WU27GJBxd1O18AgGaYeCu2fXQMobuysynDumNV/gTVAHiJ10NnW/OBXrN6A==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/utils": "^0.5.0", "case": "1.6.3" } }, "node_modules/@osmonauts/utils": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.4.0.tgz", - "integrity": "sha512-+4ThyiTxyiQiC+lK3aji1zXYnSmHy3DxvMYInEPFwHRWbsvixbq99TGP8jxhhBovtGsnSzPCE/296iuVGEA4MQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.5.0.tgz", + "integrity": "sha512-opK+xpeEdNdxRm3Wh1FwBwhPt654YPorSDfX8ZVfF6TIl0c3igf5bMjow2Acq4y0D4J+pauzJRrtEy9IHaZtjw==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9" @@ -6859,28 +6859,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.31.4", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.31.4.tgz", - "integrity": "sha512-XGsQfAGtDLyVy8E42dHVf1Xs9xIw3CrwFx4bE9JWKl3oOe9POOcaSi5eRVbpBb0YGAJB52tK5ZeVnBgGrqeZLA==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.0.tgz", + "integrity": "sha512-TgkXQWmolWxt7EQ40X/HewkaCzPB5cun6MNavQZYgR8/veCfjPaU/gkzSKgmhwQqQ7LvM/aMrWx4ri0qzlOgwA==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.19.4", - "@osmonauts/types": "^0.15.3", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/types": "^0.16.0", + "@osmonauts/utils": "^0.5.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.19.4.tgz", - "integrity": "sha512-7skwr7EW4pJzg+4UrVvJpxwy1QTFK4Gt1sbfWAf2SlMT3trtpocxr+ecYyZhxcNfUjLFdtqgfTXU3nBn6vAGEg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.0.tgz", + "integrity": "sha512-cQ9d92jsrQlYfVcfkZqGzKperxrl8VuELS5t5p681O7d+1P5IfsNYnk56N2Z6dG3nbfBqIvPkImt/Gg4y5GBCQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.15.3", + "@osmonauts/types": "^0.16.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.36.7", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.36.7.tgz", - "integrity": "sha512-8JUmMIPCezqeZUPoF72rbp75HPE7x7SUcwDm/h8ESvrbtRBGRdD035a/7M8nq6/hNOo3aTz1pkyR6Gvkv0bHEA==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.0.tgz", + "integrity": "sha512-sv6MzIxi5MgiAM+vAqJP8FnvL1LkIQfSgO5/bc2pUVxQheTBQQw3wlV0/uku2iH5NayjLvpFo4li3txzLk7TaQ==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,10 +6906,10 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.31.4", - "@osmonauts/proto-parser": "^0.19.4", - "@osmonauts/types": "^0.15.3", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/ast": "^0.33.0", + "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/types": "^0.16.0", + "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -6936,20 +6936,20 @@ } }, "@osmonauts/types": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.15.3.tgz", - "integrity": "sha512-+KrzMr5sij626EH7W28/BbU9tbjXyEZbU0jkFQCQEopT7rxwGlRCi5LTWbER4NKc+33Tb6/ulrQH87fXpR1m4g==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.16.0.tgz", + "integrity": "sha512-7KnfomlOy7Xvd+9rD9SR1mApzq6WU27GJBxd1O18AgGaYeCu2fXQMobuysynDumNV/gTVAHiJ10NnW/OBXrN6A==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", - "@osmonauts/utils": "^0.4.0", + "@osmonauts/utils": "^0.5.0", "case": "1.6.3" } }, "@osmonauts/utils": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.4.0.tgz", - "integrity": "sha512-+4ThyiTxyiQiC+lK3aji1zXYnSmHy3DxvMYInEPFwHRWbsvixbq99TGP8jxhhBovtGsnSzPCE/296iuVGEA4MQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.5.0.tgz", + "integrity": "sha512-opK+xpeEdNdxRm3Wh1FwBwhPt654YPorSDfX8ZVfF6TIl0c3igf5bMjow2Acq4y0D4J+pauzJRrtEy9IHaZtjw==", "dev": true, "requires": { "@babel/runtime": "^7.18.9" diff --git a/package.json b/package.json index f0103b40..eb456f0e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.36.7", + "@osmonauts/telescope": "^0.38.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 7e7664f9..592adb81 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -25,7 +25,8 @@ telescope({ 'cosmos/crypto/secp256r1/keys.proto', 'ibc/core/port/v1/query.proto', 'ibc/lightclients/solomachine/v2/solomachine.proto', - 'tendermint/libs/bits/types.proto' + 'tendermint/libs/bits/types.proto', + 'google/api/httpbody.proto' ] }, methods: { From 0690ec239bcdf8a9dbce86814b3a8285d97db60b Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 05:16:54 -0500 Subject: [PATCH 07/38] update --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43624648..f514e2c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.38.0", + "@osmonauts/telescope": "^0.38.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,14 +2408,14 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.0.tgz", - "integrity": "sha512-TgkXQWmolWxt7EQ40X/HewkaCzPB5cun6MNavQZYgR8/veCfjPaU/gkzSKgmhwQqQ7LvM/aMrWx4ri0qzlOgwA==", + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.1.tgz", + "integrity": "sha512-lgsCEDiIZS5sKHODtqMB8PTf8XefmGrr+cjujJAXFZQtmGMyWPZdoUrIpMvPRbdUQ9WRi2jP9tmNR770T+lwcQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/proto-parser": "^0.21.1", "@osmonauts/types": "^0.16.0", "@osmonauts/utils": "^0.5.0", "case": "1.6.3", @@ -2423,9 +2423,9 @@ } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.0.tgz", - "integrity": "sha512-cQ9d92jsrQlYfVcfkZqGzKperxrl8VuELS5t5p681O7d+1P5IfsNYnk56N2Z6dG3nbfBqIvPkImt/Gg4y5GBCQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.1.tgz", + "integrity": "sha512-bZq+iMFT0gSSn+j8aciNWhh8b335FhylV6rt8/NTkjH/FoAx5B2H5VipOXKlStf5zsa7Ri3MtsTjRBkKmN0syA==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.0.tgz", - "integrity": "sha512-sv6MzIxi5MgiAM+vAqJP8FnvL1LkIQfSgO5/bc2pUVxQheTBQQw3wlV0/uku2iH5NayjLvpFo4li3txzLk7TaQ==", + "version": "0.38.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.1.tgz", + "integrity": "sha512-A9g1rYTF/jo/gaULHn95/HsloKplc7//yNft0iG+scXNy0L39sC61vJ2xRcEhaFGakHuGIxszv21byK1NlOUDQ==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,8 +2455,8 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.33.0", - "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/ast": "^0.33.1", + "@osmonauts/proto-parser": "^0.21.1", "@osmonauts/types": "^0.16.0", "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", @@ -6859,14 +6859,14 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.0.tgz", - "integrity": "sha512-TgkXQWmolWxt7EQ40X/HewkaCzPB5cun6MNavQZYgR8/veCfjPaU/gkzSKgmhwQqQ7LvM/aMrWx4ri0qzlOgwA==", + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.1.tgz", + "integrity": "sha512-lgsCEDiIZS5sKHODtqMB8PTf8XefmGrr+cjujJAXFZQtmGMyWPZdoUrIpMvPRbdUQ9WRi2jP9tmNR770T+lwcQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/proto-parser": "^0.21.1", "@osmonauts/types": "^0.16.0", "@osmonauts/utils": "^0.5.0", "case": "1.6.3", @@ -6874,9 +6874,9 @@ } }, "@osmonauts/proto-parser": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.0.tgz", - "integrity": "sha512-cQ9d92jsrQlYfVcfkZqGzKperxrl8VuELS5t5p681O7d+1P5IfsNYnk56N2Z6dG3nbfBqIvPkImt/Gg4y5GBCQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.1.tgz", + "integrity": "sha512-bZq+iMFT0gSSn+j8aciNWhh8b335FhylV6rt8/NTkjH/FoAx5B2H5VipOXKlStf5zsa7Ri3MtsTjRBkKmN0syA==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.0.tgz", - "integrity": "sha512-sv6MzIxi5MgiAM+vAqJP8FnvL1LkIQfSgO5/bc2pUVxQheTBQQw3wlV0/uku2iH5NayjLvpFo4li3txzLk7TaQ==", + "version": "0.38.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.1.tgz", + "integrity": "sha512-A9g1rYTF/jo/gaULHn95/HsloKplc7//yNft0iG+scXNy0L39sC61vJ2xRcEhaFGakHuGIxszv21byK1NlOUDQ==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,8 +6906,8 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.33.0", - "@osmonauts/proto-parser": "^0.21.0", + "@osmonauts/ast": "^0.33.1", + "@osmonauts/proto-parser": "^0.21.1", "@osmonauts/types": "^0.16.0", "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", diff --git a/package.json b/package.json index eb456f0e..b9168b21 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.38.0", + "@osmonauts/telescope": "^0.38.2", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", From 266e59c1555afec2dbdd8f44ac918505adce6994 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 05:17:37 -0500 Subject: [PATCH 08/38] run codegen --- src/confio/proofs.ts | 511 ++++-- src/cosmos/auth/v1beta1/auth.ts | 106 +- src/cosmos/auth/v1beta1/genesis.ts | 55 +- src/cosmos/auth/v1beta1/query.ts | 157 +- src/cosmos/authz/v1beta1/authz.ts | 119 +- src/cosmos/authz/v1beta1/genesis.ts | 46 +- src/cosmos/authz/v1beta1/query.ts | 174 +- src/cosmos/authz/v1beta1/tx.ts | 193 +-- src/cosmos/bank/v1beta1/authz.ts | 43 +- src/cosmos/bank/v1beta1/bank.ts | 171 +- src/cosmos/bank/v1beta1/genesis.ts | 82 +- src/cosmos/bank/v1beta1/query.ts | 340 ++-- src/cosmos/bank/v1beta1/tx.ts | 94 +- src/cosmos/base/abci/v1beta1/abci.ts | 306 ++-- src/cosmos/base/kv/v1beta1/kv.ts | 109 +- src/cosmos/base/query/v1beta1/pagination.ts | 138 +- .../base/reflection/v1beta1/reflection.ts | 126 +- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 214 +-- src/cosmos/base/store/v1beta1/commit_info.ts | 128 +- src/cosmos/base/store/v1beta1/listening.ts | 99 +- src/cosmos/base/store/v1beta1/snapshot.ts | 133 +- src/cosmos/base/tendermint/v1beta1/query.ts | 332 ++-- src/cosmos/base/v1beta1/coin.ts | 92 +- src/cosmos/capability/v1beta1/capability.ts | 80 +- src/cosmos/capability/v1beta1/genesis.ts | 72 +- src/cosmos/crisis/v1beta1/genesis.ts | 51 +- src/cosmos/crisis/v1beta1/tx.ts | 67 +- src/cosmos/crypto/ed25519/keys.ts | 108 +- src/cosmos/crypto/multisig/keys.ts | 50 +- .../crypto/multisig/v1beta1/multisig.ts | 105 +- src/cosmos/crypto/secp256k1/keys.ts | 108 +- .../distribution/v1beta1/distribution.ts | 240 ++- src/cosmos/distribution/v1beta1/genesis.ts | 228 ++- src/cosmos/distribution/v1beta1/query.ts | 347 ++-- src/cosmos/distribution/v1beta1/tx.ts | 149 +- src/cosmos/evidence/v1beta1/evidence.ts | 86 +- src/cosmos/evidence/v1beta1/genesis.ts | 43 +- src/cosmos/evidence/v1beta1/query.ts | 162 +- src/cosmos/evidence/v1beta1/tx.ts | 124 +- src/cosmos/feegrant/v1beta1/feegrant.ts | 161 +- src/cosmos/feegrant/v1beta1/genesis.ts | 45 +- src/cosmos/feegrant/v1beta1/query.ts | 114 +- src/cosmos/feegrant/v1beta1/tx.ts | 104 +- src/cosmos/genutil/v1beta1/genesis.ts | 91 +- src/cosmos/gov/v1beta1/genesis.ts | 73 +- src/cosmos/gov/v1beta1/gov.ts | 383 +++-- src/cosmos/gov/v1beta1/query.ts | 368 ++-- src/cosmos/gov/v1beta1/tx.ts | 174 +- src/cosmos/mint/v1beta1/genesis.ts | 53 +- src/cosmos/mint/v1beta1/mint.ts | 73 +- src/cosmos/mint/v1beta1/query.ts | 165 +- src/cosmos/params/v1beta1/params.ts | 70 +- src/cosmos/params/v1beta1/query.ts | 81 +- src/cosmos/slashing/v1beta1/genesis.ts | 109 +- src/cosmos/slashing/v1beta1/query.ts | 144 +- src/cosmos/slashing/v1beta1/slashing.ts | 174 +- src/cosmos/slashing/v1beta1/tx.ts | 71 +- src/cosmos/staking/v1beta1/authz.ts | 98 +- src/cosmos/staking/v1beta1/genesis.ts | 132 +- src/cosmos/staking/v1beta1/query.ts | 554 ++++-- src/cosmos/staking/v1beta1/staking.ts | 512 ++++-- src/cosmos/staking/v1beta1/tx.ts | 250 +-- src/cosmos/tx/signing/v1beta1/signing.ts | 215 ++- src/cosmos/tx/v1beta1/service.ts | 351 ++-- src/cosmos/tx/v1beta1/tx.ts | 296 ++-- src/cosmos/upgrade/v1beta1/query.ts | 240 ++- src/cosmos/upgrade/v1beta1/upgrade.ts | 153 +- src/cosmos/vesting/v1beta1/tx.ts | 81 +- src/cosmos/vesting/v1beta1/vesting.ts | 142 +- src/cosmos_proto/cosmos.ts | 4 +- src/cosmwasm/wasm/v1/genesis.ts | 197 +-- src/cosmwasm/wasm/v1/ibc.ts | 122 +- src/cosmwasm/wasm/v1/proposal.ts | 312 ++-- src/cosmwasm/wasm/v1/query.ts | 445 +++-- src/cosmwasm/wasm/v1/tx.ts | 316 ++-- src/cosmwasm/wasm/v1/types.ts | 275 +-- src/gogoproto/gogo.ts | 4 +- src/google/api/annotations.ts | 4 +- src/google/api/http.ts | 121 +- src/google/protobuf/any.ts | 94 +- src/google/protobuf/descriptor.ts | 1510 +++++++++++------ src/google/protobuf/duration.ts | 53 +- src/google/protobuf/timestamp.ts | 60 +- src/helpers.ts | 231 +++ src/ibc/applications/transfer/v1/genesis.ts | 55 +- src/ibc/applications/transfer/v1/query.ts | 149 +- src/ibc/applications/transfer/v1/transfer.ts | 64 +- src/ibc/applications/transfer/v1/tx.ts | 83 +- src/ibc/applications/transfer/v2/packet.ts | 57 +- src/ibc/core/channel/v1/channel.ts | 274 +-- src/ibc/core/channel/v1/genesis.ts | 85 +- src/ibc/core/channel/v1/query.ts | 738 +++++--- src/ibc/core/channel/v1/tx.ts | 394 +++-- src/ibc/core/client/v1/client.ts | 169 +- src/ibc/core/client/v1/genesis.ts | 140 +- src/ibc/core/client/v1/query.ts | 384 +++-- src/ibc/core/client/v1/tx.ts | 209 +-- src/ibc/core/commitment/v1/commitment.ts | 138 +- src/ibc/core/connection/v1/connection.ts | 209 ++- src/ibc/core/connection/v1/genesis.ts | 57 +- src/ibc/core/connection/v1/query.ts | 325 ++-- src/ibc/core/connection/v1/tx.ts | 257 +-- src/ibc/core/types/v1/genesis.ts | 67 +- .../lightclients/localhost/v1/localhost.ts | 51 +- .../solomachine/v1/solomachine.ts | 405 +++-- .../lightclients/tendermint/v1/tendermint.ts | 312 ++-- src/tendermint/abci/types.ts | 1446 ++++++++++------ src/tendermint/crypto/keys.ts | 96 +- src/tendermint/crypto/proof.ts | 169 +- src/tendermint/p2p/types.ts | 153 +- src/tendermint/types/block.ts | 63 +- src/tendermint/types/evidence.ts | 141 +- src/tendermint/types/params.ts | 166 +- src/tendermint/types/types.ts | 436 +++-- src/tendermint/types/validator.ts | 135 +- src/tendermint/version/types.ts | 68 +- 116 files changed, 12872 insertions(+), 9636 deletions(-) create mode 100644 src/helpers.ts diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 1090407a..57770368 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; 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, @@ -11,212 +8,245 @@ export enum HashOp { 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"; - case HashOp.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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) + *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"; - case LengthOp.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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. + *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. + *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. + *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. + *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; + leaf: LeafOp; 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. + *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; - right?: ExistenceProof; + left: ExistenceProof; + right: ExistenceProof; } - /** 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; + exist?: ExistenceProof; + nonexist?: NonExistenceProof; + batch?: BatchProof; + compressed?: CompressedBatchProof; } - /** * 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. + *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 + *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) + *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) + *Then combine the bytes, and hash it + *output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) */ + export interface LeafOp { hash: HashOp; prehashKey: HashOp; @@ -226,67 +256,70 @@ export interface LeafOp { * 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. + *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 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) + *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. + *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 + *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. + *This can be stored in the client and used to validate any incoming proofs. * - * verify(ProofSpec, Proof) -> Proof | Error + *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. + *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; - innerSpec?: InnerSpec; + leafSpec: LeafOp; + innerSpec: InnerSpec; /** 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. + *given store are neighbors. * - * This enables: + *This enables: * - * isLeftMost(spec: InnerSpec, op: InnerOp) - * isRightMost(spec: InnerSpec, op: InnerOp) - * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) + *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 @@ -298,50 +331,55 @@ export interface InnerSpec { 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; + exist?: ExistenceProof; + nonexist?: NonExistenceProof; } - export interface CompressedBatchProof { entries: CompressedBatchEntry[]; lookupInners: InnerOp[]; } - /** Use BatchEntry not CommitmentProof, to avoid recursion */ + export interface CompressedBatchEntry { - exist?: CompressedExistenceProof | undefined; - nonexist?: CompressedNonExistenceProof | undefined; + exist?: CompressedExistenceProof; + nonexist?: CompressedNonExistenceProof; } - export interface CompressedExistenceProof { key: Uint8Array; value: Uint8Array; - leaf?: LeafOp; + leaf: LeafOp; /** 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; - right?: CompressedExistenceProof; + left: CompressedExistenceProof; + right: CompressedExistenceProof; } function createBaseExistenceProof(): ExistenceProof { - return { key: new Uint8Array(), value: new Uint8Array(), leaf: undefined, path: [] }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + leaf: undefined, + path: [], + }; } export const ExistenceProof = { @@ -349,15 +387,19 @@ export const ExistenceProof = { 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; }, @@ -365,26 +407,33 @@ export const ExistenceProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseExistenceProof(); + 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; }, @@ -404,11 +453,13 @@ export const ExistenceProof = { 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; }, @@ -424,7 +475,11 @@ export const ExistenceProof = { }; function createBaseNonExistenceProof(): NonExistenceProof { - return { key: new Uint8Array(), left: undefined, right: undefined }; + return { + key: new Uint8Array(), + left: undefined, + right: undefined, + }; } export const NonExistenceProof = { @@ -432,12 +487,15 @@ export const NonExistenceProof = { 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; }, @@ -445,23 +503,29 @@ export const NonExistenceProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNonExistenceProof(); + 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; }, @@ -497,7 +561,12 @@ export const NonExistenceProof = { }; function createBaseCommitmentProof(): CommitmentProof { - return { exist: undefined, nonexist: undefined, batch: undefined, compressed: undefined }; + return { + exist: undefined, + nonexist: undefined, + batch: undefined, + compressed: undefined, + }; } export const CommitmentProof = { @@ -505,15 +574,19 @@ export const CommitmentProof = { 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; }, @@ -521,26 +594,33 @@ export const CommitmentProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommitmentProof(); + 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; }, @@ -586,7 +666,13 @@ export const CommitmentProof = { }; function createBaseLeafOp(): LeafOp { - return { hash: 0, prehashKey: 0, prehashValue: 0, length: 0, prefix: new Uint8Array() }; + return { + hash: 0, + prehashKey: 0, + prehashValue: 0, + length: 0, + prefix: new Uint8Array(), + }; } export const LeafOp = { @@ -594,18 +680,23 @@ export const LeafOp = { 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; }, @@ -613,29 +704,37 @@ export const LeafOp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeafOp(); + 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; }, @@ -672,7 +771,11 @@ export const LeafOp = { }; function createBaseInnerOp(): InnerOp { - return { hash: 0, prefix: new Uint8Array(), suffix: new Uint8Array() }; + return { + hash: 0, + prefix: new Uint8Array(), + suffix: new Uint8Array(), + }; } export const InnerOp = { @@ -680,12 +783,15 @@ export const InnerOp = { 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; }, @@ -693,23 +799,29 @@ export const InnerOp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInnerOp(); + 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; }, @@ -741,7 +853,12 @@ export const InnerOp = { }; function createBaseProofSpec(): ProofSpec { - return { leafSpec: undefined, innerSpec: undefined, maxDepth: 0, minDepth: 0 }; + return { + leafSpec: undefined, + innerSpec: undefined, + maxDepth: 0, + minDepth: 0, + }; } export const ProofSpec = { @@ -749,15 +866,19 @@ export const ProofSpec = { 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; }, @@ -765,26 +886,33 @@ export const ProofSpec = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProofSpec(); + 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; }, @@ -838,25 +966,33 @@ function createBaseInnerSpec(): InnerSpec { export const InnerSpec = { encode(message: InnerSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.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; }, @@ -864,39 +1000,50 @@ export const InnerSpec = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInnerSpec(); + 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; }, @@ -913,11 +1060,13 @@ export const InnerSpec = { toJSON(message: InnerSpec): unknown { const obj: any = {}; + if (message.childOrder) { obj.childOrder = message.childOrder.map((e) => Math.round(e)); } else { obj.childOrder = []; } + message.childSize !== undefined && (obj.childSize = Math.round(message.childSize)); message.minPrefixLength !== undefined && (obj.minPrefixLength = Math.round(message.minPrefixLength)); message.maxPrefixLength !== undefined && (obj.maxPrefixLength = Math.round(message.maxPrefixLength)); @@ -942,7 +1091,9 @@ export const InnerSpec = { }; function createBaseBatchProof(): BatchProof { - return { entries: [] }; + return { + entries: [], + }; } export const BatchProof = { @@ -950,6 +1101,7 @@ export const BatchProof = { for (const v of message.entries) { BatchEntry.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -957,17 +1109,21 @@ export const BatchProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBatchProof(); + 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; }, @@ -979,11 +1135,13 @@ export const BatchProof = { 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; }, @@ -995,7 +1153,10 @@ export const BatchProof = { }; function createBaseBatchEntry(): BatchEntry { - return { exist: undefined, nonexist: undefined }; + return { + exist: undefined, + nonexist: undefined, + }; } export const BatchEntry = { @@ -1003,9 +1164,11 @@ export const BatchEntry = { 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; }, @@ -1013,20 +1176,25 @@ export const BatchEntry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBatchEntry(); + 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; }, @@ -1061,7 +1229,10 @@ export const BatchEntry = { }; function createBaseCompressedBatchProof(): CompressedBatchProof { - return { entries: [], lookupInners: [] }; + return { + entries: [], + lookupInners: [], + }; } export const CompressedBatchProof = { @@ -1069,9 +1240,11 @@ export const CompressedBatchProof = { 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; }, @@ -1079,20 +1252,25 @@ export const CompressedBatchProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompressedBatchProof(); + 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; }, @@ -1109,16 +1287,19 @@ export const CompressedBatchProof = { 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; }, @@ -1131,7 +1312,10 @@ export const CompressedBatchProof = { }; function createBaseCompressedBatchEntry(): CompressedBatchEntry { - return { exist: undefined, nonexist: undefined }; + return { + exist: undefined, + nonexist: undefined, + }; } export const CompressedBatchEntry = { @@ -1139,9 +1323,11 @@ export const CompressedBatchEntry = { 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; }, @@ -1149,20 +1335,25 @@ export const CompressedBatchEntry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompressedBatchEntry(); + 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; }, @@ -1197,7 +1388,12 @@ export const CompressedBatchEntry = { }; function createBaseCompressedExistenceProof(): CompressedExistenceProof { - return { key: new Uint8Array(), value: new Uint8Array(), leaf: undefined, path: [] }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + leaf: undefined, + path: [], + }; } export const CompressedExistenceProof = { @@ -1205,16 +1401,21 @@ export const CompressedExistenceProof = { 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; }, @@ -1223,33 +1424,42 @@ export const CompressedExistenceProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompressedExistenceProof(); + 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; }, @@ -1269,11 +1479,13 @@ export const CompressedExistenceProof = { 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) => Math.round(e)); } else { obj.path = []; } + return obj; }, @@ -1291,7 +1503,11 @@ export const CompressedExistenceProof = { }; function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof { - return { key: new Uint8Array(), left: undefined, right: undefined }; + return { + key: new Uint8Array(), + left: undefined, + right: undefined, + }; } export const CompressedNonExistenceProof = { @@ -1299,12 +1515,15 @@ export const CompressedNonExistenceProof = { 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; }, @@ -1312,23 +1531,29 @@ export const CompressedNonExistenceProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompressedNonExistenceProof(); + 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; }, @@ -1367,75 +1592,3 @@ export const CompressedNonExistenceProof = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index f136d2c9..6c198b4b 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,30 +1,28 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; 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; + pubKey: Any; accountNumber: Long; sequence: Long; } - /** ModuleAccount defines an account for modules that holds coins on a pool. */ + export interface ModuleAccount { - baseAccount?: BaseAccount; + baseAccount: BaseAccount; name: string; permissions: string[]; } - /** Params defines the parameters for the auth module. */ + export interface Params { maxMemoCharacters: Long; txSigLimit: Long; @@ -34,7 +32,12 @@ export interface Params { } function createBaseBaseAccount(): BaseAccount { - return { address: "", pubKey: undefined, accountNumber: Long.UZERO, sequence: Long.UZERO }; + return { + address: "", + pubKey: undefined, + accountNumber: Long.UZERO, + sequence: Long.UZERO, + }; } export const BaseAccount = { @@ -42,15 +45,19 @@ export const BaseAccount = { 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.isZero()) { writer.uint32(24).uint64(message.accountNumber); } + if (!message.sequence.isZero()) { writer.uint32(32).uint64(message.sequence); } + return writer; }, @@ -58,26 +65,33 @@ export const BaseAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBaseAccount(); + 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 = reader.uint64() as Long; break; + case 4: message.sequence = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -85,8 +99,8 @@ export const BaseAccount = { return { address: isSet(object.address) ? String(object.address) : "", pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO, - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + accountNumber: isSet(object.accountNumber) ? Long.fromString(object.accountNumber) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -118,7 +132,11 @@ export const BaseAccount = { }; function createBaseModuleAccount(): ModuleAccount { - return { baseAccount: undefined, name: "", permissions: [] }; + return { + baseAccount: undefined, + name: "", + permissions: [], + }; } export const ModuleAccount = { @@ -126,12 +144,15 @@ export const ModuleAccount = { 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; }, @@ -139,23 +160,29 @@ export const ModuleAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleAccount(); + 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; }, @@ -172,11 +199,13 @@ export const ModuleAccount = { 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; }, @@ -207,18 +236,23 @@ export const Params = { if (!message.maxMemoCharacters.isZero()) { writer.uint32(8).uint64(message.maxMemoCharacters); } + if (!message.txSigLimit.isZero()) { writer.uint32(16).uint64(message.txSigLimit); } + if (!message.txSizeCostPerByte.isZero()) { writer.uint32(24).uint64(message.txSizeCostPerByte); } + if (!message.sigVerifyCostEd25519.isZero()) { writer.uint32(32).uint64(message.sigVerifyCostEd25519); } + if (!message.sigVerifyCostSecp256k1.isZero()) { writer.uint32(40).uint64(message.sigVerifyCostSecp256k1); } + return writer; }, @@ -226,46 +260,54 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxMemoCharacters = reader.uint64() as Long; break; + case 2: message.txSigLimit = reader.uint64() as Long; break; + case 3: message.txSizeCostPerByte = reader.uint64() as Long; break; + case 4: message.sigVerifyCostEd25519 = reader.uint64() as Long; break; + case 5: message.sigVerifyCostSecp256k1 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Params { return { maxMemoCharacters: isSet(object.maxMemoCharacters) - ? Long.fromValue(object.maxMemoCharacters) + ? Long.fromString(object.maxMemoCharacters) : Long.UZERO, - txSigLimit: isSet(object.txSigLimit) ? Long.fromValue(object.txSigLimit) : Long.UZERO, + txSigLimit: isSet(object.txSigLimit) ? Long.fromString(object.txSigLimit) : Long.UZERO, txSizeCostPerByte: isSet(object.txSizeCostPerByte) - ? Long.fromValue(object.txSizeCostPerByte) + ? Long.fromString(object.txSizeCostPerByte) : Long.UZERO, sigVerifyCostEd25519: isSet(object.sigVerifyCostEd25519) - ? Long.fromValue(object.sigVerifyCostEd25519) + ? Long.fromString(object.sigVerifyCostEd25519) : Long.UZERO, sigVerifyCostSecp256k1: isSet(object.sigVerifyCostSecp256k1) - ? Long.fromValue(object.sigVerifyCostSecp256k1) + ? Long.fromString(object.sigVerifyCostSecp256k1) : Long.UZERO, }; }, @@ -309,31 +351,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 8986482f..6d284939 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,21 +1,23 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; - +import { Any } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; - /** GenesisState defines the auth module's genesis state. */ + export interface GenesisState { /** params defines all the paramaters of the module. */ - params?: Params; + params: Params; /** accounts are the accounts present at genesis. */ + accounts: Any[]; } function createBaseGenesisState(): GenesisState { - return { params: undefined, accounts: [] }; + return { + params: undefined, + accounts: [], + }; } export const GenesisState = { @@ -23,9 +25,11 @@ export const GenesisState = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + for (const v of message.accounts) { Any.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -33,20 +37,25 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.params = Params.decode(reader, reader.uint32()); break; + case 2: message.accounts.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -60,11 +69,13 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); + if (message.accounts) { obj.accounts = message.accounts.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.accounts = []; } + return obj; }, @@ -76,31 +87,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index e806a24f..13ef63d6 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,57 +1,58 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; +import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; - /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. * * Since: cosmos-sdk 0.43 */ + export interface QueryAccountsRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * QueryAccountsResponse is the response type for the Query/Accounts RPC method. * * Since: cosmos-sdk 0.43 */ + export interface QueryAccountsResponse { /** accounts are the existing accounts */ accounts: Any[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** QueryAccountRequest is the request type for the Query/Account RPC method. */ + export interface QueryAccountRequest { /** address defines the address to query for. */ address: string; } - /** QueryAccountResponse is the response type for the Query/Account RPC method. */ + export interface QueryAccountResponse { /** account defines the account of the corresponding address. */ - account?: Any; + account: Any; } - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; + params: Params; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryAccountsRequest = { @@ -59,6 +60,7 @@ export const QueryAccountsRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -66,22 +68,28 @@ export const QueryAccountsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAccountsRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryAccountsRequest): unknown { @@ -102,7 +110,10 @@ export const QueryAccountsRequest = { }; function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { accounts: [], pagination: undefined }; + return { + accounts: [], + pagination: undefined, + }; } export const QueryAccountsResponse = { @@ -110,9 +121,11 @@ export const QueryAccountsResponse = { for (const v of message.accounts) { Any.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -120,20 +133,25 @@ export const QueryAccountsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.accounts.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; }, @@ -146,11 +164,13 @@ export const QueryAccountsResponse = { toJSON(message: QueryAccountsResponse): unknown { const obj: any = {}; + if (message.accounts) { obj.accounts = message.accounts.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.accounts = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -168,7 +188,9 @@ export const QueryAccountsResponse = { }; function createBaseQueryAccountRequest(): QueryAccountRequest { - return { address: "" }; + return { + address: "", + }; } export const QueryAccountRequest = { @@ -176,6 +198,7 @@ export const QueryAccountRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + return writer; }, @@ -183,22 +206,28 @@ export const QueryAccountRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAccountRequest { - return { address: isSet(object.address) ? String(object.address) : "" }; + return { + address: isSet(object.address) ? String(object.address) : "", + }; }, toJSON(message: QueryAccountRequest): unknown { @@ -215,7 +244,9 @@ export const QueryAccountRequest = { }; function createBaseQueryAccountResponse(): QueryAccountResponse { - return { account: undefined }; + return { + account: undefined, + }; } export const QueryAccountResponse = { @@ -223,6 +254,7 @@ export const QueryAccountResponse = { if (message.account !== undefined) { Any.encode(message.account, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -230,22 +262,28 @@ export const QueryAccountResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.account = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAccountResponse { - return { account: isSet(object.account) ? Any.fromJSON(object.account) : undefined }; + return { + account: isSet(object.account) ? Any.fromJSON(object.account) : undefined, + }; }, toJSON(message: QueryAccountResponse): unknown { @@ -276,14 +314,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -303,7 +344,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -311,6 +354,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -318,22 +362,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -349,30 +399,35 @@ export const QueryParamsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query defines the gRPC querier service. */ export interface Query { - /** - * Accounts returns all the existing accounts - * - * Since: cosmos-sdk 0.43 - */ - Accounts(request: QueryAccountsRequest): Promise; - /** Account returns account details based on address. */ + Accounts(request?: QueryAccountsRequest): Promise; + /*Accounts returns all the existing accounts + + Since: cosmos-sdk 0.43*/ + Account(request: QueryAccountRequest): Promise; - /** Params queries all parameters. */ - Params(request: QueryParamsRequest): Promise; -} + /*Account returns account details based on address.*/ + Params(request?: QueryParamsRequest): Promise; + /*Params queries all parameters.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Accounts = this.Accounts.bind(this); this.Account = this.Account.bind(this); this.Params = this.Params.bind(this); } - Accounts(request: QueryAccountsRequest): Promise { + + Accounts( + request: QueryAccountsRequest = { + pagination: undefined, + }, + ): Promise { const data = QueryAccountsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Accounts", data); return promise.then((data) => QueryAccountsResponse.decode(new _m0.Reader(data))); @@ -384,41 +439,9 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryAccountResponse.decode(new _m0.Reader(data))); } - Params(request: QueryParamsRequest): Promise { + Params(request: QueryParamsRequest = {}): Promise { const data = QueryParamsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "Params", data); return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 058e4e4c..f31d89ef 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,46 +1,44 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** * GenericAuthorization gives the grantee unrestricted permissions to execute * the provided method on behalf of the granter's account. */ + export interface GenericAuthorization { /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ msg: string; } - /** * Grant gives permissions to execute * the provide method with expiration time. */ + export interface Grant { - authorization?: Any; - expiration?: Timestamp; + authorization: Any; + expiration: Timestamp; } - /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. * It is used in genesis.proto and query.proto * * Since: cosmos-sdk 0.45.2 */ + export interface GrantAuthorization { granter: string; grantee: string; - authorization?: Any; - expiration?: Timestamp; + authorization: Any; + expiration: Timestamp; } function createBaseGenericAuthorization(): GenericAuthorization { - return { msg: "" }; + return { + msg: "", + }; } export const GenericAuthorization = { @@ -48,6 +46,7 @@ export const GenericAuthorization = { if (message.msg !== "") { writer.uint32(10).string(message.msg); } + return writer; }, @@ -55,22 +54,28 @@ export const GenericAuthorization = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenericAuthorization(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.msg = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GenericAuthorization { - return { msg: isSet(object.msg) ? String(object.msg) : "" }; + return { + msg: isSet(object.msg) ? String(object.msg) : "", + }; }, toJSON(message: GenericAuthorization): unknown { @@ -87,7 +92,10 @@ export const GenericAuthorization = { }; function createBaseGrant(): Grant { - return { authorization: undefined, expiration: undefined }; + return { + authorization: undefined, + expiration: undefined, + }; } export const Grant = { @@ -95,9 +103,11 @@ export const Grant = { if (message.authorization !== undefined) { Any.encode(message.authorization, writer.uint32(10).fork()).ldelim(); } + if (message.expiration !== undefined) { Timestamp.encode(message.expiration, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -105,20 +115,25 @@ export const Grant = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGrant(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.authorization = Any.decode(reader, reader.uint32()); break; + case 2: message.expiration = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -152,7 +167,12 @@ export const Grant = { }; function createBaseGrantAuthorization(): GrantAuthorization { - return { granter: "", grantee: "", authorization: undefined, expiration: undefined }; + return { + granter: "", + grantee: "", + authorization: undefined, + expiration: undefined, + }; } export const GrantAuthorization = { @@ -160,15 +180,19 @@ export const GrantAuthorization = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.authorization !== undefined) { Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); } + if (message.expiration !== undefined) { Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -176,26 +200,33 @@ export const GrantAuthorization = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGrantAuthorization(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.authorization = Any.decode(reader, reader.uint32()); break; + case 4: message.expiration = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -233,57 +264,3 @@ export const GrantAuthorization = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 6ac18a6c..9e050b83 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,19 +1,16 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { GrantAuthorization } from "./authz"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** GenesisState defines the authz module's genesis state. */ + export interface GenesisState { authorization: GrantAuthorization[]; } function createBaseGenesisState(): GenesisState { - return { authorization: [] }; + return { + authorization: [], + }; } export const GenesisState = { @@ -21,6 +18,7 @@ export const GenesisState = { for (const v of message.authorization) { GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -28,17 +26,21 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.authorization.push(GrantAuthorization.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -52,11 +54,13 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; + if (message.authorization) { obj.authorization = message.authorization.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); } else { obj.authorization = []; } + return obj; }, @@ -66,27 +70,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index e185abc3..0aedb41a 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,63 +1,71 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ + export interface QueryGrantsRequest { - granter: string; - grantee: string; + granter?: string; + grantee?: string; /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msgTypeUrl: string; + + msgTypeUrl?: string; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ + export interface QueryGrantsResponse { /** authorizations is a list of grants granted for grantee by granter. */ grants: Grant[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } - /** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ + export interface QueryGranterGrantsRequest { granter: string; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ + export interface QueryGranterGrantsResponse { /** grants is a list of grants granted by the granter. */ grants: GrantAuthorization[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } - /** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ + export interface QueryGranteeGrantsRequest { grantee: string; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ + export interface QueryGranteeGrantsResponse { /** grants is a list of grants granted to the grantee. */ grants: GrantAuthorization[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } function createBaseQueryGrantsRequest(): QueryGrantsRequest { - return { granter: "", grantee: "", msgTypeUrl: "", pagination: undefined }; + return { + granter: "", + grantee: "", + msgTypeUrl: "", + pagination: undefined, + }; } export const QueryGrantsRequest = { @@ -65,15 +73,19 @@ export const QueryGrantsRequest = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.msgTypeUrl !== "") { writer.uint32(26).string(message.msgTypeUrl); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -81,26 +93,33 @@ export const QueryGrantsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGrantsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.msgTypeUrl = reader.string(); break; + case 4: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -137,7 +156,10 @@ export const QueryGrantsRequest = { }; function createBaseQueryGrantsResponse(): QueryGrantsResponse { - return { grants: [], pagination: undefined }; + return { + grants: [], + pagination: undefined, + }; } export const QueryGrantsResponse = { @@ -145,9 +167,11 @@ export const QueryGrantsResponse = { for (const v of message.grants) { Grant.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -155,20 +179,25 @@ export const QueryGrantsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGrantsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grants.push(Grant.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -181,11 +210,13 @@ export const QueryGrantsResponse = { toJSON(message: QueryGrantsResponse): unknown { const obj: any = {}; + if (message.grants) { obj.grants = message.grants.map((e) => (e ? Grant.toJSON(e) : undefined)); } else { obj.grants = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -203,7 +234,10 @@ export const QueryGrantsResponse = { }; function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { - return { granter: "", pagination: undefined }; + return { + granter: "", + pagination: undefined, + }; } export const QueryGranterGrantsRequest = { @@ -211,9 +245,11 @@ export const QueryGranterGrantsRequest = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -221,20 +257,25 @@ export const QueryGranterGrantsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGranterGrantsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -267,7 +308,10 @@ export const QueryGranterGrantsRequest = { }; function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { - return { grants: [], pagination: undefined }; + return { + grants: [], + pagination: undefined, + }; } export const QueryGranterGrantsResponse = { @@ -275,9 +319,11 @@ export const QueryGranterGrantsResponse = { for (const v of message.grants) { GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -285,20 +331,25 @@ export const QueryGranterGrantsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGranterGrantsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -313,11 +364,13 @@ export const QueryGranterGrantsResponse = { toJSON(message: QueryGranterGrantsResponse): unknown { const obj: any = {}; + if (message.grants) { obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); } else { obj.grants = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -337,7 +390,10 @@ export const QueryGranterGrantsResponse = { }; function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { - return { grantee: "", pagination: undefined }; + return { + grantee: "", + pagination: undefined, + }; } export const QueryGranteeGrantsRequest = { @@ -345,9 +401,11 @@ export const QueryGranteeGrantsRequest = { if (message.grantee !== "") { writer.uint32(10).string(message.grantee); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -355,20 +413,25 @@ export const QueryGranteeGrantsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGranteeGrantsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grantee = reader.string(); break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -401,7 +464,10 @@ export const QueryGranteeGrantsRequest = { }; function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { - return { grants: [], pagination: undefined }; + return { + grants: [], + pagination: undefined, + }; } export const QueryGranteeGrantsResponse = { @@ -409,9 +475,11 @@ export const QueryGranteeGrantsResponse = { for (const v of message.grants) { GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -419,20 +487,25 @@ export const QueryGranteeGrantsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGranteeGrantsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grants.push(GrantAuthorization.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -447,11 +520,13 @@ export const QueryGranteeGrantsResponse = { toJSON(message: QueryGranteeGrantsResponse): unknown { const obj: any = {}; + if (message.grants) { obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); } else { obj.grants = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -469,33 +544,32 @@ export const QueryGranteeGrantsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query defines the gRPC querier service. */ export interface Query { - /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: QueryGrantsRequest): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.45.2 - */ + /*Returns list of `Authorization`, granted to the grantee by the granter.*/ + GranterGrants(request: QueryGranterGrantsRequest): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.45.2 - */ + /*GranterGrants returns list of `GrantAuthorization`, granted by granter. + + Since: cosmos-sdk 0.45.2*/ + GranteeGrants(request: QueryGranteeGrantsRequest): Promise; + /*GranteeGrants returns a list of `GrantAuthorization` by grantee. + + Since: cosmos-sdk 0.45.2*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Grants = this.Grants.bind(this); this.GranterGrants = this.GranterGrants.bind(this); this.GranteeGrants = this.GranteeGrants.bind(this); } + Grants(request: QueryGrantsRequest): Promise { const data = QueryGrantsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data); @@ -514,35 +588,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryGranteeGrantsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 50b5e648..fa691fec 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,33 +1,29 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; import { Grant } from "./authz"; - +import { Any } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee * on behalf of the granter with the provided expiration time. */ + export interface MsgGrant { granter: string; grantee: string; - grant?: Grant; + grant: Grant; } - /** MsgExecResponse defines the Msg/MsgExecResponse response type. */ + export interface MsgExecResponse { results: Uint8Array[]; } - /** * MsgExec attempts to execute the provided messages using * authorizations granted to the grantee. Each message should have only * one signer corresponding to the granter of the authorization. */ + export interface MsgExec { grantee: string; /** @@ -35,27 +31,32 @@ export interface MsgExec { * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) * triple and validate it. */ + msgs: Any[]; } - /** MsgGrantResponse defines the Msg/MsgGrant response type. */ -export interface MsgGrantResponse {} +export interface MsgGrantResponse {} /** * MsgRevoke revokes any authorization with the provided sdk.Msg type on the * granter's account with that has been granted to the grantee. */ + export interface MsgRevoke { granter: string; grantee: string; msgTypeUrl: string; } - /** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ + export interface MsgRevokeResponse {} function createBaseMsgGrant(): MsgGrant { - return { granter: "", grantee: "", grant: undefined }; + return { + granter: "", + grantee: "", + grant: undefined, + }; } export const MsgGrant = { @@ -63,12 +64,15 @@ export const MsgGrant = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.grant !== undefined) { Grant.encode(message.grant, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -76,23 +80,29 @@ export const MsgGrant = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGrant(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.grant = Grant.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -123,7 +133,9 @@ export const MsgGrant = { }; function createBaseMsgExecResponse(): MsgExecResponse { - return { results: [] }; + return { + results: [], + }; } export const MsgExecResponse = { @@ -131,6 +143,7 @@ export const MsgExecResponse = { for (const v of message.results) { writer.uint32(10).bytes(v!); } + return writer; }, @@ -138,17 +151,21 @@ export const MsgExecResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgExecResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.results.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -160,11 +177,13 @@ export const MsgExecResponse = { toJSON(message: MsgExecResponse): unknown { const obj: any = {}; + if (message.results) { obj.results = message.results.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); } else { obj.results = []; } + return obj; }, @@ -176,7 +195,10 @@ export const MsgExecResponse = { }; function createBaseMsgExec(): MsgExec { - return { grantee: "", msgs: [] }; + return { + grantee: "", + msgs: [], + }; } export const MsgExec = { @@ -184,9 +206,11 @@ export const MsgExec = { if (message.grantee !== "") { writer.uint32(10).string(message.grantee); } + for (const v of message.msgs) { Any.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -194,20 +218,25 @@ export const MsgExec = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgExec(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grantee = reader.string(); break; + case 2: message.msgs.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -221,11 +250,13 @@ export const MsgExec = { toJSON(message: MsgExec): unknown { const obj: any = {}; message.grantee !== undefined && (obj.grantee = message.grantee); + if (message.msgs) { obj.msgs = message.msgs.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.msgs = []; } + return obj; }, @@ -250,14 +281,17 @@ export const MsgGrantResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGrantResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -277,7 +311,11 @@ export const MsgGrantResponse = { }; function createBaseMsgRevoke(): MsgRevoke { - return { granter: "", grantee: "", msgTypeUrl: "" }; + return { + granter: "", + grantee: "", + msgTypeUrl: "", + }; } export const MsgRevoke = { @@ -285,12 +323,15 @@ export const MsgRevoke = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.msgTypeUrl !== "") { writer.uint32(26).string(message.msgTypeUrl); } + return writer; }, @@ -298,23 +339,29 @@ export const MsgRevoke = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevoke(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.msgTypeUrl = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -356,14 +403,17 @@ export const MsgRevokeResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -381,37 +431,34 @@ export const MsgRevokeResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the authz Msg service. */ export interface Msg { - /** - * Grant grants the provided authorization to the grantee on the granter's - * account with the provided expiration time. If there is already a grant - * for the given (granter, grantee, Authorization) triple, then the grant - * will be overwritten. - */ Grant(request: MsgGrant): Promise; - /** - * Exec attempts to execute the provided messages using - * authorizations granted to the grantee. Each message should have only - * one signer corresponding to the granter of the authorization. - */ + /*Grant grants the provided authorization to the grantee on the granter's + account with the provided expiration time. If there is already a grant + for the given (granter, grantee, Authorization) triple, then the grant + will be overwritten.*/ + Exec(request: MsgExec): Promise; - /** - * Revoke revokes any authorization corresponding to the provided method name on the - * granter's account that has been granted to the grantee. - */ + /*Exec attempts to execute the provided messages using + authorizations granted to the grantee. Each message should have only + one signer corresponding to the granter of the authorization.*/ + Revoke(request: MsgRevoke): Promise; + /*Revoke revokes any authorization corresponding to the provided method name on the + granter's account that has been granted to the grantee.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Grant = this.Grant.bind(this); this.Exec = this.Exec.bind(this); this.Revoke = this.Revoke.bind(this); } + Grant(request: MsgGrant): Promise { const data = MsgGrant.encode(request).finish(); const promise = this.rpc.request("cosmos.authz.v1beta1.Msg", "Grant", data); @@ -430,79 +477,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgRevokeResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index b4efc666..503a188a 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,22 +1,22 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; - /** * SendAuthorization allows the grantee to spend up to spend_limit coins from * the granter's account. * * Since: cosmos-sdk 0.43 */ + export interface SendAuthorization { spendLimit: Coin[]; } function createBaseSendAuthorization(): SendAuthorization { - return { spendLimit: [] }; + return { + spendLimit: [], + }; } export const SendAuthorization = { @@ -24,6 +24,7 @@ export const SendAuthorization = { for (const v of message.spendLimit) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -31,17 +32,21 @@ export const SendAuthorization = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSendAuthorization(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.spendLimit.push(Coin.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -55,11 +60,13 @@ export const SendAuthorization = { toJSON(message: SendAuthorization): unknown { const obj: any = {}; + if (message.spendLimit) { obj.spendLimit = message.spendLimit.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.spendLimit = []; } + return obj; }, @@ -69,27 +76,3 @@ export const SendAuthorization = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 1b622bec..09169757 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,52 +1,50 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; 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. * This message is deprecated now that supply is indexed by denom. - * - * @deprecated */ + +/** @deprecated */ + 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; @@ -57,31 +55,37 @@ export interface DenomUnit { * (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; /** * name defines the name of the token (eg: Cosmos Atom) * * Since: cosmos-sdk 0.43 */ + name: string; /** * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can @@ -89,11 +93,15 @@ export interface Metadata { * * Since: cosmos-sdk 0.43 */ + symbol: string; } function createBaseParams(): Params { - return { sendEnabled: [], defaultSendEnabled: false }; + return { + sendEnabled: [], + defaultSendEnabled: false, + }; } export const Params = { @@ -101,9 +109,11 @@ export const Params = { 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; }, @@ -111,20 +121,25 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + 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; }, @@ -139,11 +154,13 @@ export const Params = { 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; }, @@ -157,7 +174,10 @@ export const Params = { }; function createBaseSendEnabled(): SendEnabled { - return { denom: "", enabled: false }; + return { + denom: "", + enabled: false, + }; } export const SendEnabled = { @@ -165,9 +185,11 @@ export const SendEnabled = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + if (message.enabled === true) { writer.uint32(16).bool(message.enabled); } + return writer; }, @@ -175,20 +197,25 @@ export const SendEnabled = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSendEnabled(); + 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; }, @@ -215,7 +242,10 @@ export const SendEnabled = { }; function createBaseInput(): Input { - return { address: "", coins: [] }; + return { + address: "", + coins: [], + }; } export const Input = { @@ -223,9 +253,11 @@ export const Input = { 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; }, @@ -233,20 +265,25 @@ export const Input = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInput(); + 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; }, @@ -260,11 +297,13 @@ export const Input = { 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; }, @@ -277,7 +316,10 @@ export const Input = { }; function createBaseOutput(): Output { - return { address: "", coins: [] }; + return { + address: "", + coins: [], + }; } export const Output = { @@ -285,9 +327,11 @@ export const Output = { 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; }, @@ -295,20 +339,25 @@ export const Output = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOutput(); + 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; }, @@ -322,11 +371,13 @@ export const Output = { 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; }, @@ -339,7 +390,9 @@ export const Output = { }; function createBaseSupply(): Supply { - return { total: [] }; + return { + total: [], + }; } export const Supply = { @@ -347,6 +400,7 @@ export const Supply = { for (const v of message.total) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -354,31 +408,39 @@ export const Supply = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSupply(); + 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 { - return { total: Array.isArray(object?.total) ? object.total.map((e: any) => Coin.fromJSON(e)) : [] }; + return { + total: Array.isArray(object?.total) ? object.total.map((e: any) => Coin.fromJSON(e)) : [], + }; }, 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; }, @@ -390,7 +452,11 @@ export const Supply = { }; function createBaseDenomUnit(): DenomUnit { - return { denom: "", exponent: 0, aliases: [] }; + return { + denom: "", + exponent: 0, + aliases: [], + }; } export const DenomUnit = { @@ -398,12 +464,15 @@ export const DenomUnit = { 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; }, @@ -411,23 +480,29 @@ export const DenomUnit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDenomUnit(); + 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; }, @@ -443,11 +518,13 @@ export const DenomUnit = { const obj: any = {}; message.denom !== undefined && (obj.denom = message.denom); message.exponent !== undefined && (obj.exponent = Math.round(message.exponent)); + if (message.aliases) { obj.aliases = message.aliases.map((e) => e); } else { obj.aliases = []; } + return obj; }, @@ -461,7 +538,14 @@ export const DenomUnit = { }; function createBaseMetadata(): Metadata { - return { description: "", denomUnits: [], base: "", display: "", name: "", symbol: "" }; + return { + description: "", + denomUnits: [], + base: "", + display: "", + name: "", + symbol: "", + }; } export const Metadata = { @@ -469,21 +553,27 @@ export const Metadata = { 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); } + if (message.name !== "") { writer.uint32(42).string(message.name); } + if (message.symbol !== "") { writer.uint32(50).string(message.symbol); } + return writer; }, @@ -491,32 +581,41 @@ export const Metadata = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMetadata(); + 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; + case 5: message.name = reader.string(); break; + case 6: message.symbol = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -536,11 +635,13 @@ export const Metadata = { 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); message.name !== undefined && (obj.name = message.name); @@ -559,31 +660,3 @@ export const Metadata = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index c5976d87..05637bba 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,39 +1,46 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; -import { Metadata, Params } from "./bank"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; 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; + params: Params; /** balances is an array containing the balances of all the accounts. */ + balances: Balance[]; /** * supply represents the total supply. If it is left empty, then supply will be calculated based on the provided * balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. */ + 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[]; } function createBaseGenesisState(): GenesisState { - return { params: undefined, balances: [], supply: [], denomMetadata: [] }; + return { + params: undefined, + balances: [], + supply: [], + denomMetadata: [], + }; } export const GenesisState = { @@ -41,15 +48,19 @@ export const GenesisState = { 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; }, @@ -57,26 +68,33 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -94,21 +112,25 @@ export const GenesisState = { 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; }, @@ -124,7 +146,10 @@ export const GenesisState = { }; function createBaseBalance(): Balance { - return { address: "", coins: [] }; + return { + address: "", + coins: [], + }; } export const Balance = { @@ -132,9 +157,11 @@ export const Balance = { 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; }, @@ -142,20 +169,25 @@ export const Balance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBalance(); + 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; }, @@ -169,11 +201,13 @@ export const Balance = { 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; }, @@ -184,31 +218,3 @@ export const Balance = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 7c612e09..ff9c1a7e 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,71 +1,74 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; -import { Metadata, Params } from "./bank"; - +import { Params, Metadata } from "./bank"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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; -} + 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; + balance: Coin; } - /** 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; } - /** * 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; } - /** * QuerySpendableBalancesRequest defines the gRPC request structure for querying * an account's spendable balances. */ + export interface QuerySpendableBalancesRequest { /** address is the address to query spendable balances for. */ address: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * QuerySpendableBalancesResponse defines the gRPC response structure for querying * an account's spendable balances. */ + export interface QuerySpendableBalancesResponse { /** balances is the spendable balances of all the coins. */ balances: Coin[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC * method. */ + export interface QueryTotalSupplyRequest { /** * pagination defines an optional pagination for the request. @@ -74,11 +77,11 @@ export interface QueryTotalSupplyRequest { */ pagination?: PageRequest; } - /** * QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC * method */ + export interface QueryTotalSupplyResponse { /** supply is the supply of the coins */ supply: Coin[]; @@ -87,63 +90,68 @@ export interface QueryTotalSupplyResponse { * * Since: cosmos-sdk 0.43 */ + pagination?: PageResponse; } - /** 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; + amount: Coin; } - /** QueryParamsRequest defines the request type for querying x/bank parameters. */ -export interface QueryParamsRequest {} +export interface QueryParamsRequest {} /** QueryParamsResponse defines the response type for querying x/bank parameters. */ + export interface QueryParamsResponse { - params?: Params; + params: Params; } - /** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ + export interface QueryDenomsMetadataRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * 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; } - /** 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; + metadata: Metadata; } function createBaseQueryBalanceRequest(): QueryBalanceRequest { - return { address: "", denom: "" }; + return { + address: "", + denom: "", + }; } export const QueryBalanceRequest = { @@ -151,9 +159,11 @@ export const QueryBalanceRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.denom !== "") { writer.uint32(18).string(message.denom); } + return writer; }, @@ -161,20 +171,25 @@ export const QueryBalanceRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBalanceRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.denom = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -201,7 +216,9 @@ export const QueryBalanceRequest = { }; function createBaseQueryBalanceResponse(): QueryBalanceResponse { - return { balance: undefined }; + return { + balance: undefined, + }; } export const QueryBalanceResponse = { @@ -209,6 +226,7 @@ export const QueryBalanceResponse = { if (message.balance !== undefined) { Coin.encode(message.balance, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -216,22 +234,28 @@ export const QueryBalanceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBalanceResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.balance = Coin.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryBalanceResponse { - return { balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined }; + return { + balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined, + }; }, toJSON(message: QueryBalanceResponse): unknown { @@ -250,7 +274,10 @@ export const QueryBalanceResponse = { }; function createBaseQueryAllBalancesRequest(): QueryAllBalancesRequest { - return { address: "", pagination: undefined }; + return { + address: "", + pagination: undefined, + }; } export const QueryAllBalancesRequest = { @@ -258,9 +285,11 @@ export const QueryAllBalancesRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -268,20 +297,25 @@ export const QueryAllBalancesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllBalancesRequest(); + 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; }, @@ -312,7 +346,10 @@ export const QueryAllBalancesRequest = { }; function createBaseQueryAllBalancesResponse(): QueryAllBalancesResponse { - return { balances: [], pagination: undefined }; + return { + balances: [], + pagination: undefined, + }; } export const QueryAllBalancesResponse = { @@ -320,9 +357,11 @@ export const QueryAllBalancesResponse = { 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; }, @@ -330,20 +369,25 @@ export const QueryAllBalancesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllBalancesResponse(); + 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; }, @@ -356,11 +400,13 @@ export const QueryAllBalancesResponse = { 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; @@ -380,7 +426,10 @@ export const QueryAllBalancesResponse = { }; function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { - return { address: "", pagination: undefined }; + return { + address: "", + pagination: undefined, + }; } export const QuerySpendableBalancesRequest = { @@ -388,9 +437,11 @@ export const QuerySpendableBalancesRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -398,20 +449,25 @@ export const QuerySpendableBalancesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySpendableBalancesRequest(); + 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; }, @@ -444,7 +500,10 @@ export const QuerySpendableBalancesRequest = { }; function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { - return { balances: [], pagination: undefined }; + return { + balances: [], + pagination: undefined, + }; } export const QuerySpendableBalancesResponse = { @@ -452,9 +511,11 @@ export const QuerySpendableBalancesResponse = { 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; }, @@ -462,20 +523,25 @@ export const QuerySpendableBalancesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySpendableBalancesResponse(); + 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; }, @@ -488,11 +554,13 @@ export const QuerySpendableBalancesResponse = { toJSON(message: QuerySpendableBalancesResponse): 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; @@ -512,7 +580,9 @@ export const QuerySpendableBalancesResponse = { }; function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryTotalSupplyRequest = { @@ -520,6 +590,7 @@ export const QueryTotalSupplyRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -527,22 +598,28 @@ export const QueryTotalSupplyRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryTotalSupplyRequest(); + 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): QueryTotalSupplyRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryTotalSupplyRequest): unknown { @@ -563,7 +640,10 @@ export const QueryTotalSupplyRequest = { }; function createBaseQueryTotalSupplyResponse(): QueryTotalSupplyResponse { - return { supply: [], pagination: undefined }; + return { + supply: [], + pagination: undefined, + }; } export const QueryTotalSupplyResponse = { @@ -571,9 +651,11 @@ export const QueryTotalSupplyResponse = { for (const v of message.supply) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -581,20 +663,25 @@ export const QueryTotalSupplyResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryTotalSupplyResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.supply.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; }, @@ -607,11 +694,13 @@ export const QueryTotalSupplyResponse = { toJSON(message: QueryTotalSupplyResponse): unknown { const obj: any = {}; + if (message.supply) { obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.supply = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -631,7 +720,9 @@ export const QueryTotalSupplyResponse = { }; function createBaseQuerySupplyOfRequest(): QuerySupplyOfRequest { - return { denom: "" }; + return { + denom: "", + }; } export const QuerySupplyOfRequest = { @@ -639,6 +730,7 @@ export const QuerySupplyOfRequest = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + return writer; }, @@ -646,22 +738,28 @@ export const QuerySupplyOfRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySupplyOfRequest(); + 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 { - return { denom: isSet(object.denom) ? String(object.denom) : "" }; + return { + denom: isSet(object.denom) ? String(object.denom) : "", + }; }, toJSON(message: QuerySupplyOfRequest): unknown { @@ -678,7 +776,9 @@ export const QuerySupplyOfRequest = { }; function createBaseQuerySupplyOfResponse(): QuerySupplyOfResponse { - return { amount: undefined }; + return { + amount: undefined, + }; } export const QuerySupplyOfResponse = { @@ -686,6 +786,7 @@ export const QuerySupplyOfResponse = { if (message.amount !== undefined) { Coin.encode(message.amount, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -693,22 +794,28 @@ export const QuerySupplyOfResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySupplyOfResponse(); + 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 { - return { amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined }; + return { + amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, + }; }, toJSON(message: QuerySupplyOfResponse): unknown { @@ -738,14 +845,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -765,7 +875,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -773,6 +885,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -780,22 +893,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -813,7 +932,9 @@ export const QueryParamsResponse = { }; function createBaseQueryDenomsMetadataRequest(): QueryDenomsMetadataRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryDenomsMetadataRequest = { @@ -821,6 +942,7 @@ export const QueryDenomsMetadataRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -828,22 +950,28 @@ export const QueryDenomsMetadataRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomsMetadataRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryDenomsMetadataRequest): unknown { @@ -866,7 +994,10 @@ export const QueryDenomsMetadataRequest = { }; function createBaseQueryDenomsMetadataResponse(): QueryDenomsMetadataResponse { - return { metadatas: [], pagination: undefined }; + return { + metadatas: [], + pagination: undefined, + }; } export const QueryDenomsMetadataResponse = { @@ -874,9 +1005,11 @@ export const QueryDenomsMetadataResponse = { 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; }, @@ -884,20 +1017,25 @@ export const QueryDenomsMetadataResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomsMetadataResponse(); + 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; }, @@ -912,11 +1050,13 @@ export const QueryDenomsMetadataResponse = { 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; @@ -936,7 +1076,9 @@ export const QueryDenomsMetadataResponse = { }; function createBaseQueryDenomMetadataRequest(): QueryDenomMetadataRequest { - return { denom: "" }; + return { + denom: "", + }; } export const QueryDenomMetadataRequest = { @@ -944,6 +1086,7 @@ export const QueryDenomMetadataRequest = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + return writer; }, @@ -951,22 +1094,28 @@ export const QueryDenomMetadataRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomMetadataRequest(); + 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 { - return { denom: isSet(object.denom) ? String(object.denom) : "" }; + return { + denom: isSet(object.denom) ? String(object.denom) : "", + }; }, toJSON(message: QueryDenomMetadataRequest): unknown { @@ -985,7 +1134,9 @@ export const QueryDenomMetadataRequest = { }; function createBaseQueryDenomMetadataResponse(): QueryDenomMetadataResponse { - return { metadata: undefined }; + return { + metadata: undefined, + }; } export const QueryDenomMetadataResponse = { @@ -993,6 +1144,7 @@ export const QueryDenomMetadataResponse = { if (message.metadata !== undefined) { Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1000,22 +1152,28 @@ export const QueryDenomMetadataResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomMetadataResponse(); + 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 { - return { metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined }; + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + }; }, toJSON(message: QueryDenomMetadataResponse): unknown { @@ -1036,32 +1194,37 @@ export const QueryDenomMetadataResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. */ + /*Balance queries the balance of a single coin for a single account.*/ + AllBalances(request: QueryAllBalancesRequest): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ + /*AllBalances queries the balance of all coins for a single account.*/ + SpendableBalances(request: QuerySpendableBalancesRequest): Promise; - /** TotalSupply queries the total supply of all coins. */ - TotalSupply(request: QueryTotalSupplyRequest): Promise; - /** SupplyOf queries the supply of a single coin. */ + /*SpendableBalances queries the spenable balance of all coins for a single + account.*/ + + TotalSupply(request?: QueryTotalSupplyRequest): Promise; + /*TotalSupply queries the total supply of all coins.*/ + 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. */ + /*SupplyOf queries the supply of a single coin.*/ + + Params(request?: QueryParamsRequest): Promise; + /*Params queries the parameters of x/bank module.*/ + DenomMetadata(request: QueryDenomMetadataRequest): Promise; - /** DenomsMetadata queries the client metadata for all registered coin denominations. */ - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise; -} + /*DenomsMetadata queries the client metadata of a given coin denomination.*/ + DenomsMetadata(request?: QueryDenomsMetadataRequest): Promise; + /*DenomsMetadata queries the client metadata for all registered coin denominations.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Balance = this.Balance.bind(this); @@ -1073,6 +1236,7 @@ export class QueryClientImpl implements Query { this.DenomMetadata = this.DenomMetadata.bind(this); this.DenomsMetadata = this.DenomsMetadata.bind(this); } + Balance(request: QueryBalanceRequest): Promise { const data = QueryBalanceRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Balance", data); @@ -1091,7 +1255,11 @@ export class QueryClientImpl implements Query { return promise.then((data) => QuerySpendableBalancesResponse.decode(new _m0.Reader(data))); } - TotalSupply(request: QueryTotalSupplyRequest): Promise { + TotalSupply( + request: QueryTotalSupplyRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); @@ -1103,7 +1271,7 @@ export class QueryClientImpl implements Query { return promise.then((data) => QuerySupplyOfResponse.decode(new _m0.Reader(data))); } - Params(request: QueryParamsRequest): Promise { + 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 _m0.Reader(data))); @@ -1115,41 +1283,13 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryDenomMetadataResponse.decode(new _m0.Reader(data))); } - DenomsMetadata(request: QueryDenomsMetadataRequest): Promise { + DenomsMetadata( + request: QueryDenomsMetadataRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index e97e14e5..d191874d 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,32 +1,34 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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 {} +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 {} function createBaseMsgSend(): MsgSend { - return { fromAddress: "", toAddress: "", amount: [] }; + return { + fromAddress: "", + toAddress: "", + amount: [], + }; } export const MsgSend = { @@ -34,12 +36,15 @@ export const MsgSend = { 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; }, @@ -47,23 +52,29 @@ export const MsgSend = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSend(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -79,11 +90,13 @@ export const MsgSend = { 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; }, @@ -109,14 +122,17 @@ export const MsgSendResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSendResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -136,7 +152,10 @@ export const MsgSendResponse = { }; function createBaseMsgMultiSend(): MsgMultiSend { - return { inputs: [], outputs: [] }; + return { + inputs: [], + outputs: [], + }; } export const MsgMultiSend = { @@ -144,9 +163,11 @@ export const MsgMultiSend = { 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; }, @@ -154,20 +175,25 @@ export const MsgMultiSend = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMultiSend(); + 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; }, @@ -180,16 +206,19 @@ export const MsgMultiSend = { 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; }, @@ -214,14 +243,17 @@ export const MsgMultiSendResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMultiSendResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -239,22 +271,24 @@ export const MsgMultiSendResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*Send defines a method for sending coins from one account to another account.*/ + MultiSend(request: MsgMultiSend): Promise; + /*MultiSend defines a method for sending coins from some accounts to other accounts.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Send = this.Send.bind(this); this.MultiSend = this.MultiSend.bind(this); } + Send(request: MsgSend): Promise { const data = MsgSend.encode(request).finish(); const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data); @@ -267,35 +301,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgMultiSendResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 3d1bf46c..9fb4c1e1 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,46 +1,55 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; 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: Long; /** 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: Long; /** Amount of gas consumed by transaction. */ + gasUsed: Long; /** The request transaction bytes. */ - tx?: Any; + + tx: Any; /** * 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; /** * Events defines all the events emitted by processing a transaction. Note, @@ -50,10 +59,11 @@ export interface TxResponse { * * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 */ + events: Event[]; } - /** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */ + export interface ABCIMessageLog { msgIndex: number; log: string; @@ -61,36 +71,38 @@ export interface ABCIMessageLog { * 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: Long; /** GasUsed is the amount of gas actually consumed. */ + gasUsed: Long; } - /** Result is the union of ResponseFormat and ResponseCheckTx. */ + export interface Result { /** * Data is any data returned from message or handler execution. It MUST be @@ -98,53 +110,60 @@ export interface Result { */ 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; - result?: Result; + gasInfo: GasInfo; + result: Result; } - /** * 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: Long; /** Count of txs in current page */ + count: Long; /** Index of current page, start from 1 */ + pageNumber: Long; /** Count of total pages */ + pageTotal: Long; /** Max count txs per page */ + limit: Long; /** List of txs in current page */ + txs: TxResponse[]; } @@ -171,42 +190,55 @@ export const TxResponse = { if (!message.height.isZero()) { 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.isZero()) { writer.uint32(72).int64(message.gasWanted); } + if (!message.gasUsed.isZero()) { 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); } + for (const v of message.events) { Event.encode(v!, writer.uint32(106).fork()).ldelim(); } + return writer; }, @@ -214,59 +246,75 @@ export const TxResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 = reader.int64() as Long; break; + case 10: message.gasUsed = reader.int64() as Long; break; + case 11: message.tx = Any.decode(reader, reader.uint32()); break; + case 12: message.timestamp = reader.string(); break; + case 13: message.events.push(Event.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): TxResponse { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, txhash: isSet(object.txhash) ? String(object.txhash) : "", codespace: isSet(object.codespace) ? String(object.codespace) : "", code: isSet(object.code) ? Number(object.code) : 0, @@ -274,8 +322,8 @@ export const TxResponse = { rawLog: isSet(object.rawLog) ? String(object.rawLog) : "", logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => ABCIMessageLog.fromJSON(e)) : [], info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, tx: isSet(object.tx) ? Any.fromJSON(object.tx) : undefined, timestamp: isSet(object.timestamp) ? String(object.timestamp) : "", events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], @@ -290,21 +338,25 @@ export const TxResponse = { message.code !== undefined && (obj.code = Math.round(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 || Long.ZERO).toString()); message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString()); message.tx !== undefined && (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined); message.timestamp !== undefined && (obj.timestamp = message.timestamp); + if (message.events) { obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); } else { obj.events = []; } + return obj; }, @@ -333,7 +385,11 @@ export const TxResponse = { }; function createBaseABCIMessageLog(): ABCIMessageLog { - return { msgIndex: 0, log: "", events: [] }; + return { + msgIndex: 0, + log: "", + events: [], + }; } export const ABCIMessageLog = { @@ -341,12 +397,15 @@ export const ABCIMessageLog = { 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; }, @@ -354,23 +413,29 @@ export const ABCIMessageLog = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseABCIMessageLog(); + 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; }, @@ -386,11 +451,13 @@ export const ABCIMessageLog = { const obj: any = {}; message.msgIndex !== undefined && (obj.msgIndex = Math.round(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; }, @@ -404,7 +471,10 @@ export const ABCIMessageLog = { }; function createBaseStringEvent(): StringEvent { - return { type: "", attributes: [] }; + return { + type: "", + attributes: [], + }; } export const StringEvent = { @@ -412,9 +482,11 @@ export const StringEvent = { 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; }, @@ -422,20 +494,25 @@ export const StringEvent = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStringEvent(); + 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; }, @@ -451,11 +528,13 @@ export const StringEvent = { 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; }, @@ -468,7 +547,10 @@ export const StringEvent = { }; function createBaseAttribute(): Attribute { - return { key: "", value: "" }; + return { + key: "", + value: "", + }; } export const Attribute = { @@ -476,9 +558,11 @@ export const Attribute = { if (message.key !== "") { writer.uint32(10).string(message.key); } + if (message.value !== "") { writer.uint32(18).string(message.value); } + return writer; }, @@ -486,20 +570,25 @@ export const Attribute = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttribute(); + 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; }, @@ -526,7 +615,10 @@ export const Attribute = { }; function createBaseGasInfo(): GasInfo { - return { gasWanted: Long.UZERO, gasUsed: Long.UZERO }; + return { + gasWanted: Long.UZERO, + gasUsed: Long.UZERO, + }; } export const GasInfo = { @@ -534,9 +626,11 @@ export const GasInfo = { if (!message.gasWanted.isZero()) { writer.uint32(8).uint64(message.gasWanted); } + if (!message.gasUsed.isZero()) { writer.uint32(16).uint64(message.gasUsed); } + return writer; }, @@ -544,27 +638,32 @@ export const GasInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGasInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.gasWanted = reader.uint64() as Long; break; + case 2: message.gasUsed = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GasInfo { return { - gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.UZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.UZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.UZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.UZERO, }; }, @@ -588,7 +687,11 @@ export const GasInfo = { }; function createBaseResult(): Result { - return { data: new Uint8Array(), log: "", events: [] }; + return { + data: new Uint8Array(), + log: "", + events: [], + }; } export const Result = { @@ -596,12 +699,15 @@ export const Result = { 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; }, @@ -609,23 +715,29 @@ export const Result = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResult(); + 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; }, @@ -642,11 +754,13 @@ export const Result = { 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; }, @@ -660,7 +774,10 @@ export const Result = { }; function createBaseSimulationResponse(): SimulationResponse { - return { gasInfo: undefined, result: undefined }; + return { + gasInfo: undefined, + result: undefined, + }; } export const SimulationResponse = { @@ -668,9 +785,11 @@ export const SimulationResponse = { 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; }, @@ -678,20 +797,25 @@ export const SimulationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSimulationResponse(); + 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; }, @@ -723,7 +847,10 @@ export const SimulationResponse = { }; function createBaseMsgData(): MsgData { - return { msgType: "", data: new Uint8Array() }; + return { + msgType: "", + data: new Uint8Array(), + }; } export const MsgData = { @@ -731,9 +858,11 @@ export const MsgData = { if (message.msgType !== "") { writer.uint32(10).string(message.msgType); } + if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } + return writer; }, @@ -741,20 +870,25 @@ export const MsgData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgData(); + 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; }, @@ -782,7 +916,9 @@ export const MsgData = { }; function createBaseTxMsgData(): TxMsgData { - return { data: [] }; + return { + data: [], + }; } export const TxMsgData = { @@ -790,6 +926,7 @@ export const TxMsgData = { for (const v of message.data) { MsgData.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -797,31 +934,39 @@ export const TxMsgData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxMsgData(); + 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 { - return { data: Array.isArray(object?.data) ? object.data.map((e: any) => MsgData.fromJSON(e)) : [] }; + return { + data: Array.isArray(object?.data) ? object.data.map((e: any) => MsgData.fromJSON(e)) : [], + }; }, 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; }, @@ -848,21 +993,27 @@ export const SearchTxsResult = { if (!message.totalCount.isZero()) { writer.uint32(8).uint64(message.totalCount); } + if (!message.count.isZero()) { writer.uint32(16).uint64(message.count); } + if (!message.pageNumber.isZero()) { writer.uint32(24).uint64(message.pageNumber); } + if (!message.pageTotal.isZero()) { writer.uint32(32).uint64(message.pageTotal); } + if (!message.limit.isZero()) { writer.uint32(40).uint64(message.limit); } + for (const v of message.txs) { TxResponse.encode(v!, writer.uint32(50).fork()).ldelim(); } + return writer; }, @@ -870,42 +1021,51 @@ export const SearchTxsResult = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSearchTxsResult(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.totalCount = reader.uint64() as Long; break; + case 2: message.count = reader.uint64() as Long; break; + case 3: message.pageNumber = reader.uint64() as Long; break; + case 4: message.pageTotal = reader.uint64() as Long; break; + case 5: message.limit = 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 { return { - totalCount: isSet(object.totalCount) ? Long.fromValue(object.totalCount) : Long.UZERO, - count: isSet(object.count) ? Long.fromValue(object.count) : Long.UZERO, - pageNumber: isSet(object.pageNumber) ? Long.fromValue(object.pageNumber) : Long.UZERO, - pageTotal: isSet(object.pageTotal) ? Long.fromValue(object.pageTotal) : Long.UZERO, - limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, + totalCount: isSet(object.totalCount) ? Long.fromString(object.totalCount) : Long.UZERO, + count: isSet(object.count) ? Long.fromString(object.count) : Long.UZERO, + pageNumber: isSet(object.pageNumber) ? Long.fromString(object.pageNumber) : Long.UZERO, + pageTotal: isSet(object.pageTotal) ? Long.fromString(object.pageTotal) : Long.UZERO, + limit: isSet(object.limit) ? Long.fromString(object.limit) : Long.UZERO, txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => TxResponse.fromJSON(e)) : [], }; }, @@ -917,11 +1077,13 @@ export const SearchTxsResult = { message.pageNumber !== undefined && (obj.pageNumber = (message.pageNumber || Long.UZERO).toString()); message.pageTotal !== undefined && (obj.pageTotal = (message.pageTotal || Long.UZERO).toString()); message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString()); + if (message.txs) { obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined)); } else { obj.txs = []; } + return obj; }, @@ -947,75 +1109,3 @@ export const SearchTxsResult = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index c3e185d1..1d65e1f9 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,22 +1,22 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.kv.v1beta1"; - /** Pairs defines a repeated slice of Pair objects. */ + export interface Pairs { pairs: Pair[]; } - /** Pair defines a key/value bytes tuple. */ + export interface Pair { key: Uint8Array; value: Uint8Array; } function createBasePairs(): Pairs { - return { pairs: [] }; + return { + pairs: [], + }; } export const Pairs = { @@ -24,6 +24,7 @@ export const Pairs = { for (const v of message.pairs) { Pair.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -31,31 +32,39 @@ export const Pairs = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePairs(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.pairs.push(Pair.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Pairs { - return { pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => Pair.fromJSON(e)) : [] }; + return { + pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => Pair.fromJSON(e)) : [], + }; }, toJSON(message: Pairs): unknown { const obj: any = {}; + if (message.pairs) { obj.pairs = message.pairs.map((e) => (e ? Pair.toJSON(e) : undefined)); } else { obj.pairs = []; } + return obj; }, @@ -67,7 +76,10 @@ export const Pairs = { }; function createBasePair(): Pair { - return { key: new Uint8Array(), value: new Uint8Array() }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + }; } export const Pair = { @@ -75,9 +87,11 @@ export const Pair = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + return writer; }, @@ -85,20 +99,25 @@ export const Pair = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePair(); + 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; }, @@ -125,75 +144,3 @@ export const Pair = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 452b213d..06957204 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.query.v1beta1"; - /** * PageRequest is to be embedded in gRPC request messages for efficient * pagination. Ex: @@ -13,39 +10,43 @@ export const protobufPackage = "cosmos.base.query.v1beta1"; * 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; + 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: Long; + + offset?: Long; /** * 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: Long; + + limit?: Long; /** * 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; + + countTotal?: boolean; /** * reverse is set to true if results are to be returned in the descending order. * * Since: cosmos-sdk 0.43 */ - reverse: boolean; -} + reverse?: boolean; +} /** * PageResponse is to be embedded in gRPC response messages where the * corresponding request message has used PageRequest. @@ -55,21 +56,29 @@ export interface PageRequest { * 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; + nextKey?: Uint8Array; /** * total is total number of results available if PageRequest.count_total * was set, its value is undefined otherwise */ + total: Long; } function createBasePageRequest(): PageRequest { - return { key: new Uint8Array(), offset: Long.UZERO, limit: Long.UZERO, countTotal: false, reverse: false }; + return { + key: new Uint8Array(), + offset: Long.UZERO, + limit: Long.UZERO, + countTotal: false, + reverse: false, + }; } export const PageRequest = { @@ -77,18 +86,23 @@ export const PageRequest = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (!message.offset.isZero()) { writer.uint32(16).uint64(message.offset); } + if (!message.limit.isZero()) { writer.uint32(24).uint64(message.limit); } + if (message.countTotal === true) { writer.uint32(32).bool(message.countTotal); } + if (message.reverse === true) { writer.uint32(40).bool(message.reverse); } + return writer; }, @@ -96,37 +110,45 @@ export const PageRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePageRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.key = reader.bytes(); break; + case 2: message.offset = reader.uint64() as Long; break; + case 3: message.limit = reader.uint64() as Long; break; + case 4: message.countTotal = reader.bool(); break; + case 5: message.reverse = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PageRequest { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO, - limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, + offset: isSet(object.offset) ? Long.fromString(object.offset) : Long.UZERO, + limit: isSet(object.limit) ? Long.fromString(object.limit) : Long.UZERO, countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false, reverse: isSet(object.reverse) ? Boolean(object.reverse) : false, }; @@ -157,7 +179,10 @@ export const PageRequest = { }; function createBasePageResponse(): PageResponse { - return { nextKey: new Uint8Array(), total: Long.UZERO }; + return { + nextKey: new Uint8Array(), + total: Long.UZERO, + }; } export const PageResponse = { @@ -165,9 +190,11 @@ export const PageResponse = { if (message.nextKey.length !== 0) { writer.uint32(10).bytes(message.nextKey); } + if (!message.total.isZero()) { writer.uint32(16).uint64(message.total); } + return writer; }, @@ -175,27 +202,32 @@ export const PageResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePageResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.nextKey = reader.bytes(); break; + case 2: message.total = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PageResponse { return { nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(), - total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO, + total: isSet(object.total) ? Long.fromString(object.total) : Long.UZERO, }; }, @@ -215,75 +247,3 @@ export const PageResponse = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 07397b5c..90a70cb3 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,31 +1,29 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; - /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ -export interface ListAllInterfacesRequest {} +export interface ListAllInterfacesRequest {} /** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ + export interface ListAllInterfacesResponse { /** interface_names is an array of all the registered interfaces. */ interfaceNames: string[]; } - /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. */ + export interface ListImplementationsRequest { /** interface_name defines the interface to query the implementations for. */ interfaceName: string; } - /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. */ + export interface ListImplementationsResponse { implementationMessageNames: string[]; } @@ -43,14 +41,17 @@ export const ListAllInterfacesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListAllInterfacesRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -70,7 +71,9 @@ export const ListAllInterfacesRequest = { }; function createBaseListAllInterfacesResponse(): ListAllInterfacesResponse { - return { interfaceNames: [] }; + return { + interfaceNames: [], + }; } export const ListAllInterfacesResponse = { @@ -78,6 +81,7 @@ export const ListAllInterfacesResponse = { for (const v of message.interfaceNames) { writer.uint32(10).string(v!); } + return writer; }, @@ -85,17 +89,21 @@ export const ListAllInterfacesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListAllInterfacesResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.interfaceNames.push(reader.string()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -109,11 +117,13 @@ export const ListAllInterfacesResponse = { toJSON(message: ListAllInterfacesResponse): unknown { const obj: any = {}; + if (message.interfaceNames) { obj.interfaceNames = message.interfaceNames.map((e) => e); } else { obj.interfaceNames = []; } + return obj; }, @@ -127,7 +137,9 @@ export const ListAllInterfacesResponse = { }; function createBaseListImplementationsRequest(): ListImplementationsRequest { - return { interfaceName: "" }; + return { + interfaceName: "", + }; } export const ListImplementationsRequest = { @@ -135,6 +147,7 @@ export const ListImplementationsRequest = { if (message.interfaceName !== "") { writer.uint32(10).string(message.interfaceName); } + return writer; }, @@ -142,22 +155,28 @@ export const ListImplementationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListImplementationsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.interfaceName = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ListImplementationsRequest { - return { interfaceName: isSet(object.interfaceName) ? String(object.interfaceName) : "" }; + return { + interfaceName: isSet(object.interfaceName) ? String(object.interfaceName) : "", + }; }, toJSON(message: ListImplementationsRequest): unknown { @@ -176,7 +195,9 @@ export const ListImplementationsRequest = { }; function createBaseListImplementationsResponse(): ListImplementationsResponse { - return { implementationMessageNames: [] }; + return { + implementationMessageNames: [], + }; } export const ListImplementationsResponse = { @@ -184,6 +205,7 @@ export const ListImplementationsResponse = { for (const v of message.implementationMessageNames) { writer.uint32(10).string(v!); } + return writer; }, @@ -191,17 +213,21 @@ export const ListImplementationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListImplementationsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.implementationMessageNames.push(reader.string()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -215,11 +241,13 @@ export const ListImplementationsResponse = { toJSON(message: ListImplementationsResponse): unknown { const obj: any = {}; + if (message.implementationMessageNames) { obj.implementationMessageNames = message.implementationMessageNames.map((e) => e); } else { obj.implementationMessageNames = []; } + return obj; }, @@ -231,77 +259,3 @@ export const ListImplementationsResponse = { return message; }, }; - -/** ReflectionService defines a service for interface reflection. */ -export interface ReflectionService { - /** - * ListAllInterfaces lists all the interfaces registered in the interface - * registry. - */ - ListAllInterfaces(request: ListAllInterfacesRequest): Promise; - /** - * ListImplementations list all the concrete types that implement a given - * interface. - */ - ListImplementations(request: ListImplementationsRequest): Promise; -} - -export class ReflectionServiceClientImpl implements ReflectionService { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.ListAllInterfaces = this.ListAllInterfaces.bind(this); - this.ListImplementations = this.ListImplementations.bind(this); - } - ListAllInterfaces(request: ListAllInterfacesRequest): Promise { - const data = ListAllInterfacesRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.reflection.v1beta1.ReflectionService", - "ListAllInterfaces", - data, - ); - return promise.then((data) => ListAllInterfacesResponse.decode(new _m0.Reader(data))); - } - - ListImplementations(request: ListImplementationsRequest): Promise { - const data = ListImplementationsRequest.encode(request).finish(); - const promise = this.rpc.request( - "cosmos.base.reflection.v1beta1.ReflectionService", - "ListImplementations", - data, - ); - return promise.then((data) => ListImplementationsResponse.decode(new _m0.Reader(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 62cfda21..c6021397 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,60 +1,66 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.snapshots.v1beta1"; - /** Snapshot contains Tendermint state sync snapshot info. */ + export interface Snapshot { height: Long; format: number; chunks: number; hash: Uint8Array; - metadata?: Metadata; + metadata: Metadata; } - /** Metadata contains SDK-specific snapshot metadata. */ + export interface Metadata { /** SHA-256 chunk hashes */ chunkHashes: Uint8Array[]; } - /** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ + export interface SnapshotItem { - store?: SnapshotStoreItem | undefined; - iavl?: SnapshotIAVLItem | undefined; - extension?: SnapshotExtensionMeta | undefined; - extensionPayload?: SnapshotExtensionPayload | undefined; + store?: SnapshotStoreItem; + iavl?: SnapshotIAVLItem; + extension?: SnapshotExtensionMeta; + extensionPayload?: SnapshotExtensionPayload; } - /** SnapshotStoreItem contains metadata about a snapshotted store. */ + export interface SnapshotStoreItem { name: string; } - /** SnapshotIAVLItem is an exported IAVL node. */ + export interface SnapshotIAVLItem { key: Uint8Array; value: Uint8Array; /** version is block height */ + version: Long; /** height is depth of the tree. */ + height: number; } - /** SnapshotExtensionMeta contains metadata about an external snapshotter. */ + export interface SnapshotExtensionMeta { name: string; format: number; } - /** SnapshotExtensionPayload contains payloads of an external snapshotter. */ + export interface SnapshotExtensionPayload { payload: Uint8Array; } function createBaseSnapshot(): Snapshot { - return { height: Long.UZERO, format: 0, chunks: 0, hash: new Uint8Array(), metadata: undefined }; + return { + height: Long.UZERO, + format: 0, + chunks: 0, + hash: new Uint8Array(), + metadata: undefined, + }; } export const Snapshot = { @@ -62,18 +68,23 @@ export const Snapshot = { if (!message.height.isZero()) { 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 !== undefined) { Metadata.encode(message.metadata, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -81,35 +92,43 @@ export const Snapshot = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshot(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 = Metadata.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Snapshot { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunks: isSet(object.chunks) ? Number(object.chunks) : 0, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), @@ -145,7 +164,9 @@ export const Snapshot = { }; function createBaseMetadata(): Metadata { - return { chunkHashes: [] }; + return { + chunkHashes: [], + }; } export const Metadata = { @@ -153,6 +174,7 @@ export const Metadata = { for (const v of message.chunkHashes) { writer.uint32(10).bytes(v!); } + return writer; }, @@ -160,17 +182,21 @@ export const Metadata = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMetadata(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.chunkHashes.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -184,6 +210,7 @@ export const Metadata = { toJSON(message: Metadata): unknown { const obj: any = {}; + if (message.chunkHashes) { obj.chunkHashes = message.chunkHashes.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()), @@ -191,6 +218,7 @@ export const Metadata = { } else { obj.chunkHashes = []; } + return obj; }, @@ -202,7 +230,12 @@ export const Metadata = { }; function createBaseSnapshotItem(): SnapshotItem { - return { store: undefined, iavl: undefined, extension: undefined, extensionPayload: undefined }; + return { + store: undefined, + iavl: undefined, + extension: undefined, + extensionPayload: undefined, + }; } export const SnapshotItem = { @@ -210,15 +243,19 @@ export const SnapshotItem = { if (message.store !== undefined) { SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); } + if (message.iavl !== undefined) { SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); } + if (message.extension !== undefined) { SnapshotExtensionMeta.encode(message.extension, writer.uint32(26).fork()).ldelim(); } + if (message.extensionPayload !== undefined) { SnapshotExtensionPayload.encode(message.extensionPayload, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -226,26 +263,33 @@ export const SnapshotItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotItem(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.store = SnapshotStoreItem.decode(reader, reader.uint32()); break; + case 2: message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); break; + case 3: message.extension = SnapshotExtensionMeta.decode(reader, reader.uint32()); break; + case 4: message.extensionPayload = SnapshotExtensionPayload.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -298,7 +342,9 @@ export const SnapshotItem = { }; function createBaseSnapshotStoreItem(): SnapshotStoreItem { - return { name: "" }; + return { + name: "", + }; } export const SnapshotStoreItem = { @@ -306,6 +352,7 @@ export const SnapshotStoreItem = { if (message.name !== "") { writer.uint32(10).string(message.name); } + return writer; }, @@ -313,22 +360,28 @@ export const SnapshotStoreItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotStoreItem(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): SnapshotStoreItem { - return { name: isSet(object.name) ? String(object.name) : "" }; + return { + name: isSet(object.name) ? String(object.name) : "", + }; }, toJSON(message: SnapshotStoreItem): unknown { @@ -345,7 +398,12 @@ export const SnapshotStoreItem = { }; function createBaseSnapshotIAVLItem(): SnapshotIAVLItem { - return { key: new Uint8Array(), value: new Uint8Array(), version: Long.ZERO, height: 0 }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + version: Long.ZERO, + height: 0, + }; } export const SnapshotIAVLItem = { @@ -353,15 +411,19 @@ export const SnapshotIAVLItem = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + if (!message.version.isZero()) { writer.uint32(24).int64(message.version); } + if (message.height !== 0) { writer.uint32(32).int32(message.height); } + return writer; }, @@ -369,26 +431,33 @@ export const SnapshotIAVLItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotIAVLItem(); + 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.version = reader.int64() as Long; break; + case 4: message.height = reader.int32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -396,7 +465,7 @@ export const SnapshotIAVLItem = { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, height: isSet(object.height) ? Number(object.height) : 0, }; }, @@ -424,7 +493,10 @@ export const SnapshotIAVLItem = { }; function createBaseSnapshotExtensionMeta(): SnapshotExtensionMeta { - return { name: "", format: 0 }; + return { + name: "", + format: 0, + }; } export const SnapshotExtensionMeta = { @@ -432,9 +504,11 @@ export const SnapshotExtensionMeta = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.format !== 0) { writer.uint32(16).uint32(message.format); } + return writer; }, @@ -442,20 +516,25 @@ export const SnapshotExtensionMeta = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotExtensionMeta(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: message.format = reader.uint32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -482,7 +561,9 @@ export const SnapshotExtensionMeta = { }; function createBaseSnapshotExtensionPayload(): SnapshotExtensionPayload { - return { payload: new Uint8Array() }; + return { + payload: new Uint8Array(), + }; } export const SnapshotExtensionPayload = { @@ -490,6 +571,7 @@ export const SnapshotExtensionPayload = { if (message.payload.length !== 0) { writer.uint32(10).bytes(message.payload); } + return writer; }, @@ -497,22 +579,28 @@ export const SnapshotExtensionPayload = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotExtensionPayload(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.payload = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): SnapshotExtensionPayload { - return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array() }; + return { + payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), + }; }, toJSON(message: SnapshotExtensionPayload): unknown { @@ -530,75 +618,3 @@ export const SnapshotExtensionPayload = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 34837078..5c319b97 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,38 +1,39 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; - /** * CommitInfo defines commit information used by the multi-store when committing * a version/height. */ + export interface CommitInfo { version: Long; storeInfos: StoreInfo[]; } - /** * StoreInfo defines store-specific commit information. It contains a reference * between a store name and the commit ID. */ + export interface StoreInfo { name: string; - commitId?: CommitID; + commitId: CommitID; } - /** * CommitID defines the committment information when a specific store is * committed. */ + export interface CommitID { version: Long; hash: Uint8Array; } function createBaseCommitInfo(): CommitInfo { - return { version: Long.ZERO, storeInfos: [] }; + return { + version: Long.ZERO, + storeInfos: [], + }; } export const CommitInfo = { @@ -40,9 +41,11 @@ export const CommitInfo = { if (!message.version.isZero()) { writer.uint32(8).int64(message.version); } + for (const v of message.storeInfos) { StoreInfo.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -50,26 +53,31 @@ export const CommitInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommitInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.version = reader.int64() as Long; break; + case 2: message.storeInfos.push(StoreInfo.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): CommitInfo { return { - version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, storeInfos: Array.isArray(object?.storeInfos) ? object.storeInfos.map((e: any) => StoreInfo.fromJSON(e)) : [], @@ -79,11 +87,13 @@ export const CommitInfo = { toJSON(message: CommitInfo): unknown { const obj: any = {}; message.version !== undefined && (obj.version = (message.version || Long.ZERO).toString()); + if (message.storeInfos) { obj.storeInfos = message.storeInfos.map((e) => (e ? StoreInfo.toJSON(e) : undefined)); } else { obj.storeInfos = []; } + return obj; }, @@ -97,7 +107,10 @@ export const CommitInfo = { }; function createBaseStoreInfo(): StoreInfo { - return { name: "", commitId: undefined }; + return { + name: "", + commitId: undefined, + }; } export const StoreInfo = { @@ -105,9 +118,11 @@ export const StoreInfo = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.commitId !== undefined) { CommitID.encode(message.commitId, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -115,20 +130,25 @@ export const StoreInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStoreInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: message.commitId = CommitID.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -159,7 +179,10 @@ export const StoreInfo = { }; function createBaseCommitID(): CommitID { - return { version: Long.ZERO, hash: new Uint8Array() }; + return { + version: Long.ZERO, + hash: new Uint8Array(), + }; } export const CommitID = { @@ -167,9 +190,11 @@ export const CommitID = { if (!message.version.isZero()) { writer.uint32(8).int64(message.version); } + if (message.hash.length !== 0) { writer.uint32(18).bytes(message.hash); } + return writer; }, @@ -177,26 +202,31 @@ export const CommitID = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommitID(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.version = reader.int64() as Long; break; + case 2: message.hash = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): CommitID { return { - version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), }; }, @@ -217,75 +247,3 @@ export const CommitID = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index f298b4a8..7760a5f5 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; - /** * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) * It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and @@ -11,17 +8,24 @@ export const protobufPackage = "cosmos.base.store.v1beta1"; * * Since: cosmos-sdk 0.43 */ + export interface StoreKVPair { /** the store key for the KVStore this pair originates from */ storeKey: string; /** true indicates a delete operation, false indicates a set operation */ + delete: boolean; key: Uint8Array; value: Uint8Array; } function createBaseStoreKVPair(): StoreKVPair { - return { storeKey: "", delete: false, key: new Uint8Array(), value: new Uint8Array() }; + return { + storeKey: "", + delete: false, + key: new Uint8Array(), + value: new Uint8Array(), + }; } export const StoreKVPair = { @@ -29,15 +33,19 @@ export const StoreKVPair = { if (message.storeKey !== "") { writer.uint32(10).string(message.storeKey); } + if (message.delete === true) { writer.uint32(16).bool(message.delete); } + if (message.key.length !== 0) { writer.uint32(26).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(34).bytes(message.value); } + return writer; }, @@ -45,26 +53,33 @@ export const StoreKVPair = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStoreKVPair(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.storeKey = reader.string(); break; + case 2: message.delete = reader.bool(); break; + case 3: message.key = reader.bytes(); break; + case 4: message.value = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -97,75 +112,3 @@ export const StoreKVPair = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 87f0bacc..80f7872d 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,21 +1,19 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; - /** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ + export interface SnapshotItem { - store?: SnapshotStoreItem | undefined; - iavl?: SnapshotIAVLItem | undefined; + store?: SnapshotStoreItem; + iavl?: SnapshotIAVLItem; } - /** SnapshotStoreItem contains metadata about a snapshotted store. */ + export interface SnapshotStoreItem { name: string; } - /** SnapshotIAVLItem is an exported IAVL node. */ + export interface SnapshotIAVLItem { key: Uint8Array; value: Uint8Array; @@ -24,7 +22,10 @@ export interface SnapshotIAVLItem { } function createBaseSnapshotItem(): SnapshotItem { - return { store: undefined, iavl: undefined }; + return { + store: undefined, + iavl: undefined, + }; } export const SnapshotItem = { @@ -32,9 +33,11 @@ export const SnapshotItem = { if (message.store !== undefined) { SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); } + if (message.iavl !== undefined) { SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -42,20 +45,25 @@ export const SnapshotItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotItem(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.store = SnapshotStoreItem.decode(reader, reader.uint32()); break; + case 2: message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -90,7 +98,9 @@ export const SnapshotItem = { }; function createBaseSnapshotStoreItem(): SnapshotStoreItem { - return { name: "" }; + return { + name: "", + }; } export const SnapshotStoreItem = { @@ -98,6 +108,7 @@ export const SnapshotStoreItem = { if (message.name !== "") { writer.uint32(10).string(message.name); } + return writer; }, @@ -105,22 +116,28 @@ export const SnapshotStoreItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotStoreItem(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): SnapshotStoreItem { - return { name: isSet(object.name) ? String(object.name) : "" }; + return { + name: isSet(object.name) ? String(object.name) : "", + }; }, toJSON(message: SnapshotStoreItem): unknown { @@ -137,7 +154,12 @@ export const SnapshotStoreItem = { }; function createBaseSnapshotIAVLItem(): SnapshotIAVLItem { - return { key: new Uint8Array(), value: new Uint8Array(), version: Long.ZERO, height: 0 }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + version: Long.ZERO, + height: 0, + }; } export const SnapshotIAVLItem = { @@ -145,15 +167,19 @@ export const SnapshotIAVLItem = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + if (!message.version.isZero()) { writer.uint32(24).int64(message.version); } + if (message.height !== 0) { writer.uint32(32).int32(message.height); } + return writer; }, @@ -161,26 +187,33 @@ export const SnapshotIAVLItem = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshotIAVLItem(); + 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.version = reader.int64() as Long; break; + case 4: message.height = reader.int32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -188,7 +221,7 @@ export const SnapshotIAVLItem = { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, height: isSet(object.height) ? Number(object.height) : 0, }; }, @@ -214,75 +247,3 @@ export const SnapshotIAVLItem = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 41527586..fef8cf88 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,89 +1,90 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; -import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; -import { Block } from "../../../../tendermint/types/block"; import { BlockID } from "../../../../tendermint/types/types"; -import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; - +import { Block } from "../../../../tendermint/types/block"; +import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.tendermint.v1beta1"; - /** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ + export interface GetValidatorSetByHeightRequest { height: Long; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ + export interface GetValidatorSetByHeightResponse { blockHeight: Long; validators: Validator[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } - /** GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ + export interface GetLatestValidatorSetRequest { /** pagination defines an pagination for the request. */ pagination?: PageRequest; } - /** GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. */ + export interface GetLatestValidatorSetResponse { blockHeight: Long; validators: Validator[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } - /** Validator is the type for the validator-set. */ + export interface Validator { address: string; - pubKey?: Any; + pubKey: Any; votingPower: Long; proposerPriority: Long; } - /** GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. */ + export interface GetBlockByHeightRequest { height: Long; } - /** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ + export interface GetBlockByHeightResponse { - blockId?: BlockID; - block?: Block; + blockId: BlockID; + block: Block; } - /** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ -export interface GetLatestBlockRequest {} +export interface GetLatestBlockRequest {} /** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ + export interface GetLatestBlockResponse { - blockId?: BlockID; - block?: Block; + blockId: BlockID; + block: Block; } - /** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ -export interface GetSyncingRequest {} +export interface GetSyncingRequest {} /** GetSyncingResponse is the response type for the Query/GetSyncing RPC method. */ + export interface GetSyncingResponse { syncing: boolean; } - /** GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. */ -export interface GetNodeInfoRequest {} +export interface GetNodeInfoRequest {} /** GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. */ + export interface GetNodeInfoResponse { - defaultNodeInfo?: DefaultNodeInfo; - applicationVersion?: VersionInfo; + defaultNodeInfo: DefaultNodeInfo; + applicationVersion: VersionInfo; } - /** VersionInfo is the type for the GetNodeInfoResponse message. */ + export interface VersionInfo { name: string; appName: string; @@ -93,21 +94,27 @@ export interface VersionInfo { goVersion: string; buildDeps: Module[]; /** Since: cosmos-sdk 0.43 */ + cosmosSdkVersion: string; } - /** Module is the type for VersionInfo */ + export interface Module { /** module path */ path: string; /** module version */ + version: string; /** checksum */ + sum: string; } function createBaseGetValidatorSetByHeightRequest(): GetValidatorSetByHeightRequest { - return { height: Long.ZERO, pagination: undefined }; + return { + height: Long.ZERO, + pagination: undefined, + }; } export const GetValidatorSetByHeightRequest = { @@ -115,9 +122,11 @@ export const GetValidatorSetByHeightRequest = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -125,26 +134,31 @@ export const GetValidatorSetByHeightRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetValidatorSetByHeightRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetValidatorSetByHeightRequest { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -172,7 +186,11 @@ export const GetValidatorSetByHeightRequest = { }; function createBaseGetValidatorSetByHeightResponse(): GetValidatorSetByHeightResponse { - return { blockHeight: Long.ZERO, validators: [], pagination: undefined }; + return { + blockHeight: Long.ZERO, + validators: [], + pagination: undefined, + }; } export const GetValidatorSetByHeightResponse = { @@ -180,12 +198,15 @@ export const GetValidatorSetByHeightResponse = { if (!message.blockHeight.isZero()) { writer.uint32(8).int64(message.blockHeight); } + for (const v of message.validators) { Validator.encode(v!, writer.uint32(18).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -193,29 +214,35 @@ export const GetValidatorSetByHeightResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetValidatorSetByHeightResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockHeight = reader.int64() as Long; break; + case 2: message.validators.push(Validator.decode(reader, reader.uint32())); break; + case 3: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetValidatorSetByHeightResponse { return { - blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.ZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.ZERO, validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], @@ -226,11 +253,13 @@ export const GetValidatorSetByHeightResponse = { toJSON(message: GetValidatorSetByHeightResponse): unknown { const obj: any = {}; message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || Long.ZERO).toString()); + 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; @@ -254,7 +283,9 @@ export const GetValidatorSetByHeightResponse = { }; function createBaseGetLatestValidatorSetRequest(): GetLatestValidatorSetRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const GetLatestValidatorSetRequest = { @@ -262,6 +293,7 @@ export const GetLatestValidatorSetRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -269,22 +301,28 @@ export const GetLatestValidatorSetRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestValidatorSetRequest(); + 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): GetLatestValidatorSetRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: GetLatestValidatorSetRequest): unknown { @@ -307,7 +345,11 @@ export const GetLatestValidatorSetRequest = { }; function createBaseGetLatestValidatorSetResponse(): GetLatestValidatorSetResponse { - return { blockHeight: Long.ZERO, validators: [], pagination: undefined }; + return { + blockHeight: Long.ZERO, + validators: [], + pagination: undefined, + }; } export const GetLatestValidatorSetResponse = { @@ -315,12 +357,15 @@ export const GetLatestValidatorSetResponse = { if (!message.blockHeight.isZero()) { writer.uint32(8).int64(message.blockHeight); } + for (const v of message.validators) { Validator.encode(v!, writer.uint32(18).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -328,29 +373,35 @@ export const GetLatestValidatorSetResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestValidatorSetResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockHeight = reader.int64() as Long; break; + case 2: message.validators.push(Validator.decode(reader, reader.uint32())); break; + case 3: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetLatestValidatorSetResponse { return { - blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.ZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.ZERO, validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], @@ -361,11 +412,13 @@ export const GetLatestValidatorSetResponse = { toJSON(message: GetLatestValidatorSetResponse): unknown { const obj: any = {}; message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || Long.ZERO).toString()); + 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; @@ -389,7 +442,12 @@ export const GetLatestValidatorSetResponse = { }; function createBaseValidator(): Validator { - return { address: "", pubKey: undefined, votingPower: Long.ZERO, proposerPriority: Long.ZERO }; + return { + address: "", + pubKey: undefined, + votingPower: Long.ZERO, + proposerPriority: Long.ZERO, + }; } export const Validator = { @@ -397,15 +455,19 @@ export const Validator = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.pubKey !== undefined) { Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim(); } + if (!message.votingPower.isZero()) { writer.uint32(24).int64(message.votingPower); } + if (!message.proposerPriority.isZero()) { writer.uint32(32).int64(message.proposerPriority); } + return writer; }, @@ -413,26 +475,33 @@ export const Validator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidator(); + 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.votingPower = reader.int64() as Long; break; + case 4: message.proposerPriority = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -440,8 +509,8 @@ export const Validator = { return { address: isSet(object.address) ? String(object.address) : "", pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, - proposerPriority: isSet(object.proposerPriority) ? Long.fromValue(object.proposerPriority) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, + proposerPriority: isSet(object.proposerPriority) ? Long.fromString(object.proposerPriority) : Long.ZERO, }; }, @@ -473,7 +542,9 @@ export const Validator = { }; function createBaseGetBlockByHeightRequest(): GetBlockByHeightRequest { - return { height: Long.ZERO }; + return { + height: Long.ZERO, + }; } export const GetBlockByHeightRequest = { @@ -481,6 +552,7 @@ export const GetBlockByHeightRequest = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + return writer; }, @@ -488,22 +560,28 @@ export const GetBlockByHeightRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockByHeightRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetBlockByHeightRequest { - return { height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO }; + return { + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + }; }, toJSON(message: GetBlockByHeightRequest): unknown { @@ -521,7 +599,10 @@ export const GetBlockByHeightRequest = { }; function createBaseGetBlockByHeightResponse(): GetBlockByHeightResponse { - return { blockId: undefined, block: undefined }; + return { + blockId: undefined, + block: undefined, + }; } export const GetBlockByHeightResponse = { @@ -529,9 +610,11 @@ export const GetBlockByHeightResponse = { if (message.blockId !== undefined) { BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); } + if (message.block !== undefined) { Block.encode(message.block, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -539,20 +622,25 @@ export const GetBlockByHeightResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockByHeightResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockId = BlockID.decode(reader, reader.uint32()); break; + case 2: message.block = Block.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -598,14 +686,17 @@ export const GetLatestBlockRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestBlockRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -625,7 +716,10 @@ export const GetLatestBlockRequest = { }; function createBaseGetLatestBlockResponse(): GetLatestBlockResponse { - return { blockId: undefined, block: undefined }; + return { + blockId: undefined, + block: undefined, + }; } export const GetLatestBlockResponse = { @@ -633,9 +727,11 @@ export const GetLatestBlockResponse = { if (message.blockId !== undefined) { BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); } + if (message.block !== undefined) { Block.encode(message.block, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -643,20 +739,25 @@ export const GetLatestBlockResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetLatestBlockResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockId = BlockID.decode(reader, reader.uint32()); break; + case 2: message.block = Block.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -700,14 +801,17 @@ export const GetSyncingRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetSyncingRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -727,7 +831,9 @@ export const GetSyncingRequest = { }; function createBaseGetSyncingResponse(): GetSyncingResponse { - return { syncing: false }; + return { + syncing: false, + }; } export const GetSyncingResponse = { @@ -735,6 +841,7 @@ export const GetSyncingResponse = { if (message.syncing === true) { writer.uint32(8).bool(message.syncing); } + return writer; }, @@ -742,22 +849,28 @@ export const GetSyncingResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetSyncingResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.syncing = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetSyncingResponse { - return { syncing: isSet(object.syncing) ? Boolean(object.syncing) : false }; + return { + syncing: isSet(object.syncing) ? Boolean(object.syncing) : false, + }; }, toJSON(message: GetSyncingResponse): unknown { @@ -786,14 +899,17 @@ export const GetNodeInfoRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetNodeInfoRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -813,7 +929,10 @@ export const GetNodeInfoRequest = { }; function createBaseGetNodeInfoResponse(): GetNodeInfoResponse { - return { defaultNodeInfo: undefined, applicationVersion: undefined }; + return { + defaultNodeInfo: undefined, + applicationVersion: undefined, + }; } export const GetNodeInfoResponse = { @@ -821,9 +940,11 @@ export const GetNodeInfoResponse = { if (message.defaultNodeInfo !== undefined) { DefaultNodeInfo.encode(message.defaultNodeInfo, writer.uint32(10).fork()).ldelim(); } + if (message.applicationVersion !== undefined) { VersionInfo.encode(message.applicationVersion, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -831,20 +952,25 @@ export const GetNodeInfoResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetNodeInfoResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.defaultNodeInfo = DefaultNodeInfo.decode(reader, reader.uint32()); break; + case 2: message.applicationVersion = VersionInfo.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -904,27 +1030,35 @@ export const VersionInfo = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.appName !== "") { writer.uint32(18).string(message.appName); } + if (message.version !== "") { writer.uint32(26).string(message.version); } + if (message.gitCommit !== "") { writer.uint32(34).string(message.gitCommit); } + if (message.buildTags !== "") { writer.uint32(42).string(message.buildTags); } + if (message.goVersion !== "") { writer.uint32(50).string(message.goVersion); } + for (const v of message.buildDeps) { Module.encode(v!, writer.uint32(58).fork()).ldelim(); } + if (message.cosmosSdkVersion !== "") { writer.uint32(66).string(message.cosmosSdkVersion); } + return writer; }, @@ -932,38 +1066,49 @@ export const VersionInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVersionInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: message.appName = reader.string(); break; + case 3: message.version = reader.string(); break; + case 4: message.gitCommit = reader.string(); break; + case 5: message.buildTags = reader.string(); break; + case 6: message.goVersion = reader.string(); break; + case 7: message.buildDeps.push(Module.decode(reader, reader.uint32())); break; + case 8: message.cosmosSdkVersion = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -988,11 +1133,13 @@ export const VersionInfo = { message.gitCommit !== undefined && (obj.gitCommit = message.gitCommit); message.buildTags !== undefined && (obj.buildTags = message.buildTags); message.goVersion !== undefined && (obj.goVersion = message.goVersion); + if (message.buildDeps) { obj.buildDeps = message.buildDeps.map((e) => (e ? Module.toJSON(e) : undefined)); } else { obj.buildDeps = []; } + message.cosmosSdkVersion !== undefined && (obj.cosmosSdkVersion = message.cosmosSdkVersion); return obj; }, @@ -1012,7 +1159,11 @@ export const VersionInfo = { }; function createBaseModule(): Module { - return { path: "", version: "", sum: "" }; + return { + path: "", + version: "", + sum: "", + }; } export const Module = { @@ -1020,12 +1171,15 @@ export const Module = { if (message.path !== "") { writer.uint32(10).string(message.path); } + if (message.version !== "") { writer.uint32(18).string(message.version); } + if (message.sum !== "") { writer.uint32(26).string(message.sum); } + return writer; }, @@ -1033,23 +1187,29 @@ export const Module = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModule(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.string(); break; + case 2: message.version = reader.string(); break; + case 3: message.sum = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1077,25 +1237,30 @@ export const Module = { return message; }, }; +/** Service defines the RPC service */ -/** Service defines the gRPC querier service for tendermint queries. */ export interface Service { - /** GetNodeInfo queries the current node info. */ - GetNodeInfo(request: GetNodeInfoRequest): Promise; - /** GetSyncing queries node syncing. */ - GetSyncing(request: GetSyncingRequest): Promise; - /** GetLatestBlock returns the latest block. */ - GetLatestBlock(request: GetLatestBlockRequest): Promise; - /** GetBlockByHeight queries block for given height. */ + GetNodeInfo(request?: GetNodeInfoRequest): Promise; + /*GetNodeInfo queries the current node info.*/ + + GetSyncing(request?: GetSyncingRequest): Promise; + /*GetSyncing queries node syncing.*/ + + GetLatestBlock(request?: GetLatestBlockRequest): Promise; + /*GetLatestBlock returns the latest block.*/ + GetBlockByHeight(request: GetBlockByHeightRequest): Promise; - /** GetLatestValidatorSet queries latest validator-set. */ - GetLatestValidatorSet(request: GetLatestValidatorSetRequest): Promise; - /** GetValidatorSetByHeight queries validator-set at a given height. */ + /*GetBlockByHeight queries block for given height.*/ + + GetLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise; + /*GetLatestValidatorSet queries latest validator-set.*/ + GetValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise; + /*GetValidatorSetByHeight queries validator-set at a given height.*/ } - -export class ServiceClientImpl implements Service { +export class QueryClientImpl implements Service { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.GetNodeInfo = this.GetNodeInfo.bind(this); @@ -1105,19 +1270,20 @@ export class ServiceClientImpl implements Service { this.GetLatestValidatorSet = this.GetLatestValidatorSet.bind(this); this.GetValidatorSetByHeight = this.GetValidatorSetByHeight.bind(this); } - GetNodeInfo(request: GetNodeInfoRequest): Promise { + + GetNodeInfo(request: GetNodeInfoRequest = {}): Promise { const data = GetNodeInfoRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetNodeInfo", data); return promise.then((data) => GetNodeInfoResponse.decode(new _m0.Reader(data))); } - GetSyncing(request: GetSyncingRequest): Promise { + GetSyncing(request: GetSyncingRequest = {}): Promise { const data = GetSyncingRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetSyncing", data); return promise.then((data) => GetSyncingResponse.decode(new _m0.Reader(data))); } - GetLatestBlock(request: GetLatestBlockRequest): Promise { + GetLatestBlock(request: GetLatestBlockRequest = {}): Promise { const data = GetLatestBlockRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetLatestBlock", data); return promise.then((data) => GetLatestBlockResponse.decode(new _m0.Reader(data))); @@ -1129,7 +1295,11 @@ export class ServiceClientImpl implements Service { return promise.then((data) => GetBlockByHeightResponse.decode(new _m0.Reader(data))); } - GetLatestValidatorSet(request: GetLatestValidatorSetRequest): Promise { + GetLatestValidatorSet( + request: GetLatestValidatorSetRequest = { + pagination: undefined, + }, + ): Promise { const data = GetLatestValidatorSetRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.base.tendermint.v1beta1.Service", "GetLatestValidatorSet", data); return promise.then((data) => GetLatestValidatorSetResponse.decode(new _m0.Reader(data))); @@ -1145,35 +1315,3 @@ export class ServiceClientImpl implements Service { return promise.then((data) => GetValidatorSetByHeightResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index 03829c52..2e597a27 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,43 +1,44 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; 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; } function createBaseCoin(): Coin { - return { denom: "", amount: "" }; + return { + denom: "", + amount: "", + }; } export const Coin = { @@ -45,9 +46,11 @@ export const Coin = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + if (message.amount !== "") { writer.uint32(18).string(message.amount); } + return writer; }, @@ -55,20 +58,25 @@ export const Coin = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCoin(); + 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; }, @@ -95,7 +103,10 @@ export const Coin = { }; function createBaseDecCoin(): DecCoin { - return { denom: "", amount: "" }; + return { + denom: "", + amount: "", + }; } export const DecCoin = { @@ -103,9 +114,11 @@ export const DecCoin = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + if (message.amount !== "") { writer.uint32(18).string(message.amount); } + return writer; }, @@ -113,20 +126,25 @@ export const DecCoin = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDecCoin(); + 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; }, @@ -153,7 +171,9 @@ export const DecCoin = { }; function createBaseIntProto(): IntProto { - return { int: "" }; + return { + int: "", + }; } export const IntProto = { @@ -161,6 +181,7 @@ export const IntProto = { if (message.int !== "") { writer.uint32(10).string(message.int); } + return writer; }, @@ -168,22 +189,28 @@ export const IntProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIntProto(); + 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 { - return { int: isSet(object.int) ? String(object.int) : "" }; + return { + int: isSet(object.int) ? String(object.int) : "", + }; }, toJSON(message: IntProto): unknown { @@ -200,7 +227,9 @@ export const IntProto = { }; function createBaseDecProto(): DecProto { - return { dec: "" }; + return { + dec: "", + }; } export const DecProto = { @@ -208,6 +237,7 @@ export const DecProto = { if (message.dec !== "") { writer.uint32(10).string(message.dec); } + return writer; }, @@ -215,22 +245,28 @@ export const DecProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDecProto(); + 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 { - return { dec: isSet(object.dec) ? String(object.dec) : "" }; + return { + dec: isSet(object.dec) ? String(object.dec) : "", + }; }, toJSON(message: DecProto): unknown { @@ -245,31 +281,3 @@ export const DecProto = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index d3346554..44976f31 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,36 +1,36 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; - /** * Capability defines an implementation of an object capability. The index * provided to a Capability must be globally unique. */ + export interface Capability { index: Long; } - /** * Owner defines a single capability owner. An owner is defined by the name of * capability and the module name. */ + export interface Owner { module: string; name: string; } - /** * CapabilityOwners defines a set of owners of a single Capability. The set of * owners must be unique. */ + export interface CapabilityOwners { owners: Owner[]; } function createBaseCapability(): Capability { - return { index: Long.UZERO }; + return { + index: Long.UZERO, + }; } export const Capability = { @@ -38,6 +38,7 @@ export const Capability = { if (!message.index.isZero()) { writer.uint32(8).uint64(message.index); } + return writer; }, @@ -45,22 +46,28 @@ export const Capability = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCapability(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.index = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Capability { - return { index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO }; + return { + index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, + }; }, toJSON(message: Capability): unknown { @@ -78,7 +85,10 @@ export const Capability = { }; function createBaseOwner(): Owner { - return { module: "", name: "" }; + return { + module: "", + name: "", + }; } export const Owner = { @@ -86,9 +96,11 @@ export const Owner = { if (message.module !== "") { writer.uint32(10).string(message.module); } + if (message.name !== "") { writer.uint32(18).string(message.name); } + return writer; }, @@ -96,20 +108,25 @@ export const Owner = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOwner(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.module = reader.string(); break; + case 2: message.name = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -136,7 +153,9 @@ export const Owner = { }; function createBaseCapabilityOwners(): CapabilityOwners { - return { owners: [] }; + return { + owners: [], + }; } export const CapabilityOwners = { @@ -144,6 +163,7 @@ export const CapabilityOwners = { for (const v of message.owners) { Owner.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -151,31 +171,39 @@ export const CapabilityOwners = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCapabilityOwners(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.owners.push(Owner.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): CapabilityOwners { - return { owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => Owner.fromJSON(e)) : [] }; + return { + owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => Owner.fromJSON(e)) : [], + }; }, toJSON(message: CapabilityOwners): unknown { const obj: any = {}; + if (message.owners) { obj.owners = message.owners.map((e) => (e ? Owner.toJSON(e) : undefined)); } else { obj.owners = []; } + return obj; }, @@ -185,31 +213,3 @@ export const CapabilityOwners = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 4c74189c..bda819d3 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,19 +1,18 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { CapabilityOwners } from "./capability"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; - /** GenesisOwners defines the capability owners with their corresponding index. */ + export interface GenesisOwners { /** index is the index of the capability owner. */ index: Long; /** index_owners are the owners at the given index. */ - indexOwners?: CapabilityOwners; -} + indexOwners: CapabilityOwners; +} /** GenesisState defines the capability module's genesis state. */ + export interface GenesisState { /** index is the capability global index. */ index: Long; @@ -21,11 +20,15 @@ export interface GenesisState { * owners represents a map from index to owners of the capability index * index key is string to allow amino marshalling. */ + owners: GenesisOwners[]; } function createBaseGenesisOwners(): GenesisOwners { - return { index: Long.UZERO, indexOwners: undefined }; + return { + index: Long.UZERO, + indexOwners: undefined, + }; } export const GenesisOwners = { @@ -33,9 +36,11 @@ export const GenesisOwners = { if (!message.index.isZero()) { writer.uint32(8).uint64(message.index); } + if (message.indexOwners !== undefined) { CapabilityOwners.encode(message.indexOwners, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -43,26 +48,31 @@ export const GenesisOwners = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisOwners(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.index = reader.uint64() as Long; break; + case 2: message.indexOwners = CapabilityOwners.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GenesisOwners { return { - index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO, + index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, indexOwners: isSet(object.indexOwners) ? CapabilityOwners.fromJSON(object.indexOwners) : undefined, }; }, @@ -88,7 +98,10 @@ export const GenesisOwners = { }; function createBaseGenesisState(): GenesisState { - return { index: Long.UZERO, owners: [] }; + return { + index: Long.UZERO, + owners: [], + }; } export const GenesisState = { @@ -96,9 +109,11 @@ export const GenesisState = { if (!message.index.isZero()) { writer.uint32(8).uint64(message.index); } + for (const v of message.owners) { GenesisOwners.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -106,26 +121,31 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.index = reader.uint64() as Long; break; + case 2: message.owners.push(GenesisOwners.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GenesisState { return { - index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO, + index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => GenesisOwners.fromJSON(e)) : [], }; }, @@ -133,11 +153,13 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; message.index !== undefined && (obj.index = (message.index || Long.UZERO).toString()); + if (message.owners) { obj.owners = message.owners.map((e) => (e ? GenesisOwners.toJSON(e) : undefined)); } else { obj.owners = []; } + return obj; }, @@ -149,31 +171,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index 6bae6ca8..d96c142b 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,21 +1,21 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; 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; + constantFee: Coin; } function createBaseGenesisState(): GenesisState { - return { constantFee: undefined }; + return { + constantFee: undefined, + }; } export const GenesisState = { @@ -23,6 +23,7 @@ export const GenesisState = { if (message.constantFee !== undefined) { Coin.encode(message.constantFee, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -30,22 +31,28 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 3: message.constantFee = Coin.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GenesisState { - return { constantFee: isSet(object.constantFee) ? Coin.fromJSON(object.constantFee) : undefined }; + return { + constantFee: isSet(object.constantFee) ? Coin.fromJSON(object.constantFee) : undefined, + }; }, toJSON(message: GenesisState): unknown { @@ -64,31 +71,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index bb26bacd..81579806 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,21 +1,23 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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 {} function createBaseMsgVerifyInvariant(): MsgVerifyInvariant { - return { sender: "", invariantModuleName: "", invariantRoute: "" }; + return { + sender: "", + invariantModuleName: "", + invariantRoute: "", + }; } export const MsgVerifyInvariant = { @@ -23,12 +25,15 @@ export const MsgVerifyInvariant = { 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; }, @@ -36,23 +41,29 @@ export const MsgVerifyInvariant = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVerifyInvariant(); + 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; }, @@ -94,14 +105,17 @@ export const MsgVerifyInvariantResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVerifyInvariantResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -119,54 +133,23 @@ export const MsgVerifyInvariantResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the bank Msg service. */ export interface Msg { - /** VerifyInvariant defines a method to verify a particular invariance. */ VerifyInvariant(request: MsgVerifyInvariant): Promise; + /*VerifyInvariant defines a method to verify a particular invariance.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.VerifyInvariant = this.VerifyInvariant.bind(this); } + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index cb94dda4..89694266 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.ed25519"; - /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. * It's needed for Any serialization and SDK compatibility. @@ -11,20 +8,23 @@ export const protobufPackage = "cosmos.crypto.ed25519"; * ADR-28. Nevertheless, you will like to use ed25519 in app user level * then you must create a new proto message and follow ADR-28 for Address construction. */ + export interface PubKey { key: Uint8Array; } - /** * Deprecated: PrivKey defines a ed25519 private key. * NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. */ + export interface PrivKey { key: Uint8Array; } function createBasePubKey(): PubKey { - return { key: new Uint8Array() }; + return { + key: new Uint8Array(), + }; } export const PubKey = { @@ -32,6 +32,7 @@ export const PubKey = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + return writer; }, @@ -39,22 +40,28 @@ export const PubKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePubKey(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.key = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PubKey { - return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() }; + return { + key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), + }; }, toJSON(message: PubKey): unknown { @@ -72,7 +79,9 @@ export const PubKey = { }; function createBasePrivKey(): PrivKey { - return { key: new Uint8Array() }; + return { + key: new Uint8Array(), + }; } export const PrivKey = { @@ -80,6 +89,7 @@ export const PrivKey = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + return writer; }, @@ -87,22 +97,28 @@ export const PrivKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePrivKey(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.key = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PrivKey { - return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() }; + return { + key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), + }; }, toJSON(message: PrivKey): unknown { @@ -118,75 +134,3 @@ export const PrivKey = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index 464872e1..65bc9eb8 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,22 +1,23 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig"; - /** * LegacyAminoPubKey specifies a public key type * which nests multiple public keys and a threshold, * it uses legacy amino address rules. */ + export interface LegacyAminoPubKey { threshold: number; publicKeys: Any[]; } function createBaseLegacyAminoPubKey(): LegacyAminoPubKey { - return { threshold: 0, publicKeys: [] }; + return { + threshold: 0, + publicKeys: [], + }; } export const LegacyAminoPubKey = { @@ -24,9 +25,11 @@ export const LegacyAminoPubKey = { if (message.threshold !== 0) { writer.uint32(8).uint32(message.threshold); } + for (const v of message.publicKeys) { Any.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -34,20 +37,25 @@ export const LegacyAminoPubKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLegacyAminoPubKey(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.threshold = reader.uint32(); break; + case 2: message.publicKeys.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -61,11 +69,13 @@ export const LegacyAminoPubKey = { toJSON(message: LegacyAminoPubKey): unknown { const obj: any = {}; message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); + if (message.publicKeys) { obj.publicKeys = message.publicKeys.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.publicKeys = []; } + return obj; }, @@ -76,31 +86,3 @@ export const LegacyAminoPubKey = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index a1607c4b..1eab6888 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,31 +1,31 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; - /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. * See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers * signed and with which modes. */ + export interface MultiSignature { signatures: Uint8Array[]; } - /** * CompactBitArray is an implementation of a space efficient bit array. * This is used to ensure that the encoded data takes up a minimal amount of * space after proto encoding. * This is not thread safe, and is not intended for concurrent usage. */ + export interface CompactBitArray { extraBitsStored: number; elems: Uint8Array; } function createBaseMultiSignature(): MultiSignature { - return { signatures: [] }; + return { + signatures: [], + }; } export const MultiSignature = { @@ -33,6 +33,7 @@ export const MultiSignature = { for (const v of message.signatures) { writer.uint32(10).bytes(v!); } + return writer; }, @@ -40,17 +41,21 @@ export const MultiSignature = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMultiSignature(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signatures.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -64,11 +69,13 @@ export const MultiSignature = { toJSON(message: MultiSignature): unknown { const obj: any = {}; + if (message.signatures) { obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); } else { obj.signatures = []; } + return obj; }, @@ -80,7 +87,10 @@ export const MultiSignature = { }; function createBaseCompactBitArray(): CompactBitArray { - return { extraBitsStored: 0, elems: new Uint8Array() }; + return { + extraBitsStored: 0, + elems: new Uint8Array(), + }; } export const CompactBitArray = { @@ -88,9 +98,11 @@ export const CompactBitArray = { if (message.extraBitsStored !== 0) { writer.uint32(8).uint32(message.extraBitsStored); } + if (message.elems.length !== 0) { writer.uint32(18).bytes(message.elems); } + return writer; }, @@ -98,20 +110,25 @@ export const CompactBitArray = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCompactBitArray(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.extraBitsStored = reader.uint32(); break; + case 2: message.elems = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -137,75 +154,3 @@ export const CompactBitArray = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index edb4648b..f28dc5dd 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.secp256k1"; - /** * PubKey defines a secp256k1 public key * Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte @@ -11,17 +8,20 @@ export const protobufPackage = "cosmos.crypto.secp256k1"; * the x-coordinate. Otherwise the first byte is a 0x03. * This prefix is followed with the x-coordinate. */ + export interface PubKey { key: Uint8Array; } - /** PrivKey defines a secp256k1 private key. */ + export interface PrivKey { key: Uint8Array; } function createBasePubKey(): PubKey { - return { key: new Uint8Array() }; + return { + key: new Uint8Array(), + }; } export const PubKey = { @@ -29,6 +29,7 @@ export const PubKey = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + return writer; }, @@ -36,22 +37,28 @@ export const PubKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePubKey(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.key = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PubKey { - return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() }; + return { + key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), + }; }, toJSON(message: PubKey): unknown { @@ -69,7 +76,9 @@ export const PubKey = { }; function createBasePrivKey(): PrivKey { - return { key: new Uint8Array() }; + return { + key: new Uint8Array(), + }; } export const PrivKey = { @@ -77,6 +86,7 @@ export const PrivKey = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + return writer; }, @@ -84,22 +94,28 @@ export const PrivKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePrivKey(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.key = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PrivKey { - return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array() }; + return { + key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), + }; }, toJSON(message: PrivKey): unknown { @@ -115,75 +131,3 @@ export const PrivKey = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 3dfcd266..48d2c542 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,18 +1,15 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Coin, DecCoin } from "../../base/v1beta1/coin"; - +import { DecCoin, Coin } from "../../base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; 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. @@ -27,70 +24,70 @@ export interface Params { * 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: Long; } - /** * 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: Long; 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 @@ -99,25 +96,26 @@ export interface CommunityPoolSpendProposal { * the delegators within the validator may be left with less than a full token, * thus sdk.Dec is used. */ + export interface DelegatorStartingInfo { previousPeriod: Long; stake: string; height: Long; } - /** * 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; @@ -127,7 +125,12 @@ export interface CommunityPoolSpendProposalWithDeposit { } function createBaseParams(): Params { - return { communityTax: "", baseProposerReward: "", bonusProposerReward: "", withdrawAddrEnabled: false }; + return { + communityTax: "", + baseProposerReward: "", + bonusProposerReward: "", + withdrawAddrEnabled: false, + }; } export const Params = { @@ -135,15 +138,19 @@ export const Params = { 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; }, @@ -151,26 +158,33 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + 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; }, @@ -203,7 +217,10 @@ export const Params = { }; function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards { - return { cumulativeRewardRatio: [], referenceCount: 0 }; + return { + cumulativeRewardRatio: [], + referenceCount: 0, + }; } export const ValidatorHistoricalRewards = { @@ -211,9 +228,11 @@ export const ValidatorHistoricalRewards = { 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; }, @@ -221,20 +240,25 @@ export const ValidatorHistoricalRewards = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorHistoricalRewards(); + 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; }, @@ -249,6 +273,7 @@ export const ValidatorHistoricalRewards = { toJSON(message: ValidatorHistoricalRewards): unknown { const obj: any = {}; + if (message.cumulativeRewardRatio) { obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) => e ? DecCoin.toJSON(e) : undefined, @@ -256,6 +281,7 @@ export const ValidatorHistoricalRewards = { } else { obj.cumulativeRewardRatio = []; } + message.referenceCount !== undefined && (obj.referenceCount = Math.round(message.referenceCount)); return obj; }, @@ -271,7 +297,10 @@ export const ValidatorHistoricalRewards = { }; function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards { - return { rewards: [], period: Long.UZERO }; + return { + rewards: [], + period: Long.UZERO, + }; } export const ValidatorCurrentRewards = { @@ -279,9 +308,11 @@ export const ValidatorCurrentRewards = { for (const v of message.rewards) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (!message.period.isZero()) { writer.uint32(16).uint64(message.period); } + return writer; }, @@ -289,37 +320,44 @@ export const ValidatorCurrentRewards = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorCurrentRewards(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ValidatorCurrentRewards { return { rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [], - period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, + period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, }; }, 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 || Long.UZERO).toString()); return obj; }, @@ -334,7 +372,9 @@ export const ValidatorCurrentRewards = { }; function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission { - return { commission: [] }; + return { + commission: [], + }; } export const ValidatorAccumulatedCommission = { @@ -342,6 +382,7 @@ export const ValidatorAccumulatedCommission = { for (const v of message.commission) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -349,17 +390,21 @@ export const ValidatorAccumulatedCommission = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorAccumulatedCommission(); + 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; }, @@ -373,11 +418,13 @@ export const ValidatorAccumulatedCommission = { 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; }, @@ -391,7 +438,9 @@ export const ValidatorAccumulatedCommission = { }; function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards { - return { rewards: [] }; + return { + rewards: [], + }; } export const ValidatorOutstandingRewards = { @@ -399,6 +448,7 @@ export const ValidatorOutstandingRewards = { for (const v of message.rewards) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -406,17 +456,21 @@ export const ValidatorOutstandingRewards = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorOutstandingRewards(); + 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; }, @@ -428,11 +482,13 @@ export const ValidatorOutstandingRewards = { 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; }, @@ -446,7 +502,10 @@ export const ValidatorOutstandingRewards = { }; function createBaseValidatorSlashEvent(): ValidatorSlashEvent { - return { validatorPeriod: Long.UZERO, fraction: "" }; + return { + validatorPeriod: Long.UZERO, + fraction: "", + }; } export const ValidatorSlashEvent = { @@ -454,9 +513,11 @@ export const ValidatorSlashEvent = { if (!message.validatorPeriod.isZero()) { writer.uint32(8).uint64(message.validatorPeriod); } + if (message.fraction !== "") { writer.uint32(18).string(message.fraction); } + return writer; }, @@ -464,26 +525,31 @@ export const ValidatorSlashEvent = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorSlashEvent(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.validatorPeriod = reader.uint64() as Long; break; + case 2: message.fraction = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ValidatorSlashEvent { return { - validatorPeriod: isSet(object.validatorPeriod) ? Long.fromValue(object.validatorPeriod) : Long.UZERO, + validatorPeriod: isSet(object.validatorPeriod) ? Long.fromString(object.validatorPeriod) : Long.UZERO, fraction: isSet(object.fraction) ? String(object.fraction) : "", }; }, @@ -508,7 +574,9 @@ export const ValidatorSlashEvent = { }; function createBaseValidatorSlashEvents(): ValidatorSlashEvents { - return { validatorSlashEvents: [] }; + return { + validatorSlashEvents: [], + }; } export const ValidatorSlashEvents = { @@ -516,6 +584,7 @@ export const ValidatorSlashEvents = { for (const v of message.validatorSlashEvents) { ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -523,17 +592,21 @@ export const ValidatorSlashEvents = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorSlashEvents(); + 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; }, @@ -547,6 +620,7 @@ export const ValidatorSlashEvents = { toJSON(message: ValidatorSlashEvents): unknown { const obj: any = {}; + if (message.validatorSlashEvents) { obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEvent.toJSON(e) : undefined, @@ -554,6 +628,7 @@ export const ValidatorSlashEvents = { } else { obj.validatorSlashEvents = []; } + return obj; }, @@ -566,7 +641,9 @@ export const ValidatorSlashEvents = { }; function createBaseFeePool(): FeePool { - return { communityPool: [] }; + return { + communityPool: [], + }; } export const FeePool = { @@ -574,6 +651,7 @@ export const FeePool = { for (const v of message.communityPool) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -581,17 +659,21 @@ export const FeePool = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFeePool(); + 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; }, @@ -605,11 +687,13 @@ export const FeePool = { 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; }, @@ -621,7 +705,12 @@ export const FeePool = { }; function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal { - return { title: "", description: "", recipient: "", amount: [] }; + return { + title: "", + description: "", + recipient: "", + amount: [], + }; } export const CommunityPoolSpendProposal = { @@ -629,15 +718,19 @@ export const CommunityPoolSpendProposal = { 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; }, @@ -645,26 +738,33 @@ export const CommunityPoolSpendProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommunityPoolSpendProposal(); + 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; }, @@ -682,11 +782,13 @@ export const CommunityPoolSpendProposal = { 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; }, @@ -703,7 +805,11 @@ export const CommunityPoolSpendProposal = { }; function createBaseDelegatorStartingInfo(): DelegatorStartingInfo { - return { previousPeriod: Long.UZERO, stake: "", height: Long.UZERO }; + return { + previousPeriod: Long.UZERO, + stake: "", + height: Long.UZERO, + }; } export const DelegatorStartingInfo = { @@ -711,12 +817,15 @@ export const DelegatorStartingInfo = { if (!message.previousPeriod.isZero()) { writer.uint32(8).uint64(message.previousPeriod); } + if (message.stake !== "") { writer.uint32(18).string(message.stake); } + if (!message.height.isZero()) { writer.uint32(24).uint64(message.height); } + return writer; }, @@ -724,31 +833,37 @@ export const DelegatorStartingInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegatorStartingInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.previousPeriod = reader.uint64() as Long; break; + case 2: message.stake = reader.string(); break; + case 3: message.height = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): DelegatorStartingInfo { return { - previousPeriod: isSet(object.previousPeriod) ? Long.fromValue(object.previousPeriod) : Long.UZERO, + previousPeriod: isSet(object.previousPeriod) ? Long.fromString(object.previousPeriod) : Long.UZERO, stake: isSet(object.stake) ? String(object.stake) : "", - height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, }; }, @@ -775,7 +890,10 @@ export const DelegatorStartingInfo = { }; function createBaseDelegationDelegatorReward(): DelegationDelegatorReward { - return { validatorAddress: "", reward: [] }; + return { + validatorAddress: "", + reward: [], + }; } export const DelegationDelegatorReward = { @@ -783,9 +901,11 @@ export const DelegationDelegatorReward = { 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; }, @@ -793,20 +913,25 @@ export const DelegationDelegatorReward = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegationDelegatorReward(); + 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; }, @@ -820,11 +945,13 @@ export const DelegationDelegatorReward = { 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; }, @@ -839,7 +966,13 @@ export const DelegationDelegatorReward = { }; function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit { - return { title: "", description: "", recipient: "", amount: "", deposit: "" }; + return { + title: "", + description: "", + recipient: "", + amount: "", + deposit: "", + }; } export const CommunityPoolSpendProposalWithDeposit = { @@ -850,18 +983,23 @@ export const CommunityPoolSpendProposalWithDeposit = { 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; }, @@ -869,29 +1007,37 @@ export const CommunityPoolSpendProposalWithDeposit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommunityPoolSpendProposalWithDeposit(); + 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; }, @@ -927,31 +1073,3 @@ export const CommunityPoolSpendProposalWithDeposit = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index d63b8618..381ab18c 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,119 +1,140 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { DecCoin } from "../../base/v1beta1/coin"; import { - DelegatorStartingInfo, - FeePool, - Params, ValidatorAccumulatedCommission, - ValidatorCurrentRewards, ValidatorHistoricalRewards, + ValidatorCurrentRewards, + DelegatorStartingInfo, ValidatorSlashEvent, + Params, + FeePool, } from "./distribution"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; 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; -} + accumulated: ValidatorAccumulatedCommission; +} /** * 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: Long; /** rewards defines the historical rewards of a validator. */ - rewards?: ValidatorHistoricalRewards; -} + rewards: ValidatorHistoricalRewards; +} /** 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; -} + rewards: ValidatorCurrentRewards; +} /** 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; -} + startingInfo: DelegatorStartingInfo; +} /** 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: Long; /** period is the period of the slash event. */ + period: Long; /** validator_slash_event describes the slash event. */ - validatorSlashEvent?: ValidatorSlashEvent; -} + validatorSlashEvent: ValidatorSlashEvent; +} /** GenesisState defines the distribution module's genesis state. */ + export interface GenesisState { /** params defines all the paramaters of the module. */ - params?: Params; + params: Params; /** fee_pool defines the fee pool at genesis. */ - feePool?: FeePool; + + feePool: FeePool; /** 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[]; } function createBaseDelegatorWithdrawInfo(): DelegatorWithdrawInfo { - return { delegatorAddress: "", withdrawAddress: "" }; + return { + delegatorAddress: "", + withdrawAddress: "", + }; } export const DelegatorWithdrawInfo = { @@ -121,9 +142,11 @@ export const DelegatorWithdrawInfo = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + if (message.withdrawAddress !== "") { writer.uint32(18).string(message.withdrawAddress); } + return writer; }, @@ -131,20 +154,25 @@ export const DelegatorWithdrawInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegatorWithdrawInfo(); + 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; }, @@ -171,7 +199,10 @@ export const DelegatorWithdrawInfo = { }; function createBaseValidatorOutstandingRewardsRecord(): ValidatorOutstandingRewardsRecord { - return { validatorAddress: "", outstandingRewards: [] }; + return { + validatorAddress: "", + outstandingRewards: [], + }; } export const ValidatorOutstandingRewardsRecord = { @@ -179,9 +210,11 @@ export const ValidatorOutstandingRewardsRecord = { 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; }, @@ -189,20 +222,25 @@ export const ValidatorOutstandingRewardsRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorOutstandingRewardsRecord(); + 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; }, @@ -218,11 +256,13 @@ export const ValidatorOutstandingRewardsRecord = { 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; }, @@ -237,7 +277,10 @@ export const ValidatorOutstandingRewardsRecord = { }; function createBaseValidatorAccumulatedCommissionRecord(): ValidatorAccumulatedCommissionRecord { - return { validatorAddress: "", accumulated: undefined }; + return { + validatorAddress: "", + accumulated: undefined, + }; } export const ValidatorAccumulatedCommissionRecord = { @@ -248,9 +291,11 @@ export const ValidatorAccumulatedCommissionRecord = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + if (message.accumulated !== undefined) { ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -258,20 +303,25 @@ export const ValidatorAccumulatedCommissionRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorAccumulatedCommissionRecord(); + 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; }, @@ -308,7 +358,11 @@ export const ValidatorAccumulatedCommissionRecord = { }; function createBaseValidatorHistoricalRewardsRecord(): ValidatorHistoricalRewardsRecord { - return { validatorAddress: "", period: Long.UZERO, rewards: undefined }; + return { + validatorAddress: "", + period: Long.UZERO, + rewards: undefined, + }; } export const ValidatorHistoricalRewardsRecord = { @@ -316,12 +370,15 @@ export const ValidatorHistoricalRewardsRecord = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + if (!message.period.isZero()) { writer.uint32(16).uint64(message.period); } + if (message.rewards !== undefined) { ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -329,30 +386,36 @@ export const ValidatorHistoricalRewardsRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorHistoricalRewardsRecord(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.validatorAddress = reader.string(); break; + case 2: message.period = 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 { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, + period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, rewards: isSet(object.rewards) ? ValidatorHistoricalRewards.fromJSON(object.rewards) : undefined, }; }, @@ -382,7 +445,10 @@ export const ValidatorHistoricalRewardsRecord = { }; function createBaseValidatorCurrentRewardsRecord(): ValidatorCurrentRewardsRecord { - return { validatorAddress: "", rewards: undefined }; + return { + validatorAddress: "", + rewards: undefined, + }; } export const ValidatorCurrentRewardsRecord = { @@ -390,9 +456,11 @@ export const ValidatorCurrentRewardsRecord = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + if (message.rewards !== undefined) { ValidatorCurrentRewards.encode(message.rewards, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -400,20 +468,25 @@ export const ValidatorCurrentRewardsRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorCurrentRewardsRecord(); + 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; }, @@ -446,7 +519,11 @@ export const ValidatorCurrentRewardsRecord = { }; function createBaseDelegatorStartingInfoRecord(): DelegatorStartingInfoRecord { - return { delegatorAddress: "", validatorAddress: "", startingInfo: undefined }; + return { + delegatorAddress: "", + validatorAddress: "", + startingInfo: undefined, + }; } export const DelegatorStartingInfoRecord = { @@ -454,12 +531,15 @@ export const DelegatorStartingInfoRecord = { 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; }, @@ -467,23 +547,29 @@ export const DelegatorStartingInfoRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegatorStartingInfoRecord(); + 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; }, @@ -523,7 +609,12 @@ export const DelegatorStartingInfoRecord = { }; function createBaseValidatorSlashEventRecord(): ValidatorSlashEventRecord { - return { validatorAddress: "", height: Long.UZERO, period: Long.UZERO, validatorSlashEvent: undefined }; + return { + validatorAddress: "", + height: Long.UZERO, + period: Long.UZERO, + validatorSlashEvent: undefined, + }; } export const ValidatorSlashEventRecord = { @@ -531,15 +622,19 @@ export const ValidatorSlashEventRecord = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + if (!message.height.isZero()) { writer.uint32(16).uint64(message.height); } + if (!message.period.isZero()) { writer.uint32(24).uint64(message.period); } + if (message.validatorSlashEvent !== undefined) { ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -547,34 +642,41 @@ export const ValidatorSlashEventRecord = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorSlashEventRecord(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.validatorAddress = reader.string(); break; + case 2: message.height = reader.uint64() as Long; break; + case 3: message.period = 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 { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, - period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, + period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, validatorSlashEvent: isSet(object.validatorSlashEvent) ? ValidatorSlashEvent.fromJSON(object.validatorSlashEvent) : undefined, @@ -630,33 +732,43 @@ export const GenesisState = { 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; }, @@ -664,48 +776,61 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -745,6 +870,7 @@ export const GenesisState = { 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, @@ -752,7 +878,9 @@ export const GenesisState = { } else { obj.delegatorWithdrawInfos = []; } + message.previousProposer !== undefined && (obj.previousProposer = message.previousProposer); + if (message.outstandingRewards) { obj.outstandingRewards = message.outstandingRewards.map((e) => e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined, @@ -760,6 +888,7 @@ export const GenesisState = { } else { obj.outstandingRewards = []; } + if (message.validatorAccumulatedCommissions) { obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map((e) => e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined, @@ -767,6 +896,7 @@ export const GenesisState = { } else { obj.validatorAccumulatedCommissions = []; } + if (message.validatorHistoricalRewards) { obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map((e) => e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined, @@ -774,6 +904,7 @@ export const GenesisState = { } else { obj.validatorHistoricalRewards = []; } + if (message.validatorCurrentRewards) { obj.validatorCurrentRewards = message.validatorCurrentRewards.map((e) => e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined, @@ -781,6 +912,7 @@ export const GenesisState = { } else { obj.validatorCurrentRewards = []; } + if (message.delegatorStartingInfos) { obj.delegatorStartingInfos = message.delegatorStartingInfos.map((e) => e ? DelegatorStartingInfoRecord.toJSON(e) : undefined, @@ -788,6 +920,7 @@ export const GenesisState = { } else { obj.delegatorStartingInfos = []; } + if (message.validatorSlashEvents) { obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEventRecord.toJSON(e) : undefined, @@ -795,6 +928,7 @@ export const GenesisState = { } else { obj.validatorSlashEvents = []; } + return obj; }, @@ -826,31 +960,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index c1247a65..d951b43f 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,174 +1,178 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { DecCoin } from "../../base/v1beta1/coin"; import { - DelegationDelegatorReward, Params, - ValidatorAccumulatedCommission, ValidatorOutstandingRewards, + ValidatorAccumulatedCommission, ValidatorSlashEvent, + DelegationDelegatorReward, } from "./distribution"; - +import { DecCoin } from "../../base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; + params: Params; } - /** * 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; + rewards: ValidatorOutstandingRewards; } - /** * 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; + commission: ValidatorAccumulatedCommission; } - /** * 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: Long; + + startingHeight?: Long; /** starting_height defines the optional ending height to query the slashes. */ - endingHeight: Long; + + endingHeight?: Long; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * 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; } - /** * 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 {} +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[]; @@ -187,14 +191,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -214,7 +221,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -222,6 +231,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -229,22 +239,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -262,7 +278,9 @@ export const QueryParamsResponse = { }; function createBaseQueryValidatorOutstandingRewardsRequest(): QueryValidatorOutstandingRewardsRequest { - return { validatorAddress: "" }; + return { + validatorAddress: "", + }; } export const QueryValidatorOutstandingRewardsRequest = { @@ -273,6 +291,7 @@ export const QueryValidatorOutstandingRewardsRequest = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + return writer; }, @@ -280,22 +299,28 @@ export const QueryValidatorOutstandingRewardsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorOutstandingRewardsRequest(); + 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 { - return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" }; + return { + validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", + }; }, toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown { @@ -314,7 +339,9 @@ export const QueryValidatorOutstandingRewardsRequest = { }; function createBaseQueryValidatorOutstandingRewardsResponse(): QueryValidatorOutstandingRewardsResponse { - return { rewards: undefined }; + return { + rewards: undefined, + }; } export const QueryValidatorOutstandingRewardsResponse = { @@ -325,6 +352,7 @@ export const QueryValidatorOutstandingRewardsResponse = { if (message.rewards !== undefined) { ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -332,17 +360,21 @@ export const QueryValidatorOutstandingRewardsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorOutstandingRewardsResponse(); + 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; }, @@ -372,7 +404,9 @@ export const QueryValidatorOutstandingRewardsResponse = { }; function createBaseQueryValidatorCommissionRequest(): QueryValidatorCommissionRequest { - return { validatorAddress: "" }; + return { + validatorAddress: "", + }; } export const QueryValidatorCommissionRequest = { @@ -380,6 +414,7 @@ export const QueryValidatorCommissionRequest = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + return writer; }, @@ -387,22 +422,28 @@ export const QueryValidatorCommissionRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorCommissionRequest(); + 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 { - return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" }; + return { + validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", + }; }, toJSON(message: QueryValidatorCommissionRequest): unknown { @@ -421,7 +462,9 @@ export const QueryValidatorCommissionRequest = { }; function createBaseQueryValidatorCommissionResponse(): QueryValidatorCommissionResponse { - return { commission: undefined }; + return { + commission: undefined, + }; } export const QueryValidatorCommissionResponse = { @@ -429,6 +472,7 @@ export const QueryValidatorCommissionResponse = { if (message.commission !== undefined) { ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -436,17 +480,21 @@ export const QueryValidatorCommissionResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorCommissionResponse(); + 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; }, @@ -493,15 +541,19 @@ export const QueryValidatorSlashesRequest = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + if (!message.startingHeight.isZero()) { writer.uint32(16).uint64(message.startingHeight); } + if (!message.endingHeight.isZero()) { writer.uint32(24).uint64(message.endingHeight); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -509,34 +561,41 @@ export const QueryValidatorSlashesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorSlashesRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.validatorAddress = reader.string(); break; + case 2: message.startingHeight = reader.uint64() as Long; break; + case 3: message.endingHeight = 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 { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - startingHeight: isSet(object.startingHeight) ? Long.fromValue(object.startingHeight) : Long.UZERO, - endingHeight: isSet(object.endingHeight) ? Long.fromValue(object.endingHeight) : Long.UZERO, + startingHeight: isSet(object.startingHeight) ? Long.fromString(object.startingHeight) : Long.UZERO, + endingHeight: isSet(object.endingHeight) ? Long.fromString(object.endingHeight) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -575,7 +634,10 @@ export const QueryValidatorSlashesRequest = { }; function createBaseQueryValidatorSlashesResponse(): QueryValidatorSlashesResponse { - return { slashes: [], pagination: undefined }; + return { + slashes: [], + pagination: undefined, + }; } export const QueryValidatorSlashesResponse = { @@ -583,9 +645,11 @@ export const QueryValidatorSlashesResponse = { 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; }, @@ -593,20 +657,25 @@ export const QueryValidatorSlashesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorSlashesResponse(); + 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; }, @@ -621,11 +690,13 @@ export const QueryValidatorSlashesResponse = { 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; @@ -645,7 +716,10 @@ export const QueryValidatorSlashesResponse = { }; function createBaseQueryDelegationRewardsRequest(): QueryDelegationRewardsRequest { - return { delegatorAddress: "", validatorAddress: "" }; + return { + delegatorAddress: "", + validatorAddress: "", + }; } export const QueryDelegationRewardsRequest = { @@ -653,9 +727,11 @@ export const QueryDelegationRewardsRequest = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + if (message.validatorAddress !== "") { writer.uint32(18).string(message.validatorAddress); } + return writer; }, @@ -663,20 +739,25 @@ export const QueryDelegationRewardsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationRewardsRequest(); + 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; }, @@ -705,7 +786,9 @@ export const QueryDelegationRewardsRequest = { }; function createBaseQueryDelegationRewardsResponse(): QueryDelegationRewardsResponse { - return { rewards: [] }; + return { + rewards: [], + }; } export const QueryDelegationRewardsResponse = { @@ -713,6 +796,7 @@ export const QueryDelegationRewardsResponse = { for (const v of message.rewards) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -720,17 +804,21 @@ export const QueryDelegationRewardsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationRewardsResponse(); + 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; }, @@ -742,11 +830,13 @@ export const QueryDelegationRewardsResponse = { 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; }, @@ -760,7 +850,9 @@ export const QueryDelegationRewardsResponse = { }; function createBaseQueryDelegationTotalRewardsRequest(): QueryDelegationTotalRewardsRequest { - return { delegatorAddress: "" }; + return { + delegatorAddress: "", + }; } export const QueryDelegationTotalRewardsRequest = { @@ -768,6 +860,7 @@ export const QueryDelegationTotalRewardsRequest = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + return writer; }, @@ -775,22 +868,28 @@ export const QueryDelegationTotalRewardsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationTotalRewardsRequest(); + 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 { - return { delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" }; + return { + delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", + }; }, toJSON(message: QueryDelegationTotalRewardsRequest): unknown { @@ -809,7 +908,10 @@ export const QueryDelegationTotalRewardsRequest = { }; function createBaseQueryDelegationTotalRewardsResponse(): QueryDelegationTotalRewardsResponse { - return { rewards: [], total: [] }; + return { + rewards: [], + total: [], + }; } export const QueryDelegationTotalRewardsResponse = { @@ -817,9 +919,11 @@ export const QueryDelegationTotalRewardsResponse = { 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; }, @@ -827,20 +931,25 @@ export const QueryDelegationTotalRewardsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationTotalRewardsResponse(); + 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; }, @@ -855,16 +964,19 @@ export const QueryDelegationTotalRewardsResponse = { 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; }, @@ -879,7 +991,9 @@ export const QueryDelegationTotalRewardsResponse = { }; function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { - return { delegatorAddress: "" }; + return { + delegatorAddress: "", + }; } export const QueryDelegatorValidatorsRequest = { @@ -887,6 +1001,7 @@ export const QueryDelegatorValidatorsRequest = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + return writer; }, @@ -894,22 +1009,28 @@ export const QueryDelegatorValidatorsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorsRequest(); + 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 { - return { delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" }; + return { + delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", + }; }, toJSON(message: QueryDelegatorValidatorsRequest): unknown { @@ -928,7 +1049,9 @@ export const QueryDelegatorValidatorsRequest = { }; function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { - return { validators: [] }; + return { + validators: [], + }; } export const QueryDelegatorValidatorsResponse = { @@ -936,6 +1059,7 @@ export const QueryDelegatorValidatorsResponse = { for (const v of message.validators) { writer.uint32(10).string(v!); } + return writer; }, @@ -943,17 +1067,21 @@ export const QueryDelegatorValidatorsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorsResponse(); + 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; }, @@ -965,11 +1093,13 @@ export const QueryDelegatorValidatorsResponse = { toJSON(message: QueryDelegatorValidatorsResponse): unknown { const obj: any = {}; + if (message.validators) { obj.validators = message.validators.map((e) => e); } else { obj.validators = []; } + return obj; }, @@ -983,7 +1113,9 @@ export const QueryDelegatorValidatorsResponse = { }; function createBaseQueryDelegatorWithdrawAddressRequest(): QueryDelegatorWithdrawAddressRequest { - return { delegatorAddress: "" }; + return { + delegatorAddress: "", + }; } export const QueryDelegatorWithdrawAddressRequest = { @@ -994,6 +1126,7 @@ export const QueryDelegatorWithdrawAddressRequest = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + return writer; }, @@ -1001,22 +1134,28 @@ export const QueryDelegatorWithdrawAddressRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorWithdrawAddressRequest(); + 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 { - return { delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "" }; + return { + delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "", + }; }, toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown { @@ -1035,7 +1174,9 @@ export const QueryDelegatorWithdrawAddressRequest = { }; function createBaseQueryDelegatorWithdrawAddressResponse(): QueryDelegatorWithdrawAddressResponse { - return { withdrawAddress: "" }; + return { + withdrawAddress: "", + }; } export const QueryDelegatorWithdrawAddressResponse = { @@ -1046,6 +1187,7 @@ export const QueryDelegatorWithdrawAddressResponse = { if (message.withdrawAddress !== "") { writer.uint32(10).string(message.withdrawAddress); } + return writer; }, @@ -1053,22 +1195,28 @@ export const QueryDelegatorWithdrawAddressResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorWithdrawAddressResponse(); + 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 { - return { withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "" }; + return { + withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "", + }; }, toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown { @@ -1099,14 +1247,17 @@ export const QueryCommunityPoolRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCommunityPoolRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1126,7 +1277,9 @@ export const QueryCommunityPoolRequest = { }; function createBaseQueryCommunityPoolResponse(): QueryCommunityPoolResponse { - return { pool: [] }; + return { + pool: [], + }; } export const QueryCommunityPoolResponse = { @@ -1134,6 +1287,7 @@ export const QueryCommunityPoolResponse = { for (const v of message.pool) { DecCoin.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1141,31 +1295,39 @@ export const QueryCommunityPoolResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCommunityPoolResponse(); + 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 { - return { pool: Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromJSON(e)) : [] }; + return { + pool: Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromJSON(e)) : [], + }; }, 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; }, @@ -1177,40 +1339,46 @@ export const QueryCommunityPoolResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. */ + Params(request?: QueryParamsRequest): Promise; + /*Params queries params of the distribution module.*/ + ValidatorOutstandingRewards( request: QueryValidatorOutstandingRewardsRequest, ): Promise; - /** ValidatorCommission queries accumulated commission for a validator. */ + /*ValidatorOutstandingRewards queries rewards of a validator address.*/ + ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - /** ValidatorSlashes queries slash events of a validator. */ + /*ValidatorCommission queries accumulated commission for a validator.*/ + ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /** DelegationRewards queries the total rewards accrued by a delegation. */ + /*ValidatorSlashes queries slash events of a validator.*/ + DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - /** - * DelegationTotalRewards queries the total rewards accrued by a each - * validator. - */ + /*DelegationRewards queries the total rewards accrued by a delegation.*/ + DelegationTotalRewards( request: QueryDelegationTotalRewardsRequest, ): Promise; - /** DelegatorValidators queries the validators of a delegator. */ + /*DelegationTotalRewards queries the total rewards accrued by a each + validator.*/ + DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ + /*DelegatorValidators queries the validators of a delegator.*/ + DelegatorWithdrawAddress( request: QueryDelegatorWithdrawAddressRequest, ): Promise; - /** CommunityPool queries the community pool coins. */ - CommunityPool(request: QueryCommunityPoolRequest): Promise; -} + /*DelegatorWithdrawAddress queries withdraw address of a delegator.*/ + CommunityPool(request?: QueryCommunityPoolRequest): Promise; + /*CommunityPool queries the community pool coins.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); @@ -1223,7 +1391,8 @@ export class QueryClientImpl implements Query { this.DelegatorWithdrawAddress = this.DelegatorWithdrawAddress.bind(this); this.CommunityPool = this.CommunityPool.bind(this); } - Params(request: QueryParamsRequest): Promise { + + 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 _m0.Reader(data))); @@ -1281,41 +1450,9 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryDelegatorWithdrawAddressResponse.decode(new _m0.Reader(data))); } - CommunityPool(request: QueryCommunityPoolRequest): Promise { + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index ce8515cd..0bbafe61 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,59 +1,60 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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 {} +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 {} +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 {} +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 {} function createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress { - return { delegatorAddress: "", withdrawAddress: "" }; + return { + delegatorAddress: "", + withdrawAddress: "", + }; } export const MsgSetWithdrawAddress = { @@ -61,9 +62,11 @@ export const MsgSetWithdrawAddress = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + if (message.withdrawAddress !== "") { writer.uint32(18).string(message.withdrawAddress); } + return writer; }, @@ -71,20 +74,25 @@ export const MsgSetWithdrawAddress = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetWithdrawAddress(); + 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; }, @@ -123,14 +131,17 @@ export const MsgSetWithdrawAddressResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetWithdrawAddressResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -152,7 +163,10 @@ export const MsgSetWithdrawAddressResponse = { }; function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { - return { delegatorAddress: "", validatorAddress: "" }; + return { + delegatorAddress: "", + validatorAddress: "", + }; } export const MsgWithdrawDelegatorReward = { @@ -160,9 +174,11 @@ export const MsgWithdrawDelegatorReward = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + if (message.validatorAddress !== "") { writer.uint32(18).string(message.validatorAddress); } + return writer; }, @@ -170,20 +186,25 @@ export const MsgWithdrawDelegatorReward = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawDelegatorReward(); + 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; }, @@ -224,14 +245,17 @@ export const MsgWithdrawDelegatorRewardResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawDelegatorRewardResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -253,7 +277,9 @@ export const MsgWithdrawDelegatorRewardResponse = { }; function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { - return { validatorAddress: "" }; + return { + validatorAddress: "", + }; } export const MsgWithdrawValidatorCommission = { @@ -261,6 +287,7 @@ export const MsgWithdrawValidatorCommission = { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } + return writer; }, @@ -268,22 +295,28 @@ export const MsgWithdrawValidatorCommission = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawValidatorCommission(); + 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 { - return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "" }; + return { + validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", + }; }, toJSON(message: MsgWithdrawValidatorCommission): unknown { @@ -314,14 +347,17 @@ export const MsgWithdrawValidatorCommissionResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawValidatorCommissionResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -343,7 +379,10 @@ export const MsgWithdrawValidatorCommissionResponse = { }; function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { - return { amount: [], depositor: "" }; + return { + amount: [], + depositor: "", + }; } export const MsgFundCommunityPool = { @@ -351,9 +390,11 @@ export const MsgFundCommunityPool = { 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; }, @@ -361,20 +402,25 @@ export const MsgFundCommunityPool = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgFundCommunityPool(); + 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; }, @@ -387,11 +433,13 @@ export const MsgFundCommunityPool = { 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; }, @@ -417,14 +465,17 @@ export const MsgFundCommunityPoolResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgFundCommunityPoolResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -444,35 +495,30 @@ export const MsgFundCommunityPoolResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. - */ + /*SetWithdrawAddress defines a method to change the withdraw address + for a delegator (or validator self-delegation).*/ + WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; - /** - * WithdrawValidatorCommission defines a method to withdraw the - * full commission to the validator address. - */ + /*WithdrawDelegatorReward defines a method to withdraw rewards of delegator + from a single validator.*/ + WithdrawValidatorCommission( request: MsgWithdrawValidatorCommission, ): Promise; - /** - * FundCommunityPool defines a method to allow an account to directly - * fund the community pool. - */ + /*WithdrawValidatorCommission defines a method to withdraw the + full commission to the validator address.*/ + FundCommunityPool(request: MsgFundCommunityPool): Promise; + /*FundCommunityPool defines a method to allow an account to directly + fund the community pool.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.SetWithdrawAddress = this.SetWithdrawAddress.bind(this); @@ -480,6 +526,7 @@ export class MsgClientImpl implements Msg { this.WithdrawValidatorCommission = this.WithdrawValidatorCommission.bind(this); this.FundCommunityPool = this.FundCommunityPool.bind(this); } + SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise { const data = MsgSetWithdrawAddress.encode(request).finish(); const promise = this.rpc.request("cosmos.distribution.v1beta1.Msg", "SetWithdrawAddress", data); @@ -506,35 +553,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgFundCommunityPoolResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index 21b74ee1..2a83261e 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,23 +1,26 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Timestamp } from "../../../google/protobuf/timestamp"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; - /** * Equivocation implements the Evidence interface and defines evidence of double * signing misbehavior. */ + export interface Equivocation { height: Long; - time?: Timestamp; + time: Timestamp; power: Long; consensusAddress: string; } function createBaseEquivocation(): Equivocation { - return { height: Long.ZERO, time: undefined, power: Long.ZERO, consensusAddress: "" }; + return { + height: Long.ZERO, + time: undefined, + power: Long.ZERO, + consensusAddress: "", + }; } export const Equivocation = { @@ -25,15 +28,19 @@ export const Equivocation = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + if (message.time !== undefined) { Timestamp.encode(message.time, writer.uint32(18).fork()).ldelim(); } + if (!message.power.isZero()) { writer.uint32(24).int64(message.power); } + if (message.consensusAddress !== "") { writer.uint32(34).string(message.consensusAddress); } + return writer; }, @@ -41,34 +48,41 @@ export const Equivocation = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEquivocation(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + case 2: message.time = Timestamp.decode(reader, reader.uint32()); break; + case 3: message.power = reader.int64() as Long; break; + case 4: message.consensusAddress = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Equivocation { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, consensusAddress: isSet(object.consensusAddress) ? String(object.consensusAddress) : "", }; }, @@ -94,57 +108,3 @@ export const Equivocation = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index 9da2a509..50ea2933 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,18 +1,18 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact } from "../../../helpers"; 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[]; } function createBaseGenesisState(): GenesisState { - return { evidence: [] }; + return { + evidence: [], + }; } export const GenesisState = { @@ -20,6 +20,7 @@ export const GenesisState = { for (const v of message.evidence) { Any.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -27,17 +28,21 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.evidence.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -49,11 +54,13 @@ export const GenesisState = { 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; }, @@ -63,27 +70,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index afcd76e9..64610ce4 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,45 +1,46 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; - +import { Any } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Rpc } from "../../../helpers"; 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; + evidence: Any; } - /** * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC * method. */ + export interface QueryAllEvidenceRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * 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; } function createBaseQueryEvidenceRequest(): QueryEvidenceRequest { - return { evidenceHash: new Uint8Array() }; + return { + evidenceHash: new Uint8Array(), + }; } export const QueryEvidenceRequest = { @@ -47,6 +48,7 @@ export const QueryEvidenceRequest = { if (message.evidenceHash.length !== 0) { writer.uint32(10).bytes(message.evidenceHash); } + return writer; }, @@ -54,17 +56,21 @@ export const QueryEvidenceRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryEvidenceRequest(); + 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; }, @@ -91,7 +97,9 @@ export const QueryEvidenceRequest = { }; function createBaseQueryEvidenceResponse(): QueryEvidenceResponse { - return { evidence: undefined }; + return { + evidence: undefined, + }; } export const QueryEvidenceResponse = { @@ -99,6 +107,7 @@ export const QueryEvidenceResponse = { if (message.evidence !== undefined) { Any.encode(message.evidence, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -106,22 +115,28 @@ export const QueryEvidenceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryEvidenceResponse(); + 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 { - return { evidence: isSet(object.evidence) ? Any.fromJSON(object.evidence) : undefined }; + return { + evidence: isSet(object.evidence) ? Any.fromJSON(object.evidence) : undefined, + }; }, toJSON(message: QueryEvidenceResponse): unknown { @@ -142,7 +157,9 @@ export const QueryEvidenceResponse = { }; function createBaseQueryAllEvidenceRequest(): QueryAllEvidenceRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryAllEvidenceRequest = { @@ -150,6 +167,7 @@ export const QueryAllEvidenceRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -157,22 +175,28 @@ export const QueryAllEvidenceRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllEvidenceRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryAllEvidenceRequest): unknown { @@ -193,7 +217,10 @@ export const QueryAllEvidenceRequest = { }; function createBaseQueryAllEvidenceResponse(): QueryAllEvidenceResponse { - return { evidence: [], pagination: undefined }; + return { + evidence: [], + pagination: undefined, + }; } export const QueryAllEvidenceResponse = { @@ -201,9 +228,11 @@ export const QueryAllEvidenceResponse = { 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; }, @@ -211,20 +240,25 @@ export const QueryAllEvidenceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllEvidenceResponse(); + 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; }, @@ -237,11 +271,13 @@ export const QueryAllEvidenceResponse = { 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; @@ -259,107 +295,37 @@ export const QueryAllEvidenceResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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; -} + /*Evidence queries evidence based on evidence hash.*/ + AllEvidence(request?: QueryAllEvidenceRequest): Promise; + /*AllEvidence queries all evidence.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Evidence = this.Evidence.bind(this); this.AllEvidence = this.AllEvidence.bind(this); } + 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 _m0.Reader(data))); } - AllEvidence(request: QueryAllEvidenceRequest): Promise { + AllEvidence( + request: QueryAllEvidenceRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 50b4b82d..dcddf256 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,27 +1,28 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; 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; + evidence: Any; } - /** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ + export interface MsgSubmitEvidenceResponse { /** hash defines the hash of the evidence. */ hash: Uint8Array; } function createBaseMsgSubmitEvidence(): MsgSubmitEvidence { - return { submitter: "", evidence: undefined }; + return { + submitter: "", + evidence: undefined, + }; } export const MsgSubmitEvidence = { @@ -29,9 +30,11 @@ export const MsgSubmitEvidence = { if (message.submitter !== "") { writer.uint32(10).string(message.submitter); } + if (message.evidence !== undefined) { Any.encode(message.evidence, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -39,20 +42,25 @@ export const MsgSubmitEvidence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitEvidence(); + 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; }, @@ -83,7 +91,9 @@ export const MsgSubmitEvidence = { }; function createBaseMsgSubmitEvidenceResponse(): MsgSubmitEvidenceResponse { - return { hash: new Uint8Array() }; + return { + hash: new Uint8Array(), + }; } export const MsgSubmitEvidenceResponse = { @@ -91,6 +101,7 @@ export const MsgSubmitEvidenceResponse = { if (message.hash.length !== 0) { writer.uint32(34).bytes(message.hash); } + return writer; }, @@ -98,22 +109,28 @@ export const MsgSubmitEvidenceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitEvidenceResponse(); + 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 { - return { hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() }; + return { + hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), + }; }, toJSON(message: MsgSubmitEvidenceResponse): unknown { @@ -131,101 +148,24 @@ export const MsgSubmitEvidenceResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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; + /*SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or + counterfactual signing.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.SubmitEvidence = this.SubmitEvidence.bind(this); } + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index cc2d4140..c044e796 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,19 +1,15 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin } from "../../base/v1beta1/coin"; - +import { Timestamp } from "../../../google/protobuf/timestamp"; +import { Duration } from "../../../google/protobuf/duration"; +import { Any } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** * BasicAllowance implements Allowance with a one-time grant of tokens * that optionally expires. The grantee can use up to SpendLimit to cover fees. */ + export interface BasicAllowance { /** * spend_limit specifies the maximum amount of tokens that can be spent @@ -22,56 +18,67 @@ export interface BasicAllowance { */ spendLimit: Coin[]; /** expiration specifies an optional time when this allowance expires */ - expiration?: Timestamp; -} + expiration: Timestamp; +} /** * PeriodicAllowance extends Allowance to allow for both a maximum cap, * as well as a limit per time period. */ + export interface PeriodicAllowance { /** basic specifies a struct of `BasicAllowance` */ - basic?: BasicAllowance; + basic: BasicAllowance; /** * period specifies the time duration in which period_spend_limit coins can * be spent before that allowance is reset */ - period?: Duration; + + period: Duration; /** * period_spend_limit specifies the maximum number of coins that can be spent * in the period */ + periodSpendLimit: Coin[]; /** period_can_spend is the number of coins left to be spent before the period_reset time */ + periodCanSpend: Coin[]; /** * period_reset is the time at which this period resets and a new one begins, * it is calculated from the start time of the first transaction after the * last period ended */ - periodReset?: Timestamp; -} + periodReset: Timestamp; +} /** AllowedMsgAllowance creates allowance only for specified message types. */ + export interface AllowedMsgAllowance { /** allowance can be any of basic and filtered fee allowance. */ - allowance?: Any; + allowance: Any; /** allowed_messages are the messages for which the grantee has the access. */ + allowedMessages: string[]; } - /** Grant is stored in the KVStore to record a grant with full context */ + export interface Grant { /** granter is the address of the user granting an allowance of their funds. */ granter: string; /** grantee is the address of the user being granted an allowance of another user's funds. */ + grantee: string; /** allowance can be any of basic and filtered fee allowance. */ - allowance?: Any; + + allowance: Any; } function createBaseBasicAllowance(): BasicAllowance { - return { spendLimit: [], expiration: undefined }; + return { + spendLimit: [], + expiration: undefined, + }; } export const BasicAllowance = { @@ -79,9 +86,11 @@ export const BasicAllowance = { for (const v of message.spendLimit) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.expiration !== undefined) { Timestamp.encode(message.expiration, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -89,20 +98,25 @@ export const BasicAllowance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBasicAllowance(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.spendLimit.push(Coin.decode(reader, reader.uint32())); break; + case 2: message.expiration = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -117,11 +131,13 @@ export const BasicAllowance = { toJSON(message: BasicAllowance): unknown { const obj: any = {}; + if (message.spendLimit) { obj.spendLimit = message.spendLimit.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.spendLimit = []; } + message.expiration !== undefined && (obj.expiration = fromTimestamp(message.expiration).toISOString()); return obj; }, @@ -152,18 +168,23 @@ export const PeriodicAllowance = { if (message.basic !== undefined) { BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim(); } + if (message.period !== undefined) { Duration.encode(message.period, writer.uint32(18).fork()).ldelim(); } + for (const v of message.periodSpendLimit) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } + for (const v of message.periodCanSpend) { Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } + if (message.periodReset !== undefined) { Timestamp.encode(message.periodReset, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -171,29 +192,37 @@ export const PeriodicAllowance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePeriodicAllowance(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.basic = BasicAllowance.decode(reader, reader.uint32()); break; + case 2: message.period = Duration.decode(reader, reader.uint32()); break; + case 3: message.periodSpendLimit.push(Coin.decode(reader, reader.uint32())); break; + case 4: message.periodCanSpend.push(Coin.decode(reader, reader.uint32())); break; + case 5: message.periodReset = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -215,18 +244,20 @@ export const PeriodicAllowance = { const obj: any = {}; message.basic !== undefined && (obj.basic = message.basic ? BasicAllowance.toJSON(message.basic) : undefined); - message.period !== undefined && - (obj.period = message.period ? Duration.toJSON(message.period) : undefined); + message.period !== undefined && (obj.period = message.period); + if (message.periodSpendLimit) { obj.periodSpendLimit = message.periodSpendLimit.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.periodSpendLimit = []; } + if (message.periodCanSpend) { obj.periodCanSpend = message.periodCanSpend.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.periodCanSpend = []; } + message.periodReset !== undefined && (obj.periodReset = fromTimestamp(message.periodReset).toISOString()); return obj; }, @@ -237,8 +268,7 @@ export const PeriodicAllowance = { object.basic !== undefined && object.basic !== null ? BasicAllowance.fromPartial(object.basic) : undefined; - message.period = - object.period !== undefined && object.period !== null ? Duration.fromPartial(object.period) : undefined; + message.period = object.period ?? undefined; message.periodSpendLimit = object.periodSpendLimit?.map((e) => Coin.fromPartial(e)) || []; message.periodCanSpend = object.periodCanSpend?.map((e) => Coin.fromPartial(e)) || []; message.periodReset = @@ -250,7 +280,10 @@ export const PeriodicAllowance = { }; function createBaseAllowedMsgAllowance(): AllowedMsgAllowance { - return { allowance: undefined, allowedMessages: [] }; + return { + allowance: undefined, + allowedMessages: [], + }; } export const AllowedMsgAllowance = { @@ -258,9 +291,11 @@ export const AllowedMsgAllowance = { if (message.allowance !== undefined) { Any.encode(message.allowance, writer.uint32(10).fork()).ldelim(); } + for (const v of message.allowedMessages) { writer.uint32(18).string(v!); } + return writer; }, @@ -268,20 +303,25 @@ export const AllowedMsgAllowance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAllowedMsgAllowance(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.allowance = Any.decode(reader, reader.uint32()); break; + case 2: message.allowedMessages.push(reader.string()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -298,11 +338,13 @@ export const AllowedMsgAllowance = { const obj: any = {}; message.allowance !== undefined && (obj.allowance = message.allowance ? Any.toJSON(message.allowance) : undefined); + if (message.allowedMessages) { obj.allowedMessages = message.allowedMessages.map((e) => e); } else { obj.allowedMessages = []; } + return obj; }, @@ -318,7 +360,11 @@ export const AllowedMsgAllowance = { }; function createBaseGrant(): Grant { - return { granter: "", grantee: "", allowance: undefined }; + return { + granter: "", + grantee: "", + allowance: undefined, + }; } export const Grant = { @@ -326,12 +372,15 @@ export const Grant = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.allowance !== undefined) { Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -339,23 +388,29 @@ export const Grant = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGrant(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.allowance = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -387,57 +442,3 @@ export const Grant = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 459486e0..d42e4975 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,19 +1,17 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Grant } from "./feegrant"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** GenesisState contains a set of fee allowances, persisted from the store */ + export interface GenesisState { allowances: Grant[]; } function createBaseGenesisState(): GenesisState { - return { allowances: [] }; + return { + allowances: [], + }; } export const GenesisState = { @@ -21,6 +19,7 @@ export const GenesisState = { for (const v of message.allowances) { Grant.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -28,17 +27,21 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.allowances.push(Grant.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -52,11 +55,13 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; + if (message.allowances) { obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); } else { obj.allowances = []; } + return obj; }, @@ -66,27 +71,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 6add78b9..23ec5fbc 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,44 +1,46 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ + export interface QueryAllowanceRequest { /** granter is the address of the user granting an allowance of their funds. */ granter: string; /** grantee is the address of the user being granted an allowance of another user's funds. */ + grantee: string; } - /** QueryAllowanceResponse is the response type for the Query/Allowance RPC method. */ + export interface QueryAllowanceResponse { /** allowance is a allowance granted for grantee by granter. */ - allowance?: Grant; + allowance: Grant; } - /** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ + export interface QueryAllowancesRequest { grantee: string; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** QueryAllowancesResponse is the response type for the Query/Allowances RPC method. */ + export interface QueryAllowancesResponse { /** allowances are allowance's granted for grantee by granter. */ allowances: Grant[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } function createBaseQueryAllowanceRequest(): QueryAllowanceRequest { - return { granter: "", grantee: "" }; + return { + granter: "", + grantee: "", + }; } export const QueryAllowanceRequest = { @@ -46,9 +48,11 @@ export const QueryAllowanceRequest = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + return writer; }, @@ -56,20 +60,25 @@ export const QueryAllowanceRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowanceRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -96,7 +105,9 @@ export const QueryAllowanceRequest = { }; function createBaseQueryAllowanceResponse(): QueryAllowanceResponse { - return { allowance: undefined }; + return { + allowance: undefined, + }; } export const QueryAllowanceResponse = { @@ -104,6 +115,7 @@ export const QueryAllowanceResponse = { if (message.allowance !== undefined) { Grant.encode(message.allowance, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -111,22 +123,28 @@ export const QueryAllowanceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowanceResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.allowance = Grant.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAllowanceResponse { - return { allowance: isSet(object.allowance) ? Grant.fromJSON(object.allowance) : undefined }; + return { + allowance: isSet(object.allowance) ? Grant.fromJSON(object.allowance) : undefined, + }; }, toJSON(message: QueryAllowanceResponse): unknown { @@ -147,7 +165,10 @@ export const QueryAllowanceResponse = { }; function createBaseQueryAllowancesRequest(): QueryAllowancesRequest { - return { grantee: "", pagination: undefined }; + return { + grantee: "", + pagination: undefined, + }; } export const QueryAllowancesRequest = { @@ -155,9 +176,11 @@ export const QueryAllowancesRequest = { if (message.grantee !== "") { writer.uint32(10).string(message.grantee); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -165,20 +188,25 @@ export const QueryAllowancesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowancesRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.grantee = reader.string(); break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -209,7 +237,10 @@ export const QueryAllowancesRequest = { }; function createBaseQueryAllowancesResponse(): QueryAllowancesResponse { - return { allowances: [], pagination: undefined }; + return { + allowances: [], + pagination: undefined, + }; } export const QueryAllowancesResponse = { @@ -217,9 +248,11 @@ export const QueryAllowancesResponse = { for (const v of message.allowances) { Grant.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -227,20 +260,25 @@ export const QueryAllowancesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowancesResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.allowances.push(Grant.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -255,11 +293,13 @@ export const QueryAllowancesResponse = { toJSON(message: QueryAllowancesResponse): unknown { const obj: any = {}; + if (message.allowances) { obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); } else { obj.allowances = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -275,22 +315,24 @@ export const QueryAllowancesResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query defines the gRPC querier service. */ export interface Query { - /** Allowance returns fee granted to the grantee by the granter. */ Allowance(request: QueryAllowanceRequest): Promise; - /** Allowances returns all the grants for address. */ + /*Allowance returns fee granted to the grantee by the granter.*/ + Allowances(request: QueryAllowancesRequest): Promise; + /*Allowances returns all the grants for address.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Allowance = this.Allowance.bind(this); this.Allowances = this.Allowances.bind(this); } + Allowance(request: QueryAllowanceRequest): Promise { const data = QueryAllowanceRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowance", data); @@ -303,35 +345,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryAllowancesResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index d5729525..54200059 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,41 +1,44 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; - -/** Since: cosmos-sdk 0.43 */ - /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance * of fees from the account of Granter. */ + export interface MsgGrantAllowance { /** granter is the address of the user granting an allowance of their funds. */ granter: string; /** grantee is the address of the user being granted an allowance of another user's funds. */ + grantee: string; /** allowance can be any of basic and filtered fee allowance. */ - allowance?: Any; -} + allowance: Any; +} /** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ -export interface MsgGrantAllowanceResponse {} +export interface MsgGrantAllowanceResponse {} /** MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. */ + export interface MsgRevokeAllowance { /** granter is the address of the user granting an allowance of their funds. */ granter: string; /** grantee is the address of the user being granted an allowance of another user's funds. */ + grantee: string; } - /** MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. */ + export interface MsgRevokeAllowanceResponse {} function createBaseMsgGrantAllowance(): MsgGrantAllowance { - return { granter: "", grantee: "", allowance: undefined }; + return { + granter: "", + grantee: "", + allowance: undefined, + }; } export const MsgGrantAllowance = { @@ -43,12 +46,15 @@ export const MsgGrantAllowance = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + if (message.allowance !== undefined) { Any.encode(message.allowance, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -56,23 +62,29 @@ export const MsgGrantAllowance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGrantAllowance(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + case 3: message.allowance = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -118,14 +130,17 @@ export const MsgGrantAllowanceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgGrantAllowanceResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -145,7 +160,10 @@ export const MsgGrantAllowanceResponse = { }; function createBaseMsgRevokeAllowance(): MsgRevokeAllowance { - return { granter: "", grantee: "" }; + return { + granter: "", + grantee: "", + }; } export const MsgRevokeAllowance = { @@ -153,9 +171,11 @@ export const MsgRevokeAllowance = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.grantee !== "") { writer.uint32(18).string(message.grantee); } + return writer; }, @@ -163,20 +183,25 @@ export const MsgRevokeAllowance = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeAllowance(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.grantee = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -215,14 +240,17 @@ export const MsgRevokeAllowanceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeAllowanceResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -240,28 +268,26 @@ export const MsgRevokeAllowanceResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the feegrant msg service. */ export interface Msg { - /** - * GrantAllowance grants fee allowance to the grantee on the granter's - * account with the provided expiration time. - */ GrantAllowance(request: MsgGrantAllowance): Promise; - /** - * RevokeAllowance revokes any fee allowance of granter's account that - * has been granted to the grantee. - */ + /*GrantAllowance grants fee allowance to the grantee on the granter's + account with the provided expiration time.*/ + RevokeAllowance(request: MsgRevokeAllowance): Promise; + /*RevokeAllowance revokes any fee allowance of granter's account that + has been granted to the grantee.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.GrantAllowance = this.GrantAllowance.bind(this); this.RevokeAllowance = this.RevokeAllowance.bind(this); } + GrantAllowance(request: MsgGrantAllowance): Promise { const data = MsgGrantAllowance.encode(request).finish(); const promise = this.rpc.request("cosmos.feegrant.v1beta1.Msg", "GrantAllowance", data); @@ -274,35 +300,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgRevokeAllowanceResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 8d55a9b8..481681e3 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,17 +1,17 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.genutil.v1beta1"; - /** GenesisState defines the raw genesis transaction in JSON. */ + export interface GenesisState { /** gen_txs defines the genesis transactions. */ genTxs: Uint8Array[]; } function createBaseGenesisState(): GenesisState { - return { genTxs: [] }; + return { + genTxs: [], + }; } export const GenesisState = { @@ -19,6 +19,7 @@ export const GenesisState = { for (const v of message.genTxs) { writer.uint32(10).bytes(v!); } + return writer; }, @@ -26,31 +27,39 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.genTxs.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GenesisState { - return { genTxs: Array.isArray(object?.genTxs) ? object.genTxs.map((e: any) => bytesFromBase64(e)) : [] }; + return { + genTxs: Array.isArray(object?.genTxs) ? object.genTxs.map((e: any) => bytesFromBase64(e)) : [], + }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; + if (message.genTxs) { obj.genTxs = message.genTxs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); } else { obj.genTxs = []; } + return obj; }, @@ -60,71 +69,3 @@ export const GenesisState = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index aabb2ea2..afe27b83 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,26 +1,30 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Deposit, DepositParams, Proposal, TallyParams, Vote, VotingParams } from "./gov"; - +import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; 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: Long; /** 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; + + depositParams: DepositParams; /** params defines all the paramaters of related to voting. */ - votingParams?: VotingParams; + + votingParams: VotingParams; /** params defines all the paramaters of related to tally. */ - tallyParams?: TallyParams; + + tallyParams: TallyParams; } function createBaseGenesisState(): GenesisState { @@ -40,24 +44,31 @@ export const GenesisState = { if (!message.startingProposalId.isZero()) { 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; }, @@ -65,42 +76,52 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.startingProposalId = 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 { return { startingProposalId: isSet(object.startingProposalId) - ? Long.fromValue(object.startingProposalId) + ? Long.fromString(object.startingProposalId) : Long.UZERO, deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], @@ -117,21 +138,25 @@ export const GenesisState = { const obj: any = {}; message.startingProposalId !== undefined && (obj.startingProposalId = (message.startingProposalId || Long.UZERO).toString()); + 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 && @@ -165,31 +190,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index a62b9903..1af3e9a1 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,203 +1,235 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Coin } from "../../base/v1beta1/coin"; - +import { Duration } from "../../../google/protobuf/duration"; +import * as _m0 from "protobufjs/minimal"; +import { + isSet, + DeepPartial, + Exact, + Long, + fromJsonTimestamp, + fromTimestamp, + bytesFromBase64, + base64FromBytes, +} from "../../../helpers"; 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"; - case VoteOption.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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. + * period. */ PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, + /** * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. + * period. */ PROPOSAL_STATUS_VOTING_PERIOD = 2, + /** * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. + * passed. */ PROPOSAL_STATUS_PASSED = 3, + /** * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. + * been rejected. */ PROPOSAL_STATUS_REJECTED = 4, + /** * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. + * 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"; - case ProposalStatus.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** * WeightedVoteOption defines a unit of vote for vote split. * * Since: cosmos-sdk 0.43 */ + export interface WeightedVoteOption { option: VoteOption; weight: 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: Long; depositor: string; amount: Coin[]; } - /** Proposal defines the core field members of a governance proposal. */ + export interface Proposal { proposalId: Long; - content?: Any; + content: Any; status: ProposalStatus; - finalTallyResult?: TallyResult; - submitTime?: Timestamp; - depositEndTime?: Timestamp; + finalTallyResult: TallyResult; + submitTime: Timestamp; + depositEndTime: Timestamp; totalDeposit: Coin[]; - votingStartTime?: Timestamp; - votingEndTime?: Timestamp; + votingStartTime: Timestamp; + votingEndTime: Timestamp; } - /** 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: Long; voter: string; @@ -205,15 +237,17 @@ export interface Vote { * Deprecated: Prefer to use `options` instead. This field is set in queries * if and only if `len(options) == 1` and that option has weight 1. In all * other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - * - * @deprecated */ + + /** @deprecated */ + option: VoteOption; /** Since: cosmos-sdk 0.43 */ + options: WeightedVoteOption[]; } - /** DepositParams defines the params for deposits on governance proposals. */ + export interface DepositParams { /** Minimum deposit for a proposal to enter voting period. */ minDeposit: Coin[]; @@ -221,16 +255,17 @@ export interface DepositParams { * Maximum period for Atom holders to deposit on a proposal. Initial value: 2 * months. */ - maxDepositPeriod?: Duration; -} + maxDepositPeriod: Duration; +} /** VotingParams defines the params for voting on governance proposals. */ + export interface VotingParams { /** Length of the voting period. */ - votingPeriod?: Duration; + votingPeriod: Duration; } - /** 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 @@ -238,16 +273,21 @@ export interface TallyParams { */ 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; } function createBaseWeightedVoteOption(): WeightedVoteOption { - return { option: 0, weight: "" }; + return { + option: 0, + weight: "", + }; } export const WeightedVoteOption = { @@ -255,9 +295,11 @@ export const WeightedVoteOption = { if (message.option !== 0) { writer.uint32(8).int32(message.option); } + if (message.weight !== "") { writer.uint32(18).string(message.weight); } + return writer; }, @@ -265,20 +307,25 @@ export const WeightedVoteOption = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseWeightedVoteOption(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.option = reader.int32() as any; break; + case 2: message.weight = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -305,7 +352,10 @@ export const WeightedVoteOption = { }; function createBaseTextProposal(): TextProposal { - return { title: "", description: "" }; + return { + title: "", + description: "", + }; } export const TextProposal = { @@ -313,9 +363,11 @@ export const TextProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + return writer; }, @@ -323,20 +375,25 @@ export const TextProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTextProposal(); + 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; }, @@ -363,7 +420,11 @@ export const TextProposal = { }; function createBaseDeposit(): Deposit { - return { proposalId: Long.UZERO, depositor: "", amount: [] }; + return { + proposalId: Long.UZERO, + depositor: "", + amount: [], + }; } export const Deposit = { @@ -371,12 +432,15 @@ export const Deposit = { if (!message.proposalId.isZero()) { 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; }, @@ -384,29 +448,35 @@ export const Deposit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeposit(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; @@ -416,11 +486,13 @@ export const Deposit = { const obj: any = {}; message.proposalId !== undefined && (obj.proposalId = (message.proposalId || Long.UZERO).toString()); 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; }, @@ -455,30 +527,39 @@ export const Proposal = { if (!message.proposalId.isZero()) { 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(message.submitTime, writer.uint32(42).fork()).ldelim(); } + if (message.depositEndTime !== undefined) { Timestamp.encode(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(message.votingStartTime, writer.uint32(66).fork()).ldelim(); } + if (message.votingEndTime !== undefined) { Timestamp.encode(message.votingEndTime, writer.uint32(74).fork()).ldelim(); } + return writer; }, @@ -486,47 +567,59 @@ export const Proposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProposal(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 = Timestamp.decode(reader, reader.uint32()); break; + case 6: message.depositEndTime = Timestamp.decode(reader, reader.uint32()); break; + case 7: message.totalDeposit.push(Coin.decode(reader, reader.uint32())); break; + case 8: message.votingStartTime = Timestamp.decode(reader, reader.uint32()); break; + case 9: message.votingEndTime = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Proposal { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, content: isSet(object.content) ? Any.fromJSON(object.content) : undefined, status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0, finalTallyResult: isSet(object.finalTallyResult) @@ -555,11 +648,13 @@ export const Proposal = { message.submitTime !== undefined && (obj.submitTime = fromTimestamp(message.submitTime).toISOString()); message.depositEndTime !== undefined && (obj.depositEndTime = fromTimestamp(message.depositEndTime).toISOString()); + if (message.totalDeposit) { obj.totalDeposit = message.totalDeposit.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.totalDeposit = []; } + message.votingStartTime !== undefined && (obj.votingStartTime = fromTimestamp(message.votingStartTime).toISOString()); message.votingEndTime !== undefined && @@ -602,7 +697,12 @@ export const Proposal = { }; function createBaseTallyResult(): TallyResult { - return { yes: "", abstain: "", no: "", noWithVeto: "" }; + return { + yes: "", + abstain: "", + no: "", + noWithVeto: "", + }; } export const TallyResult = { @@ -610,15 +710,19 @@ export const TallyResult = { 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; }, @@ -626,26 +730,33 @@ export const TallyResult = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTallyResult(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -678,7 +789,12 @@ export const TallyResult = { }; function createBaseVote(): Vote { - return { proposalId: Long.UZERO, voter: "", option: 0, options: [] }; + return { + proposalId: Long.UZERO, + voter: "", + option: 0, + options: [], + }; } export const Vote = { @@ -686,15 +802,19 @@ export const Vote = { if (!message.proposalId.isZero()) { 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); } + for (const v of message.options) { WeightedVoteOption.encode(v!, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -702,32 +822,39 @@ export const Vote = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVote(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + case 2: message.voter = reader.string(); break; + case 3: message.option = reader.int32() as any; break; + case 4: message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Vote { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, options: Array.isArray(object?.options) @@ -741,11 +868,13 @@ export const Vote = { message.proposalId !== undefined && (obj.proposalId = (message.proposalId || Long.UZERO).toString()); message.voter !== undefined && (obj.voter = message.voter); message.option !== undefined && (obj.option = voteOptionToJSON(message.option)); + if (message.options) { obj.options = message.options.map((e) => (e ? WeightedVoteOption.toJSON(e) : undefined)); } else { obj.options = []; } + return obj; }, @@ -763,7 +892,10 @@ export const Vote = { }; function createBaseDepositParams(): DepositParams { - return { minDeposit: [], maxDepositPeriod: undefined }; + return { + minDeposit: [], + maxDepositPeriod: undefined, + }; } export const DepositParams = { @@ -771,9 +903,11 @@ export const DepositParams = { 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; }, @@ -781,20 +915,25 @@ export const DepositParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositParams(); + 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; }, @@ -811,31 +950,29 @@ export const DepositParams = { 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); + + message.maxDepositPeriod !== undefined && (obj.maxDepositPeriod = message.maxDepositPeriod); return obj; }, fromPartial, I>>(object: I): DepositParams { const message = createBaseDepositParams(); message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || []; - message.maxDepositPeriod = - object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null - ? Duration.fromPartial(object.maxDepositPeriod) - : undefined; + message.maxDepositPeriod = object.maxDepositPeriod ?? undefined; return message; }, }; function createBaseVotingParams(): VotingParams { - return { votingPeriod: undefined }; + return { + votingPeriod: undefined, + }; } export const VotingParams = { @@ -843,6 +980,7 @@ export const VotingParams = { if (message.votingPeriod !== undefined) { Duration.encode(message.votingPeriod, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -850,43 +988,49 @@ export const VotingParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVotingParams(); + 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 { - return { votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined }; + return { + votingPeriod: isSet(object.votingPeriod) ? Duration.fromJSON(object.votingPeriod) : undefined, + }; }, toJSON(message: VotingParams): unknown { const obj: any = {}; - message.votingPeriod !== undefined && - (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined); + message.votingPeriod !== undefined && (obj.votingPeriod = message.votingPeriod); return obj; }, fromPartial, I>>(object: I): VotingParams { const message = createBaseVotingParams(); - message.votingPeriod = - object.votingPeriod !== undefined && object.votingPeriod !== null - ? Duration.fromPartial(object.votingPeriod) - : undefined; + message.votingPeriod = object.votingPeriod ?? undefined; return message; }, }; function createBaseTallyParams(): TallyParams { - return { quorum: new Uint8Array(), threshold: new Uint8Array(), vetoThreshold: new Uint8Array() }; + return { + quorum: new Uint8Array(), + threshold: new Uint8Array(), + vetoThreshold: new Uint8Array(), + }; } export const TallyParams = { @@ -894,12 +1038,15 @@ export const TallyParams = { 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; }, @@ -907,23 +1054,29 @@ export const TallyParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTallyParams(); + 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; }, @@ -958,101 +1111,3 @@ export const TallyParams = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index cd93c0ba..b06c27e9 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,86 +1,91 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { - Deposit, - DepositParams, - Proposal, ProposalStatus, - proposalStatusFromJSON, - proposalStatusToJSON, - TallyParams, - TallyResult, + Proposal, Vote, VotingParams, + DepositParams, + TallyParams, + Deposit, + TallyResult, + proposalStatusFromJSON, + proposalStatusToJSON, } from "./gov"; - +import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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: Long; } - /** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ + export interface QueryProposalResponse { - proposal?: Proposal; + proposal: Proposal; } - /** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ + export interface QueryProposalsRequest { /** proposal_status defines the status of the proposals. */ - proposalStatus: ProposalStatus; + proposalStatus?: ProposalStatus; /** voter defines the voter address for the proposals. */ - voter: string; + + voter?: string; /** depositor defines the deposit addresses from the proposals. */ - depositor: string; + + depositor?: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * 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; } - /** QueryVoteRequest is the request type for the Query/Vote RPC method. */ + export interface QueryVoteRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: Long; /** 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; + vote: Vote; } - /** QueryVotesRequest is the request type for the Query/Votes RPC method. */ + export interface QueryVotesRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: Long; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** 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; } - /** 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", @@ -88,60 +93,67 @@ export interface QueryParamsRequest { */ 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; + votingParams: VotingParams; /** deposit_params defines the parameters related to deposit. */ - depositParams?: DepositParams; + + depositParams: DepositParams; /** tally_params defines the parameters related to tally. */ - tallyParams?: TallyParams; -} + tallyParams: TallyParams; +} /** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ + export interface QueryDepositRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: Long; /** 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; + deposit: Deposit; } - /** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ + export interface QueryDepositsRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: Long; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** 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; } - /** QueryTallyResultRequest is the request type for the Query/Tally RPC method. */ + export interface QueryTallyResultRequest { /** proposal_id defines the unique id of the proposal. */ proposalId: Long; } - /** QueryTallyResultResponse is the response type for the Query/Tally RPC method. */ + export interface QueryTallyResultResponse { /** tally defines the requested tally. */ - tally?: TallyResult; + tally: TallyResult; } function createBaseQueryProposalRequest(): QueryProposalRequest { - return { proposalId: Long.UZERO }; + return { + proposalId: Long.UZERO, + }; } export const QueryProposalRequest = { @@ -149,6 +161,7 @@ export const QueryProposalRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + return writer; }, @@ -156,22 +169,28 @@ export const QueryProposalRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProposalRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryProposalRequest { - return { proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO }; + return { + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + }; }, toJSON(message: QueryProposalRequest): unknown { @@ -191,7 +210,9 @@ export const QueryProposalRequest = { }; function createBaseQueryProposalResponse(): QueryProposalResponse { - return { proposal: undefined }; + return { + proposal: undefined, + }; } export const QueryProposalResponse = { @@ -199,6 +220,7 @@ export const QueryProposalResponse = { if (message.proposal !== undefined) { Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -206,22 +228,28 @@ export const QueryProposalResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProposalResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposal = Proposal.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryProposalResponse { - return { proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined }; + return { + proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined, + }; }, toJSON(message: QueryProposalResponse): unknown { @@ -242,7 +270,12 @@ export const QueryProposalResponse = { }; function createBaseQueryProposalsRequest(): QueryProposalsRequest { - return { proposalStatus: 0, voter: "", depositor: "", pagination: undefined }; + return { + proposalStatus: 0, + voter: "", + depositor: "", + pagination: undefined, + }; } export const QueryProposalsRequest = { @@ -250,15 +283,19 @@ export const QueryProposalsRequest = { 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; }, @@ -266,26 +303,33 @@ export const QueryProposalsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProposalsRequest(); + 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; }, @@ -323,7 +367,10 @@ export const QueryProposalsRequest = { }; function createBaseQueryProposalsResponse(): QueryProposalsResponse { - return { proposals: [], pagination: undefined }; + return { + proposals: [], + pagination: undefined, + }; } export const QueryProposalsResponse = { @@ -331,9 +378,11 @@ export const QueryProposalsResponse = { 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; }, @@ -341,20 +390,25 @@ export const QueryProposalsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProposalsResponse(); + 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; }, @@ -369,11 +423,13 @@ export const QueryProposalsResponse = { 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; @@ -391,7 +447,10 @@ export const QueryProposalsResponse = { }; function createBaseQueryVoteRequest(): QueryVoteRequest { - return { proposalId: Long.UZERO, voter: "" }; + return { + proposalId: Long.UZERO, + voter: "", + }; } export const QueryVoteRequest = { @@ -399,9 +458,11 @@ export const QueryVoteRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + if (message.voter !== "") { writer.uint32(18).string(message.voter); } + return writer; }, @@ -409,26 +470,31 @@ export const QueryVoteRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryVoteRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + case 2: message.voter = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryVoteRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", }; }, @@ -452,7 +518,9 @@ export const QueryVoteRequest = { }; function createBaseQueryVoteResponse(): QueryVoteResponse { - return { vote: undefined }; + return { + vote: undefined, + }; } export const QueryVoteResponse = { @@ -460,6 +528,7 @@ export const QueryVoteResponse = { if (message.vote !== undefined) { Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -467,22 +536,28 @@ export const QueryVoteResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryVoteResponse(); + 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 { - return { vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined }; + return { + vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined, + }; }, toJSON(message: QueryVoteResponse): unknown { @@ -500,7 +575,10 @@ export const QueryVoteResponse = { }; function createBaseQueryVotesRequest(): QueryVotesRequest { - return { proposalId: Long.UZERO, pagination: undefined }; + return { + proposalId: Long.UZERO, + pagination: undefined, + }; } export const QueryVotesRequest = { @@ -508,9 +586,11 @@ export const QueryVotesRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -518,26 +598,31 @@ export const QueryVotesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryVotesRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -565,7 +650,10 @@ export const QueryVotesRequest = { }; function createBaseQueryVotesResponse(): QueryVotesResponse { - return { votes: [], pagination: undefined }; + return { + votes: [], + pagination: undefined, + }; } export const QueryVotesResponse = { @@ -573,9 +661,11 @@ export const QueryVotesResponse = { 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; }, @@ -583,20 +673,25 @@ export const QueryVotesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryVotesResponse(); + 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; }, @@ -609,11 +704,13 @@ export const QueryVotesResponse = { 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; @@ -631,7 +728,9 @@ export const QueryVotesResponse = { }; function createBaseQueryParamsRequest(): QueryParamsRequest { - return { paramsType: "" }; + return { + paramsType: "", + }; } export const QueryParamsRequest = { @@ -639,6 +738,7 @@ export const QueryParamsRequest = { if (message.paramsType !== "") { writer.uint32(10).string(message.paramsType); } + return writer; }, @@ -646,22 +746,28 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + 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 { - return { paramsType: isSet(object.paramsType) ? String(object.paramsType) : "" }; + return { + paramsType: isSet(object.paramsType) ? String(object.paramsType) : "", + }; }, toJSON(message: QueryParamsRequest): unknown { @@ -678,7 +784,11 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { votingParams: undefined, depositParams: undefined, tallyParams: undefined }; + return { + votingParams: undefined, + depositParams: undefined, + tallyParams: undefined, + }; } export const QueryParamsResponse = { @@ -686,12 +796,15 @@ export const QueryParamsResponse = { 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; }, @@ -699,23 +812,29 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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; }, @@ -757,7 +876,10 @@ export const QueryParamsResponse = { }; function createBaseQueryDepositRequest(): QueryDepositRequest { - return { proposalId: Long.UZERO, depositor: "" }; + return { + proposalId: Long.UZERO, + depositor: "", + }; } export const QueryDepositRequest = { @@ -765,9 +887,11 @@ export const QueryDepositRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + if (message.depositor !== "") { writer.uint32(18).string(message.depositor); } + return writer; }, @@ -775,26 +899,31 @@ export const QueryDepositRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDepositRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + case 2: message.depositor = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryDepositRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", }; }, @@ -818,7 +947,9 @@ export const QueryDepositRequest = { }; function createBaseQueryDepositResponse(): QueryDepositResponse { - return { deposit: undefined }; + return { + deposit: undefined, + }; } export const QueryDepositResponse = { @@ -826,6 +957,7 @@ export const QueryDepositResponse = { if (message.deposit !== undefined) { Deposit.encode(message.deposit, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -833,22 +965,28 @@ export const QueryDepositResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDepositResponse(); + 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 { - return { deposit: isSet(object.deposit) ? Deposit.fromJSON(object.deposit) : undefined }; + return { + deposit: isSet(object.deposit) ? Deposit.fromJSON(object.deposit) : undefined, + }; }, toJSON(message: QueryDepositResponse): unknown { @@ -869,7 +1007,10 @@ export const QueryDepositResponse = { }; function createBaseQueryDepositsRequest(): QueryDepositsRequest { - return { proposalId: Long.UZERO, pagination: undefined }; + return { + proposalId: Long.UZERO, + pagination: undefined, + }; } export const QueryDepositsRequest = { @@ -877,9 +1018,11 @@ export const QueryDepositsRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -887,26 +1030,31 @@ export const QueryDepositsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDepositsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -934,7 +1082,10 @@ export const QueryDepositsRequest = { }; function createBaseQueryDepositsResponse(): QueryDepositsResponse { - return { deposits: [], pagination: undefined }; + return { + deposits: [], + pagination: undefined, + }; } export const QueryDepositsResponse = { @@ -942,9 +1093,11 @@ export const QueryDepositsResponse = { 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; }, @@ -952,20 +1105,25 @@ export const QueryDepositsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDepositsResponse(); + 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; }, @@ -978,11 +1136,13 @@ export const QueryDepositsResponse = { 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; @@ -1000,7 +1160,9 @@ export const QueryDepositsResponse = { }; function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { - return { proposalId: Long.UZERO }; + return { + proposalId: Long.UZERO, + }; } export const QueryTallyResultRequest = { @@ -1008,6 +1170,7 @@ export const QueryTallyResultRequest = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + return writer; }, @@ -1015,22 +1178,28 @@ export const QueryTallyResultRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryTallyResultRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryTallyResultRequest { - return { proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO }; + return { + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + }; }, toJSON(message: QueryTallyResultRequest): unknown { @@ -1050,7 +1219,9 @@ export const QueryTallyResultRequest = { }; function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { - return { tally: undefined }; + return { + tally: undefined, + }; } export const QueryTallyResultResponse = { @@ -1058,6 +1229,7 @@ export const QueryTallyResultResponse = { if (message.tally !== undefined) { TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1065,22 +1237,28 @@ export const QueryTallyResultResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryTallyResultResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.tally = TallyResult.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryTallyResultResponse { - return { tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined }; + return { + tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined, + }; }, toJSON(message: QueryTallyResultResponse): unknown { @@ -1099,29 +1277,36 @@ export const QueryTallyResultResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. */ + /*Proposal queries proposal details based on ProposalID.*/ + Proposals(request: QueryProposalsRequest): Promise; - /** Vote queries voted information based on proposalID, voterAddr. */ + /*Proposals queries all proposals based on given status.*/ + Vote(request: QueryVoteRequest): Promise; - /** Votes queries votes of a given proposal. */ + /*Vote queries voted information based on proposalID, voterAddr.*/ + Votes(request: QueryVotesRequest): Promise; - /** Params queries all parameters of the gov module. */ + /*Votes queries votes of a given proposal.*/ + Params(request: QueryParamsRequest): Promise; - /** Deposit queries single deposit information based proposalID, depositAddr. */ + /*Params queries all parameters of the gov module.*/ + Deposit(request: QueryDepositRequest): Promise; - /** Deposits queries all deposits of a single proposal. */ + /*Deposit queries single deposit information based proposalID, depositAddr.*/ + Deposits(request: QueryDepositsRequest): Promise; - /** TallyResult queries the tally of a proposal vote. */ + /*Deposits queries all deposits of a single proposal.*/ + TallyResult(request: QueryTallyResultRequest): Promise; + /*TallyResult queries the tally of a proposal vote.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Proposal = this.Proposal.bind(this); @@ -1133,6 +1318,7 @@ export class QueryClientImpl implements Query { this.Deposits = this.Deposits.bind(this); this.TallyResult = this.TallyResult.bind(this); } + Proposal(request: QueryProposalRequest): Promise { const data = QueryProposalRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.gov.v1beta1.Query", "Proposal", data); @@ -1181,35 +1367,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryTallyResultResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index 0f86e6b4..a2c3e7c3 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,67 +1,69 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; -import { VoteOption, voteOptionFromJSON, voteOptionToJSON, WeightedVoteOption } from "./gov"; - +import { VoteOption, WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON } from "./gov"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; - /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary * proposal Content. */ + export interface MsgSubmitProposal { - content?: Any; + content: Any; initialDeposit: Coin[]; proposer: string; } - /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ + export interface MsgSubmitProposalResponse { proposalId: Long; } - /** MsgVote defines a message to cast a vote. */ + export interface MsgVote { proposalId: Long; voter: string; option: VoteOption; } - /** MsgVoteResponse defines the Msg/Vote response type. */ -export interface MsgVoteResponse {} +export interface MsgVoteResponse {} /** * MsgVoteWeighted defines a message to cast a vote. * * Since: cosmos-sdk 0.43 */ + export interface MsgVoteWeighted { proposalId: Long; voter: string; options: WeightedVoteOption[]; } - /** * MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. * * Since: cosmos-sdk 0.43 */ -export interface MsgVoteWeightedResponse {} +export interface MsgVoteWeightedResponse {} /** MsgDeposit defines a message to submit a deposit to an existing proposal. */ + export interface MsgDeposit { proposalId: Long; depositor: string; amount: Coin[]; } - /** MsgDepositResponse defines the Msg/Deposit response type. */ + export interface MsgDepositResponse {} function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { content: undefined, initialDeposit: [], proposer: "" }; + return { + content: undefined, + initialDeposit: [], + proposer: "", + }; } export const MsgSubmitProposal = { @@ -69,12 +71,15 @@ export const MsgSubmitProposal = { 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; }, @@ -82,23 +87,29 @@ export const MsgSubmitProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitProposal(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -116,11 +127,13 @@ export const MsgSubmitProposal = { 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; }, @@ -136,7 +149,9 @@ export const MsgSubmitProposal = { }; function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { - return { proposalId: Long.UZERO }; + return { + proposalId: Long.UZERO, + }; } export const MsgSubmitProposalResponse = { @@ -144,6 +159,7 @@ export const MsgSubmitProposalResponse = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + return writer; }, @@ -151,22 +167,28 @@ export const MsgSubmitProposalResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitProposalResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgSubmitProposalResponse { - return { proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO }; + return { + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + }; }, toJSON(message: MsgSubmitProposalResponse): unknown { @@ -188,7 +210,11 @@ export const MsgSubmitProposalResponse = { }; function createBaseMsgVote(): MsgVote { - return { proposalId: Long.UZERO, voter: "", option: 0 }; + return { + proposalId: Long.UZERO, + voter: "", + option: 0, + }; } export const MsgVote = { @@ -196,12 +222,15 @@ export const MsgVote = { if (!message.proposalId.isZero()) { 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; }, @@ -209,29 +238,35 @@ export const MsgVote = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVote(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, }; @@ -270,14 +305,17 @@ export const MsgVoteResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVoteResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -297,7 +335,11 @@ export const MsgVoteResponse = { }; function createBaseMsgVoteWeighted(): MsgVoteWeighted { - return { proposalId: Long.UZERO, voter: "", options: [] }; + return { + proposalId: Long.UZERO, + voter: "", + options: [], + }; } export const MsgVoteWeighted = { @@ -305,12 +347,15 @@ export const MsgVoteWeighted = { if (!message.proposalId.isZero()) { writer.uint32(8).uint64(message.proposalId); } + if (message.voter !== "") { writer.uint32(18).string(message.voter); } + for (const v of message.options) { WeightedVoteOption.encode(v!, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -318,29 +363,35 @@ export const MsgVoteWeighted = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVoteWeighted(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = reader.uint64() as Long; break; + case 2: message.voter = reader.string(); break; + case 3: message.options.push(WeightedVoteOption.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgVoteWeighted { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) @@ -352,11 +403,13 @@ export const MsgVoteWeighted = { const obj: any = {}; message.proposalId !== undefined && (obj.proposalId = (message.proposalId || Long.UZERO).toString()); message.voter !== undefined && (obj.voter = message.voter); + if (message.options) { obj.options = message.options.map((e) => (e ? WeightedVoteOption.toJSON(e) : undefined)); } else { obj.options = []; } + return obj; }, @@ -385,14 +438,17 @@ export const MsgVoteWeightedResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgVoteWeightedResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -412,7 +468,11 @@ export const MsgVoteWeightedResponse = { }; function createBaseMsgDeposit(): MsgDeposit { - return { proposalId: Long.UZERO, depositor: "", amount: [] }; + return { + proposalId: Long.UZERO, + depositor: "", + amount: [], + }; } export const MsgDeposit = { @@ -420,12 +480,15 @@ export const MsgDeposit = { if (!message.proposalId.isZero()) { 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; }, @@ -433,29 +496,35 @@ export const MsgDeposit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeposit(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.proposalId = 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 { return { - proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; @@ -465,11 +534,13 @@ export const MsgDeposit = { const obj: any = {}; message.proposalId !== undefined && (obj.proposalId = (message.proposalId || Long.UZERO).toString()); 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; }, @@ -498,14 +569,17 @@ export const MsgDepositResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -523,25 +597,26 @@ export const MsgDepositResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*SubmitProposal defines a method to create new proposal given a content.*/ + Vote(request: MsgVote): Promise; - /** - * VoteWeighted defines a method to add a weighted vote on a specific proposal. - * - * Since: cosmos-sdk 0.43 - */ + /*Vote defines a method to add a vote on a specific proposal.*/ + VoteWeighted(request: MsgVoteWeighted): Promise; - /** Deposit defines a method to add deposit on a specific proposal. */ + /*VoteWeighted defines a method to add a weighted vote on a specific proposal. + + Since: cosmos-sdk 0.43*/ + Deposit(request: MsgDeposit): Promise; + /*Deposit defines a method to add deposit on a specific proposal.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.SubmitProposal = this.SubmitProposal.bind(this); @@ -549,6 +624,7 @@ export class MsgClientImpl implements Msg { this.VoteWeighted = this.VoteWeighted.bind(this); this.Deposit = this.Deposit.bind(this); } + SubmitProposal(request: MsgSubmitProposal): Promise { const data = MsgSubmitProposal.encode(request).finish(); const promise = this.rpc.request("cosmos.gov.v1beta1.Msg", "SubmitProposal", data); @@ -573,35 +649,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgDepositResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 26d58400..91d140e7 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,20 +1,22 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Minter, Params } from "./mint"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; - /** GenesisState defines the mint module's genesis state. */ + export interface GenesisState { /** minter is a space for holding current inflation information. */ - minter?: Minter; + minter: Minter; /** params defines all the paramaters of the module. */ - params?: Params; + + params: Params; } function createBaseGenesisState(): GenesisState { - return { minter: undefined, params: undefined }; + return { + minter: undefined, + params: undefined, + }; } export const GenesisState = { @@ -22,9 +24,11 @@ export const GenesisState = { if (message.minter !== undefined) { Minter.encode(message.minter, writer.uint32(10).fork()).ldelim(); } + if (message.params !== undefined) { Params.encode(message.params, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -32,20 +36,25 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.minter = Minter.decode(reader, reader.uint32()); break; + case 2: message.params = Params.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -72,31 +81,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index 0c51f438..ac1fa160 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,35 +1,42 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; - /** Minter represents the minting state. */ + export interface Minter { /** current annual inflation rate */ inflation: string; /** current annual expected provisions */ + annualProvisions: string; } - /** Params holds parameters for the mint module. */ + export interface Params { /** type of coin to mint */ mintDenom: string; /** maximum annual change in inflation rate */ + inflationRateChange: string; /** maximum inflation rate */ + inflationMax: string; /** minimum inflation rate */ + inflationMin: string; /** goal of percent bonded atoms */ + goalBonded: string; /** expected blocks per year */ + blocksPerYear: Long; } function createBaseMinter(): Minter { - return { inflation: "", annualProvisions: "" }; + return { + inflation: "", + annualProvisions: "", + }; } export const Minter = { @@ -37,9 +44,11 @@ export const Minter = { if (message.inflation !== "") { writer.uint32(10).string(message.inflation); } + if (message.annualProvisions !== "") { writer.uint32(18).string(message.annualProvisions); } + return writer; }, @@ -47,20 +56,25 @@ export const Minter = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMinter(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.inflation = reader.string(); break; + case 2: message.annualProvisions = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -102,21 +116,27 @@ export const Params = { if (message.mintDenom !== "") { writer.uint32(10).string(message.mintDenom); } + if (message.inflationRateChange !== "") { writer.uint32(18).string(message.inflationRateChange); } + if (message.inflationMax !== "") { writer.uint32(26).string(message.inflationMax); } + if (message.inflationMin !== "") { writer.uint32(34).string(message.inflationMin); } + if (message.goalBonded !== "") { writer.uint32(42).string(message.goalBonded); } + if (!message.blocksPerYear.isZero()) { writer.uint32(48).uint64(message.blocksPerYear); } + return writer; }, @@ -124,32 +144,41 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.mintDenom = reader.string(); break; + case 2: message.inflationRateChange = reader.string(); break; + case 3: message.inflationMax = reader.string(); break; + case 4: message.inflationMin = reader.string(); break; + case 5: message.goalBonded = reader.string(); break; + case 6: message.blocksPerYear = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -160,7 +189,7 @@ export const Params = { inflationMax: isSet(object.inflationMax) ? String(object.inflationMax) : "", inflationMin: isSet(object.inflationMin) ? String(object.inflationMin) : "", goalBonded: isSet(object.goalBonded) ? String(object.goalBonded) : "", - blocksPerYear: isSet(object.blocksPerYear) ? Long.fromValue(object.blocksPerYear) : Long.UZERO, + blocksPerYear: isSet(object.blocksPerYear) ? Long.fromString(object.blocksPerYear) : Long.UZERO, }; }, @@ -190,31 +219,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index 85c410db..8e40864c 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,41 +1,39 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Params } from "./mint"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; + params: Params; } - /** QueryInflationRequest is the request type for the Query/Inflation RPC method. */ -export interface QueryInflationRequest {} +export interface QueryInflationRequest {} /** * QueryInflationResponse is the response type for the Query/Inflation RPC * method. */ + export interface QueryInflationResponse { /** inflation is the current minting inflation value. */ inflation: Uint8Array; } - /** * QueryAnnualProvisionsRequest is the request type for the * Query/AnnualProvisions RPC method. */ -export interface QueryAnnualProvisionsRequest {} +export interface QueryAnnualProvisionsRequest {} /** * QueryAnnualProvisionsResponse is the response type for the * Query/AnnualProvisions RPC method. */ + export interface QueryAnnualProvisionsResponse { /** annual_provisions is the current minting annual provisions value. */ annualProvisions: Uint8Array; @@ -54,14 +52,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -81,7 +82,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -89,6 +92,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -96,22 +100,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -141,14 +151,17 @@ export const QueryInflationRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInflationRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -168,7 +181,9 @@ export const QueryInflationRequest = { }; function createBaseQueryInflationResponse(): QueryInflationResponse { - return { inflation: new Uint8Array() }; + return { + inflation: new Uint8Array(), + }; } export const QueryInflationResponse = { @@ -176,6 +191,7 @@ export const QueryInflationResponse = { if (message.inflation.length !== 0) { writer.uint32(10).bytes(message.inflation); } + return writer; }, @@ -183,22 +199,28 @@ export const QueryInflationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInflationResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.inflation = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryInflationResponse { - return { inflation: isSet(object.inflation) ? bytesFromBase64(object.inflation) : new Uint8Array() }; + return { + inflation: isSet(object.inflation) ? bytesFromBase64(object.inflation) : new Uint8Array(), + }; }, toJSON(message: QueryInflationResponse): unknown { @@ -230,14 +252,17 @@ export const QueryAnnualProvisionsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAnnualProvisionsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -259,7 +284,9 @@ export const QueryAnnualProvisionsRequest = { }; function createBaseQueryAnnualProvisionsResponse(): QueryAnnualProvisionsResponse { - return { annualProvisions: new Uint8Array() }; + return { + annualProvisions: new Uint8Array(), + }; } export const QueryAnnualProvisionsResponse = { @@ -267,6 +294,7 @@ export const QueryAnnualProvisionsResponse = { if (message.annualProvisions.length !== 0) { writer.uint32(10).bytes(message.annualProvisions); } + return writer; }, @@ -274,17 +302,21 @@ export const QueryAnnualProvisionsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAnnualProvisionsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.annualProvisions = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -313,116 +345,43 @@ export const QueryAnnualProvisionsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query provides defines the gRPC querier service. */ export interface Query { - /** Params returns the total set of minting parameters. */ - Params(request: QueryParamsRequest): Promise; - /** Inflation returns the current minting inflation value. */ - Inflation(request: QueryInflationRequest): Promise; - /** AnnualProvisions current minting annual provisions value. */ - AnnualProvisions(request: QueryAnnualProvisionsRequest): Promise; -} + Params(request?: QueryParamsRequest): Promise; + /*Params returns the total set of minting parameters.*/ + Inflation(request?: QueryInflationRequest): Promise; + /*Inflation returns the current minting inflation value.*/ + + AnnualProvisions(request?: QueryAnnualProvisionsRequest): Promise; + /*AnnualProvisions current minting annual provisions value.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); this.Inflation = this.Inflation.bind(this); this.AnnualProvisions = this.AnnualProvisions.bind(this); } - Params(request: QueryParamsRequest): Promise { + + Params(request: QueryParamsRequest = {}): Promise { const data = QueryParamsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "Params", data); return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); } - Inflation(request: QueryInflationRequest): Promise { + Inflation(request: QueryInflationRequest = {}): Promise { const data = QueryInflationRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "Inflation", data); return promise.then((data) => QueryInflationResponse.decode(new _m0.Reader(data))); } - AnnualProvisions(request: QueryAnnualProvisionsRequest): Promise { + AnnualProvisions(request: QueryAnnualProvisionsRequest = {}): Promise { const data = QueryAnnualProvisionsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.mint.v1beta1.Query", "AnnualProvisions", data); return promise.then((data) => QueryAnnualProvisionsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index 51471e8f..3148ecb9 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,20 +1,18 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; - /** ParameterChangeProposal defines a proposal to change one or more parameters. */ + export interface ParameterChangeProposal { title: string; description: string; changes: ParamChange[]; } - /** * ParamChange defines an individual parameter change, for use in * ParameterChangeProposal. */ + export interface ParamChange { subspace: string; key: string; @@ -22,7 +20,11 @@ export interface ParamChange { } function createBaseParameterChangeProposal(): ParameterChangeProposal { - return { title: "", description: "", changes: [] }; + return { + title: "", + description: "", + changes: [], + }; } export const ParameterChangeProposal = { @@ -30,12 +32,15 @@ export const ParameterChangeProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + for (const v of message.changes) { ParamChange.encode(v!, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -43,23 +48,29 @@ export const ParameterChangeProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParameterChangeProposal(); + 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.changes.push(ParamChange.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -75,11 +86,13 @@ export const ParameterChangeProposal = { const obj: any = {}; message.title !== undefined && (obj.title = message.title); message.description !== undefined && (obj.description = message.description); + if (message.changes) { obj.changes = message.changes.map((e) => (e ? ParamChange.toJSON(e) : undefined)); } else { obj.changes = []; } + return obj; }, @@ -93,7 +106,11 @@ export const ParameterChangeProposal = { }; function createBaseParamChange(): ParamChange { - return { subspace: "", key: "", value: "" }; + return { + subspace: "", + key: "", + value: "", + }; } export const ParamChange = { @@ -101,12 +118,15 @@ export const ParamChange = { if (message.subspace !== "") { writer.uint32(10).string(message.subspace); } + if (message.key !== "") { writer.uint32(18).string(message.key); } + if (message.value !== "") { writer.uint32(26).string(message.value); } + return writer; }, @@ -114,23 +134,29 @@ export const ParamChange = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParamChange(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.subspace = reader.string(); break; + case 2: message.key = reader.string(); break; + case 3: message.value = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -158,31 +184,3 @@ export const ParamChange = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 7398f043..484eb577 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,26 +1,28 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { ParamChange } from "./params"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; - /** QueryParamsRequest is request type for the Query/Params RPC method. */ + export interface QueryParamsRequest { /** subspace defines the module to query the parameter for. */ subspace: string; /** key defines the key of the parameter in the subspace. */ + key: string; } - /** QueryParamsResponse is response type for the Query/Params RPC method. */ + export interface QueryParamsResponse { /** param defines the queried parameter. */ - param?: ParamChange; + param: ParamChange; } function createBaseQueryParamsRequest(): QueryParamsRequest { - return { subspace: "", key: "" }; + return { + subspace: "", + key: "", + }; } export const QueryParamsRequest = { @@ -28,9 +30,11 @@ export const QueryParamsRequest = { if (message.subspace !== "") { writer.uint32(10).string(message.subspace); } + if (message.key !== "") { writer.uint32(18).string(message.key); } + return writer; }, @@ -38,20 +42,25 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.subspace = reader.string(); break; + case 2: message.key = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -78,7 +87,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { param: undefined }; + return { + param: undefined, + }; } export const QueryParamsResponse = { @@ -86,6 +97,7 @@ export const QueryParamsResponse = { if (message.param !== undefined) { ParamChange.encode(message.param, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -93,22 +105,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.param = ParamChange.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryParamsResponse { - return { param: isSet(object.param) ? ParamChange.fromJSON(object.param) : undefined }; + return { + param: isSet(object.param) ? ParamChange.fromJSON(object.param) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -125,57 +143,24 @@ export const QueryParamsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query defines the gRPC querier service. */ export interface Query { - /** - * Params queries a specific parameter of a module, given its subspace and - * key. - */ Params(request: QueryParamsRequest): Promise; + /*Params queries a specific parameter of a module, given its subspace and + key.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); } + Params(request: QueryParamsRequest): Promise { const data = QueryParamsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.params.v1beta1.Query", "Params", data); return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index 9db28815..e6e0ac85 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,55 +1,62 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Params, ValidatorSigningInfo } from "./slashing"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; 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; + params: Params; /** * signing_infos represents a map between validator addresses and their * signing infos. */ + signingInfos: SigningInfo[]; /** * missed_blocks 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; -} + validatorSigningInfo: ValidatorSigningInfo; +} /** * 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: Long; /** missed is the missed status. */ + missed: boolean; } function createBaseGenesisState(): GenesisState { - return { params: undefined, signingInfos: [], missedBlocks: [] }; + return { + params: undefined, + signingInfos: [], + missedBlocks: [], + }; } export const GenesisState = { @@ -57,12 +64,15 @@ export const GenesisState = { 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; }, @@ -70,23 +80,29 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -105,16 +121,19 @@ export const GenesisState = { 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; }, @@ -129,7 +148,10 @@ export const GenesisState = { }; function createBaseSigningInfo(): SigningInfo { - return { address: "", validatorSigningInfo: undefined }; + return { + address: "", + validatorSigningInfo: undefined, + }; } export const SigningInfo = { @@ -137,9 +159,11 @@ export const SigningInfo = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.validatorSigningInfo !== undefined) { ValidatorSigningInfo.encode(message.validatorSigningInfo, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -147,20 +171,25 @@ export const SigningInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSigningInfo(); + 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; }, @@ -195,7 +224,10 @@ export const SigningInfo = { }; function createBaseValidatorMissedBlocks(): ValidatorMissedBlocks { - return { address: "", missedBlocks: [] }; + return { + address: "", + missedBlocks: [], + }; } export const ValidatorMissedBlocks = { @@ -203,9 +235,11 @@ export const ValidatorMissedBlocks = { 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; }, @@ -213,20 +247,25 @@ export const ValidatorMissedBlocks = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorMissedBlocks(); + 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; }, @@ -242,11 +281,13 @@ export const ValidatorMissedBlocks = { 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; }, @@ -259,7 +300,10 @@ export const ValidatorMissedBlocks = { }; function createBaseMissedBlock(): MissedBlock { - return { index: Long.ZERO, missed: false }; + return { + index: Long.ZERO, + missed: false, + }; } export const MissedBlock = { @@ -267,9 +311,11 @@ export const MissedBlock = { if (!message.index.isZero()) { writer.uint32(8).int64(message.index); } + if (message.missed === true) { writer.uint32(16).bool(message.missed); } + return writer; }, @@ -277,26 +323,31 @@ export const MissedBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMissedBlock(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.index = reader.int64() as Long; break; + case 2: message.missed = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MissedBlock { return { - index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, + index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, missed: isSet(object.missed) ? Boolean(object.missed) : false, }; }, @@ -316,31 +367,3 @@ export const MissedBlock = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 2ef06e37..8e4a4d6d 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,49 +1,47 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; - /** QueryParamsRequest is the request type for the Query/Params RPC method */ -export interface QueryParamsRequest {} +export interface QueryParamsRequest {} /** QueryParamsResponse is the response type for the Query/Params RPC method */ + export interface QueryParamsResponse { - params?: Params; + params: Params; } - /** * 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; + valSigningInfo: ValidatorSigningInfo; } - /** * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC * method */ + export interface QuerySigningInfosRequest { pagination?: PageRequest; } - /** * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC * method */ + export interface QuerySigningInfosResponse { /** info is the signing info of all validators */ info: ValidatorSigningInfo[]; @@ -63,14 +61,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -90,7 +91,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -98,6 +101,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -105,22 +109,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -138,7 +148,9 @@ export const QueryParamsResponse = { }; function createBaseQuerySigningInfoRequest(): QuerySigningInfoRequest { - return { consAddress: "" }; + return { + consAddress: "", + }; } export const QuerySigningInfoRequest = { @@ -146,6 +158,7 @@ export const QuerySigningInfoRequest = { if (message.consAddress !== "") { writer.uint32(10).string(message.consAddress); } + return writer; }, @@ -153,22 +166,28 @@ export const QuerySigningInfoRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySigningInfoRequest(); + 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 { - return { consAddress: isSet(object.consAddress) ? String(object.consAddress) : "" }; + return { + consAddress: isSet(object.consAddress) ? String(object.consAddress) : "", + }; }, toJSON(message: QuerySigningInfoRequest): unknown { @@ -185,7 +204,9 @@ export const QuerySigningInfoRequest = { }; function createBaseQuerySigningInfoResponse(): QuerySigningInfoResponse { - return { valSigningInfo: undefined }; + return { + valSigningInfo: undefined, + }; } export const QuerySigningInfoResponse = { @@ -193,6 +214,7 @@ export const QuerySigningInfoResponse = { if (message.valSigningInfo !== undefined) { ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -200,17 +222,21 @@ export const QuerySigningInfoResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySigningInfoResponse(); + 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; }, @@ -244,7 +270,9 @@ export const QuerySigningInfoResponse = { }; function createBaseQuerySigningInfosRequest(): QuerySigningInfosRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QuerySigningInfosRequest = { @@ -252,6 +280,7 @@ export const QuerySigningInfosRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -259,22 +288,28 @@ export const QuerySigningInfosRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySigningInfosRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QuerySigningInfosRequest): unknown { @@ -297,7 +332,10 @@ export const QuerySigningInfosRequest = { }; function createBaseQuerySigningInfosResponse(): QuerySigningInfosResponse { - return { info: [], pagination: undefined }; + return { + info: [], + pagination: undefined, + }; } export const QuerySigningInfosResponse = { @@ -305,9 +343,11 @@ export const QuerySigningInfosResponse = { 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; }, @@ -315,20 +355,25 @@ export const QuerySigningInfosResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySigningInfosResponse(); + 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; }, @@ -341,11 +386,13 @@ export const QuerySigningInfosResponse = { 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; @@ -363,26 +410,29 @@ export const QuerySigningInfosResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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 */ + Params(request?: QueryParamsRequest): Promise; + /*Params queries the parameters of slashing module*/ + SigningInfo(request: QuerySigningInfoRequest): Promise; - /** SigningInfos queries signing info of all validators */ - SigningInfos(request: QuerySigningInfosRequest): Promise; -} + /*SigningInfo queries the signing info of given cons address*/ + SigningInfos(request?: QuerySigningInfosRequest): Promise; + /*SigningInfos queries signing info of all validators*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); this.SigningInfo = this.SigningInfo.bind(this); this.SigningInfos = this.SigningInfos.bind(this); } - Params(request: QueryParamsRequest): Promise { + + 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 _m0.Reader(data))); @@ -394,41 +444,13 @@ export class QueryClientImpl implements Query { return promise.then((data) => QuerySigningInfoResponse.decode(new _m0.Reader(data))); } - SigningInfos(request: QuerySigningInfosRequest): Promise { + SigningInfos( + request: QuerySigningInfosRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 0c1ec082..5980318a 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,44 +1,56 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Duration } from "../../../google/protobuf/duration"; import { Timestamp } from "../../../google/protobuf/timestamp"; - +import { Duration } from "../../../google/protobuf/duration"; +import * as _m0 from "protobufjs/minimal"; +import { + Long, + isSet, + fromJsonTimestamp, + fromTimestamp, + DeepPartial, + Exact, + bytesFromBase64, + base64FromBytes, +} from "../../../helpers"; 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: Long; /** * Index which is incremented each time the validator was a bonded * in a block and may have signed a precommit or not. This in conjunction with the * `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. */ + indexOffset: Long; /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailedUntil?: Timestamp; + + jailedUntil: Timestamp; /** * Whether or not a validator has been tombstoned (killed out of validator set). It is set * once the validator commits an equivocation or for any other configured misbehiavor. */ + tombstoned: boolean; /** * A counter kept to avoid unnecessary array reads. * Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. */ + missedBlocksCounter: Long; } - /** Params represents the parameters used for by the slashing module. */ + export interface Params { signedBlocksWindow: Long; minSignedPerWindow: Uint8Array; - downtimeJailDuration?: Duration; + downtimeJailDuration: Duration; slashFractionDoubleSign: Uint8Array; slashFractionDowntime: Uint8Array; } @@ -59,21 +71,27 @@ export const ValidatorSigningInfo = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (!message.startHeight.isZero()) { writer.uint32(16).int64(message.startHeight); } + if (!message.indexOffset.isZero()) { writer.uint32(24).int64(message.indexOffset); } + if (message.jailedUntil !== undefined) { Timestamp.encode(message.jailedUntil, writer.uint32(34).fork()).ldelim(); } + if (message.tombstoned === true) { writer.uint32(40).bool(message.tombstoned); } + if (!message.missedBlocksCounter.isZero()) { writer.uint32(48).int64(message.missedBlocksCounter); } + return writer; }, @@ -81,44 +99,53 @@ export const ValidatorSigningInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorSigningInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.startHeight = reader.int64() as Long; break; + case 3: message.indexOffset = reader.int64() as Long; break; + case 4: message.jailedUntil = Timestamp.decode(reader, reader.uint32()); break; + case 5: message.tombstoned = reader.bool(); break; + case 6: message.missedBlocksCounter = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ValidatorSigningInfo { return { address: isSet(object.address) ? String(object.address) : "", - startHeight: isSet(object.startHeight) ? Long.fromValue(object.startHeight) : Long.ZERO, - indexOffset: isSet(object.indexOffset) ? Long.fromValue(object.indexOffset) : Long.ZERO, + startHeight: isSet(object.startHeight) ? Long.fromString(object.startHeight) : Long.ZERO, + indexOffset: isSet(object.indexOffset) ? Long.fromString(object.indexOffset) : Long.ZERO, jailedUntil: isSet(object.jailedUntil) ? fromJsonTimestamp(object.jailedUntil) : undefined, tombstoned: isSet(object.tombstoned) ? Boolean(object.tombstoned) : false, missedBlocksCounter: isSet(object.missedBlocksCounter) - ? Long.fromValue(object.missedBlocksCounter) + ? Long.fromString(object.missedBlocksCounter) : Long.ZERO, }; }, @@ -174,18 +201,23 @@ export const Params = { if (!message.signedBlocksWindow.isZero()) { 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; }, @@ -193,36 +225,44 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signedBlocksWindow = 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 { return { signedBlocksWindow: isSet(object.signedBlocksWindow) - ? Long.fromValue(object.signedBlocksWindow) + ? Long.fromString(object.signedBlocksWindow) : Long.ZERO, minSignedPerWindow: isSet(object.minSignedPerWindow) ? bytesFromBase64(object.minSignedPerWindow) @@ -247,10 +287,7 @@ export const Params = { (obj.minSignedPerWindow = base64FromBytes( message.minSignedPerWindow !== undefined ? message.minSignedPerWindow : new Uint8Array(), )); - message.downtimeJailDuration !== undefined && - (obj.downtimeJailDuration = message.downtimeJailDuration - ? Duration.toJSON(message.downtimeJailDuration) - : undefined); + message.downtimeJailDuration !== undefined && (obj.downtimeJailDuration = message.downtimeJailDuration); message.slashFractionDoubleSign !== undefined && (obj.slashFractionDoubleSign = base64FromBytes( message.slashFractionDoubleSign !== undefined ? message.slashFractionDoubleSign : new Uint8Array(), @@ -269,110 +306,9 @@ export const Params = { ? Long.fromValue(object.signedBlocksWindow) : Long.ZERO; message.minSignedPerWindow = object.minSignedPerWindow ?? new Uint8Array(); - message.downtimeJailDuration = - object.downtimeJailDuration !== undefined && object.downtimeJailDuration !== null - ? Duration.fromPartial(object.downtimeJailDuration) - : undefined; + message.downtimeJailDuration = object.downtimeJailDuration ?? undefined; message.slashFractionDoubleSign = object.slashFractionDoubleSign ?? new Uint8Array(); message.slashFractionDowntime = object.slashFractionDowntime ?? new Uint8Array(); return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 5423aa54..cefd648f 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,19 +1,19 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; 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 {} function createBaseMsgUnjail(): MsgUnjail { - return { validatorAddr: "" }; + return { + validatorAddr: "", + }; } export const MsgUnjail = { @@ -21,6 +21,7 @@ export const MsgUnjail = { if (message.validatorAddr !== "") { writer.uint32(10).string(message.validatorAddr); } + return writer; }, @@ -28,22 +29,28 @@ export const MsgUnjail = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUnjail(); + 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 { - return { validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" }; + return { + validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "", + }; }, toJSON(message: MsgUnjail): unknown { @@ -72,14 +79,17 @@ export const MsgUnjailResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUnjailResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -97,58 +107,25 @@ export const MsgUnjailResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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; + /*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.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Unjail = this.Unjail.bind(this); } + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 6859fdff..90765905 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,93 +1,107 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; - /** * AuthorizationType defines the type of staking module authorization type * * Since: cosmos-sdk 0.43 */ + export enum AuthorizationType { /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ AUTHORIZATION_TYPE_UNSPECIFIED = 0, + /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ AUTHORIZATION_TYPE_DELEGATE = 1, + /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ AUTHORIZATION_TYPE_UNDELEGATE = 2, + /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ AUTHORIZATION_TYPE_REDELEGATE = 3, UNRECOGNIZED = -1, } - export function authorizationTypeFromJSON(object: any): AuthorizationType { switch (object) { case 0: case "AUTHORIZATION_TYPE_UNSPECIFIED": return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED; + case 1: case "AUTHORIZATION_TYPE_DELEGATE": return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE; + case 2: case "AUTHORIZATION_TYPE_UNDELEGATE": return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE; + case 3: case "AUTHORIZATION_TYPE_REDELEGATE": return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE; + case -1: case "UNRECOGNIZED": default: return AuthorizationType.UNRECOGNIZED; } } - export function authorizationTypeToJSON(object: AuthorizationType): string { switch (object) { case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED: return "AUTHORIZATION_TYPE_UNSPECIFIED"; + case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE: return "AUTHORIZATION_TYPE_DELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE: return "AUTHORIZATION_TYPE_UNDELEGATE"; + case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: return "AUTHORIZATION_TYPE_REDELEGATE"; - case AuthorizationType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** * StakeAuthorization defines authorization for delegate/undelegate/redelegate. * * Since: cosmos-sdk 0.43 */ + export interface StakeAuthorization { /** * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is * empty, there is no spend limit and any amount of coins can be delegated. */ - maxTokens?: Coin; + maxTokens: Coin; /** * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's * account. */ - allowList?: StakeAuthorization_Validators | undefined; + + allowList?: StakeAuthorization_Validators; /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ - denyList?: StakeAuthorization_Validators | undefined; + + denyList?: StakeAuthorization_Validators; /** authorization_type defines one of AuthorizationType. */ + authorizationType: AuthorizationType; } - /** Validators defines list of validator addresses. */ + export interface StakeAuthorization_Validators { address: string[]; } function createBaseStakeAuthorization(): StakeAuthorization { - return { maxTokens: undefined, allowList: undefined, denyList: undefined, authorizationType: 0 }; + return { + maxTokens: undefined, + allowList: undefined, + denyList: undefined, + authorizationType: 0, + }; } export const StakeAuthorization = { @@ -95,15 +109,19 @@ export const StakeAuthorization = { if (message.maxTokens !== undefined) { Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim(); } + if (message.allowList !== undefined) { StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim(); } + if (message.denyList !== undefined) { StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim(); } + if (message.authorizationType !== 0) { writer.uint32(32).int32(message.authorizationType); } + return writer; }, @@ -111,26 +129,33 @@ export const StakeAuthorization = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStakeAuthorization(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxTokens = Coin.decode(reader, reader.uint32()); break; + case 2: message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32()); break; + case 3: message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32()); break; + case 4: message.authorizationType = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -182,7 +207,9 @@ export const StakeAuthorization = { }; function createBaseStakeAuthorization_Validators(): StakeAuthorization_Validators { - return { address: [] }; + return { + address: [], + }; } export const StakeAuthorization_Validators = { @@ -190,6 +217,7 @@ export const StakeAuthorization_Validators = { for (const v of message.address) { writer.uint32(10).string(v!); } + return writer; }, @@ -197,31 +225,39 @@ export const StakeAuthorization_Validators = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStakeAuthorization_Validators(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address.push(reader.string()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): StakeAuthorization_Validators { - return { address: Array.isArray(object?.address) ? object.address.map((e: any) => String(e)) : [] }; + return { + address: Array.isArray(object?.address) ? object.address.map((e: any) => String(e)) : [], + }; }, toJSON(message: StakeAuthorization_Validators): unknown { const obj: any = {}; + if (message.address) { obj.address = message.address.map((e) => e); } else { obj.address = []; } + return obj; }, @@ -233,31 +269,3 @@ export const StakeAuthorization_Validators = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index bb8ad8f0..28050d44 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,40 +1,45 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Delegation, Params, Redelegation, UnbondingDelegation, Validator } from "./staking"; - +import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; 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; + params: Params; /** * 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: Long; } @@ -56,27 +61,35 @@ export const GenesisState = { 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; }, @@ -84,38 +97,49 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -151,6 +175,7 @@ export const GenesisState = { (obj.lastTotalPower = base64FromBytes( message.lastTotalPower !== undefined ? message.lastTotalPower : new Uint8Array(), )); + if (message.lastValidatorPowers) { obj.lastValidatorPowers = message.lastValidatorPowers.map((e) => e ? LastValidatorPower.toJSON(e) : undefined, @@ -158,16 +183,19 @@ export const GenesisState = { } 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, @@ -175,11 +203,13 @@ export const GenesisState = { } 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; }, @@ -202,7 +232,10 @@ export const GenesisState = { }; function createBaseLastValidatorPower(): LastValidatorPower { - return { address: "", power: Long.ZERO }; + return { + address: "", + power: Long.ZERO, + }; } export const LastValidatorPower = { @@ -210,9 +243,11 @@ export const LastValidatorPower = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (!message.power.isZero()) { writer.uint32(16).int64(message.power); } + return writer; }, @@ -220,27 +255,32 @@ export const LastValidatorPower = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLastValidatorPower(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.power = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): LastValidatorPower { return { address: isSet(object.address) ? String(object.address) : "", - power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, }; }, @@ -259,75 +299,3 @@ export const LastValidatorPower = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index 114f11e6..8ddf7930 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,271 +1,291 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { + Validator, DelegationResponse, + UnbondingDelegation, + RedelegationResponse, HistoricalInfo, - Params, Pool, - RedelegationResponse, - UnbondingDelegation, - Validator, + Params, } from "./staking"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; 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; + status?: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** 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; } - /** 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; + validator: Validator; } - /** * 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; } - /** * QueryValidatorDelegationsResponse is response type for the * Query/ValidatorDelegations RPC method */ + export interface QueryValidatorDelegationsResponse { delegationResponses: DelegationResponse[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * 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; } - /** * QueryValidatorUnbondingDelegationsResponse is response type for the * Query/ValidatorUnbondingDelegations RPC method. */ + export interface QueryValidatorUnbondingDelegationsResponse { unbondingResponses: UnbondingDelegation[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** 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; + delegationResponse: DelegationResponse; } - /** * 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; + unbond: UnbondingDelegation; } - /** * 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; } - /** * 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; } - /** * 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; } - /** * QueryUnbondingDelegatorDelegationsResponse is response type for the * Query/UnbondingDelegatorDelegations RPC method. */ + export interface QueryDelegatorUnbondingDelegationsResponse { unbondingResponses: UnbondingDelegation[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * 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; + + srcValidatorAddr?: string; /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr: string; + + dstValidatorAddr?: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * QueryRedelegationsResponse is response type for the Query/Redelegations RPC * method. */ + export interface QueryRedelegationsResponse { redelegationResponses: RedelegationResponse[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * 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; } - /** * 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; } - /** * 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; + validator: Validator; } - /** * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC * method. */ + export interface QueryHistoricalInfoRequest { /** height defines at which height to query the historical info. */ height: Long; } - /** * QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC * method. */ + export interface QueryHistoricalInfoResponse { /** hist defines the historical info at the given height. */ - hist?: HistoricalInfo; + hist: HistoricalInfo; } - /** QueryPoolRequest is request type for the Query/Pool RPC method. */ -export interface QueryPoolRequest {} +export interface QueryPoolRequest {} /** QueryPoolResponse is response type for the Query/Pool RPC method. */ + export interface QueryPoolResponse { /** pool defines the pool info. */ - pool?: Pool; + pool: Pool; } - /** QueryParamsRequest is request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; + params: Params; } function createBaseQueryValidatorsRequest(): QueryValidatorsRequest { - return { status: "", pagination: undefined }; + return { + status: "", + pagination: undefined, + }; } export const QueryValidatorsRequest = { @@ -273,9 +293,11 @@ export const QueryValidatorsRequest = { if (message.status !== "") { writer.uint32(10).string(message.status); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -283,20 +305,25 @@ export const QueryValidatorsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorsRequest(); + 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; }, @@ -327,7 +354,10 @@ export const QueryValidatorsRequest = { }; function createBaseQueryValidatorsResponse(): QueryValidatorsResponse { - return { validators: [], pagination: undefined }; + return { + validators: [], + pagination: undefined, + }; } export const QueryValidatorsResponse = { @@ -335,9 +365,11 @@ export const QueryValidatorsResponse = { 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; }, @@ -345,20 +377,25 @@ export const QueryValidatorsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorsResponse(); + 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; }, @@ -373,11 +410,13 @@ export const QueryValidatorsResponse = { 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; @@ -395,7 +434,9 @@ export const QueryValidatorsResponse = { }; function createBaseQueryValidatorRequest(): QueryValidatorRequest { - return { validatorAddr: "" }; + return { + validatorAddr: "", + }; } export const QueryValidatorRequest = { @@ -403,6 +444,7 @@ export const QueryValidatorRequest = { if (message.validatorAddr !== "") { writer.uint32(10).string(message.validatorAddr); } + return writer; }, @@ -410,22 +452,28 @@ export const QueryValidatorRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorRequest(); + 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 { - return { validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "" }; + return { + validatorAddr: isSet(object.validatorAddr) ? String(object.validatorAddr) : "", + }; }, toJSON(message: QueryValidatorRequest): unknown { @@ -442,7 +490,9 @@ export const QueryValidatorRequest = { }; function createBaseQueryValidatorResponse(): QueryValidatorResponse { - return { validator: undefined }; + return { + validator: undefined, + }; } export const QueryValidatorResponse = { @@ -450,6 +500,7 @@ export const QueryValidatorResponse = { if (message.validator !== undefined) { Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -457,22 +508,28 @@ export const QueryValidatorResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorResponse(); + 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 { - return { validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined }; + return { + validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, + }; }, toJSON(message: QueryValidatorResponse): unknown { @@ -493,7 +550,10 @@ export const QueryValidatorResponse = { }; function createBaseQueryValidatorDelegationsRequest(): QueryValidatorDelegationsRequest { - return { validatorAddr: "", pagination: undefined }; + return { + validatorAddr: "", + pagination: undefined, + }; } export const QueryValidatorDelegationsRequest = { @@ -501,9 +561,11 @@ export const QueryValidatorDelegationsRequest = { if (message.validatorAddr !== "") { writer.uint32(10).string(message.validatorAddr); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -511,20 +573,25 @@ export const QueryValidatorDelegationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorDelegationsRequest(); + 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; }, @@ -557,7 +624,10 @@ export const QueryValidatorDelegationsRequest = { }; function createBaseQueryValidatorDelegationsResponse(): QueryValidatorDelegationsResponse { - return { delegationResponses: [], pagination: undefined }; + return { + delegationResponses: [], + pagination: undefined, + }; } export const QueryValidatorDelegationsResponse = { @@ -565,9 +635,11 @@ export const QueryValidatorDelegationsResponse = { 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; }, @@ -575,20 +647,25 @@ export const QueryValidatorDelegationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorDelegationsResponse(); + 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; }, @@ -603,6 +680,7 @@ export const QueryValidatorDelegationsResponse = { toJSON(message: QueryValidatorDelegationsResponse): unknown { const obj: any = {}; + if (message.delegationResponses) { obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined, @@ -610,6 +688,7 @@ export const QueryValidatorDelegationsResponse = { } else { obj.delegationResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -630,7 +709,10 @@ export const QueryValidatorDelegationsResponse = { }; function createBaseQueryValidatorUnbondingDelegationsRequest(): QueryValidatorUnbondingDelegationsRequest { - return { validatorAddr: "", pagination: undefined }; + return { + validatorAddr: "", + pagination: undefined, + }; } export const QueryValidatorUnbondingDelegationsRequest = { @@ -641,9 +723,11 @@ export const QueryValidatorUnbondingDelegationsRequest = { if (message.validatorAddr !== "") { writer.uint32(10).string(message.validatorAddr); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -651,20 +735,25 @@ export const QueryValidatorUnbondingDelegationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorUnbondingDelegationsRequest(); + 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; }, @@ -697,7 +786,10 @@ export const QueryValidatorUnbondingDelegationsRequest = { }; function createBaseQueryValidatorUnbondingDelegationsResponse(): QueryValidatorUnbondingDelegationsResponse { - return { unbondingResponses: [], pagination: undefined }; + return { + unbondingResponses: [], + pagination: undefined, + }; } export const QueryValidatorUnbondingDelegationsResponse = { @@ -708,9 +800,11 @@ export const QueryValidatorUnbondingDelegationsResponse = { 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; }, @@ -718,20 +812,25 @@ export const QueryValidatorUnbondingDelegationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryValidatorUnbondingDelegationsResponse(); + 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; }, @@ -746,6 +845,7 @@ export const QueryValidatorUnbondingDelegationsResponse = { toJSON(message: QueryValidatorUnbondingDelegationsResponse): unknown { const obj: any = {}; + if (message.unbondingResponses) { obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined, @@ -753,6 +853,7 @@ export const QueryValidatorUnbondingDelegationsResponse = { } else { obj.unbondingResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -773,7 +874,10 @@ export const QueryValidatorUnbondingDelegationsResponse = { }; function createBaseQueryDelegationRequest(): QueryDelegationRequest { - return { delegatorAddr: "", validatorAddr: "" }; + return { + delegatorAddr: "", + validatorAddr: "", + }; } export const QueryDelegationRequest = { @@ -781,9 +885,11 @@ export const QueryDelegationRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.validatorAddr !== "") { writer.uint32(18).string(message.validatorAddr); } + return writer; }, @@ -791,20 +897,25 @@ export const QueryDelegationRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationRequest(); + 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; }, @@ -831,7 +942,9 @@ export const QueryDelegationRequest = { }; function createBaseQueryDelegationResponse(): QueryDelegationResponse { - return { delegationResponse: undefined }; + return { + delegationResponse: undefined, + }; } export const QueryDelegationResponse = { @@ -839,6 +952,7 @@ export const QueryDelegationResponse = { if (message.delegationResponse !== undefined) { DelegationResponse.encode(message.delegationResponse, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -846,17 +960,21 @@ export const QueryDelegationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegationResponse(); + 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; }, @@ -888,7 +1006,10 @@ export const QueryDelegationResponse = { }; function createBaseQueryUnbondingDelegationRequest(): QueryUnbondingDelegationRequest { - return { delegatorAddr: "", validatorAddr: "" }; + return { + delegatorAddr: "", + validatorAddr: "", + }; } export const QueryUnbondingDelegationRequest = { @@ -896,9 +1017,11 @@ export const QueryUnbondingDelegationRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.validatorAddr !== "") { writer.uint32(18).string(message.validatorAddr); } + return writer; }, @@ -906,20 +1029,25 @@ export const QueryUnbondingDelegationRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnbondingDelegationRequest(); + 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; }, @@ -948,7 +1076,9 @@ export const QueryUnbondingDelegationRequest = { }; function createBaseQueryUnbondingDelegationResponse(): QueryUnbondingDelegationResponse { - return { unbond: undefined }; + return { + unbond: undefined, + }; } export const QueryUnbondingDelegationResponse = { @@ -956,6 +1086,7 @@ export const QueryUnbondingDelegationResponse = { if (message.unbond !== undefined) { UnbondingDelegation.encode(message.unbond, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -963,22 +1094,28 @@ export const QueryUnbondingDelegationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnbondingDelegationResponse(); + 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 { - return { unbond: isSet(object.unbond) ? UnbondingDelegation.fromJSON(object.unbond) : undefined }; + return { + unbond: isSet(object.unbond) ? UnbondingDelegation.fromJSON(object.unbond) : undefined, + }; }, toJSON(message: QueryUnbondingDelegationResponse): unknown { @@ -1001,7 +1138,10 @@ export const QueryUnbondingDelegationResponse = { }; function createBaseQueryDelegatorDelegationsRequest(): QueryDelegatorDelegationsRequest { - return { delegatorAddr: "", pagination: undefined }; + return { + delegatorAddr: "", + pagination: undefined, + }; } export const QueryDelegatorDelegationsRequest = { @@ -1009,9 +1149,11 @@ export const QueryDelegatorDelegationsRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1019,20 +1161,25 @@ export const QueryDelegatorDelegationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorDelegationsRequest(); + 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; }, @@ -1065,7 +1212,10 @@ export const QueryDelegatorDelegationsRequest = { }; function createBaseQueryDelegatorDelegationsResponse(): QueryDelegatorDelegationsResponse { - return { delegationResponses: [], pagination: undefined }; + return { + delegationResponses: [], + pagination: undefined, + }; } export const QueryDelegatorDelegationsResponse = { @@ -1073,9 +1223,11 @@ export const QueryDelegatorDelegationsResponse = { 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; }, @@ -1083,20 +1235,25 @@ export const QueryDelegatorDelegationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorDelegationsResponse(); + 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; }, @@ -1111,6 +1268,7 @@ export const QueryDelegatorDelegationsResponse = { toJSON(message: QueryDelegatorDelegationsResponse): unknown { const obj: any = {}; + if (message.delegationResponses) { obj.delegationResponses = message.delegationResponses.map((e) => e ? DelegationResponse.toJSON(e) : undefined, @@ -1118,6 +1276,7 @@ export const QueryDelegatorDelegationsResponse = { } else { obj.delegationResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -1138,7 +1297,10 @@ export const QueryDelegatorDelegationsResponse = { }; function createBaseQueryDelegatorUnbondingDelegationsRequest(): QueryDelegatorUnbondingDelegationsRequest { - return { delegatorAddr: "", pagination: undefined }; + return { + delegatorAddr: "", + pagination: undefined, + }; } export const QueryDelegatorUnbondingDelegationsRequest = { @@ -1149,9 +1311,11 @@ export const QueryDelegatorUnbondingDelegationsRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1159,20 +1323,25 @@ export const QueryDelegatorUnbondingDelegationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); + 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; }, @@ -1205,7 +1374,10 @@ export const QueryDelegatorUnbondingDelegationsRequest = { }; function createBaseQueryDelegatorUnbondingDelegationsResponse(): QueryDelegatorUnbondingDelegationsResponse { - return { unbondingResponses: [], pagination: undefined }; + return { + unbondingResponses: [], + pagination: undefined, + }; } export const QueryDelegatorUnbondingDelegationsResponse = { @@ -1216,9 +1388,11 @@ export const QueryDelegatorUnbondingDelegationsResponse = { 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; }, @@ -1226,20 +1400,25 @@ export const QueryDelegatorUnbondingDelegationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); + 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; }, @@ -1254,6 +1433,7 @@ export const QueryDelegatorUnbondingDelegationsResponse = { toJSON(message: QueryDelegatorUnbondingDelegationsResponse): unknown { const obj: any = {}; + if (message.unbondingResponses) { obj.unbondingResponses = message.unbondingResponses.map((e) => e ? UnbondingDelegation.toJSON(e) : undefined, @@ -1261,6 +1441,7 @@ export const QueryDelegatorUnbondingDelegationsResponse = { } else { obj.unbondingResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -1281,7 +1462,12 @@ export const QueryDelegatorUnbondingDelegationsResponse = { }; function createBaseQueryRedelegationsRequest(): QueryRedelegationsRequest { - return { delegatorAddr: "", srcValidatorAddr: "", dstValidatorAddr: "", pagination: undefined }; + return { + delegatorAddr: "", + srcValidatorAddr: "", + dstValidatorAddr: "", + pagination: undefined, + }; } export const QueryRedelegationsRequest = { @@ -1289,15 +1475,19 @@ export const QueryRedelegationsRequest = { 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; }, @@ -1305,26 +1495,33 @@ export const QueryRedelegationsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRedelegationsRequest(); + 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; }, @@ -1363,7 +1560,10 @@ export const QueryRedelegationsRequest = { }; function createBaseQueryRedelegationsResponse(): QueryRedelegationsResponse { - return { redelegationResponses: [], pagination: undefined }; + return { + redelegationResponses: [], + pagination: undefined, + }; } export const QueryRedelegationsResponse = { @@ -1371,9 +1571,11 @@ export const QueryRedelegationsResponse = { 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; }, @@ -1381,20 +1583,25 @@ export const QueryRedelegationsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRedelegationsResponse(); + 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; }, @@ -1409,6 +1616,7 @@ export const QueryRedelegationsResponse = { toJSON(message: QueryRedelegationsResponse): unknown { const obj: any = {}; + if (message.redelegationResponses) { obj.redelegationResponses = message.redelegationResponses.map((e) => e ? RedelegationResponse.toJSON(e) : undefined, @@ -1416,6 +1624,7 @@ export const QueryRedelegationsResponse = { } else { obj.redelegationResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -1436,7 +1645,10 @@ export const QueryRedelegationsResponse = { }; function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest { - return { delegatorAddr: "", pagination: undefined }; + return { + delegatorAddr: "", + pagination: undefined, + }; } export const QueryDelegatorValidatorsRequest = { @@ -1444,9 +1656,11 @@ export const QueryDelegatorValidatorsRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1454,20 +1668,25 @@ export const QueryDelegatorValidatorsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorsRequest(); + 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; }, @@ -1500,7 +1719,10 @@ export const QueryDelegatorValidatorsRequest = { }; function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse { - return { validators: [], pagination: undefined }; + return { + validators: [], + pagination: undefined, + }; } export const QueryDelegatorValidatorsResponse = { @@ -1508,9 +1730,11 @@ export const QueryDelegatorValidatorsResponse = { 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; }, @@ -1518,20 +1742,25 @@ export const QueryDelegatorValidatorsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorsResponse(); + 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; }, @@ -1546,11 +1775,13 @@ export const QueryDelegatorValidatorsResponse = { 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; @@ -1570,7 +1801,10 @@ export const QueryDelegatorValidatorsResponse = { }; function createBaseQueryDelegatorValidatorRequest(): QueryDelegatorValidatorRequest { - return { delegatorAddr: "", validatorAddr: "" }; + return { + delegatorAddr: "", + validatorAddr: "", + }; } export const QueryDelegatorValidatorRequest = { @@ -1578,9 +1812,11 @@ export const QueryDelegatorValidatorRequest = { if (message.delegatorAddr !== "") { writer.uint32(10).string(message.delegatorAddr); } + if (message.validatorAddr !== "") { writer.uint32(18).string(message.validatorAddr); } + return writer; }, @@ -1588,20 +1824,25 @@ export const QueryDelegatorValidatorRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorRequest(); + 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; }, @@ -1630,7 +1871,9 @@ export const QueryDelegatorValidatorRequest = { }; function createBaseQueryDelegatorValidatorResponse(): QueryDelegatorValidatorResponse { - return { validator: undefined }; + return { + validator: undefined, + }; } export const QueryDelegatorValidatorResponse = { @@ -1638,6 +1881,7 @@ export const QueryDelegatorValidatorResponse = { if (message.validator !== undefined) { Validator.encode(message.validator, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1645,22 +1889,28 @@ export const QueryDelegatorValidatorResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDelegatorValidatorResponse(); + 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 { - return { validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined }; + return { + validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, + }; }, toJSON(message: QueryDelegatorValidatorResponse): unknown { @@ -1683,7 +1933,9 @@ export const QueryDelegatorValidatorResponse = { }; function createBaseQueryHistoricalInfoRequest(): QueryHistoricalInfoRequest { - return { height: Long.ZERO }; + return { + height: Long.ZERO, + }; } export const QueryHistoricalInfoRequest = { @@ -1691,6 +1943,7 @@ export const QueryHistoricalInfoRequest = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + return writer; }, @@ -1698,22 +1951,28 @@ export const QueryHistoricalInfoRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryHistoricalInfoRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryHistoricalInfoRequest { - return { height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO }; + return { + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + }; }, toJSON(message: QueryHistoricalInfoRequest): unknown { @@ -1733,7 +1992,9 @@ export const QueryHistoricalInfoRequest = { }; function createBaseQueryHistoricalInfoResponse(): QueryHistoricalInfoResponse { - return { hist: undefined }; + return { + hist: undefined, + }; } export const QueryHistoricalInfoResponse = { @@ -1741,6 +2002,7 @@ export const QueryHistoricalInfoResponse = { if (message.hist !== undefined) { HistoricalInfo.encode(message.hist, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1748,22 +2010,28 @@ export const QueryHistoricalInfoResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryHistoricalInfoResponse(); + 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 { - return { hist: isSet(object.hist) ? HistoricalInfo.fromJSON(object.hist) : undefined }; + return { + hist: isSet(object.hist) ? HistoricalInfo.fromJSON(object.hist) : undefined, + }; }, toJSON(message: QueryHistoricalInfoResponse): unknown { @@ -1795,14 +2063,17 @@ export const QueryPoolRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPoolRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1822,7 +2093,9 @@ export const QueryPoolRequest = { }; function createBaseQueryPoolResponse(): QueryPoolResponse { - return { pool: undefined }; + return { + pool: undefined, + }; } export const QueryPoolResponse = { @@ -1830,6 +2103,7 @@ export const QueryPoolResponse = { if (message.pool !== undefined) { Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1837,22 +2111,28 @@ export const QueryPoolResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPoolResponse(); + 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 { - return { pool: isSet(object.pool) ? Pool.fromJSON(object.pool) : undefined }; + return { + pool: isSet(object.pool) ? Pool.fromJSON(object.pool) : undefined, + }; }, toJSON(message: QueryPoolResponse): unknown { @@ -1882,14 +2162,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1909,7 +2192,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -1917,6 +2202,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1924,22 +2210,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -1955,57 +2247,62 @@ export const QueryParamsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. */ + /*Validators queries all validators that match the given status.*/ + Validator(request: QueryValidatorRequest): Promise; - /** ValidatorDelegations queries delegate info for given validator. */ + /*Validator queries validator info for given validator address.*/ + ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ + /*ValidatorDelegations queries delegate info for given validator.*/ + ValidatorUnbondingDelegations( request: QueryValidatorUnbondingDelegationsRequest, ): Promise; - /** Delegation queries delegate info for given validator delegator pair. */ + /*ValidatorUnbondingDelegations queries unbonding delegations of a validator.*/ + Delegation(request: QueryDelegationRequest): Promise; - /** - * UnbondingDelegation queries unbonding info for given validator delegator - * pair. - */ + /*Delegation queries delegate info for given validator delegator pair.*/ + UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - /** DelegatorDelegations queries all delegations of a given delegator address. */ + /*UnbondingDelegation queries unbonding info for given validator delegator + pair.*/ + DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - /** - * DelegatorUnbondingDelegations queries all unbonding delegations of a given - * delegator address. - */ + /*DelegatorDelegations queries all delegations of a given delegator address.*/ + DelegatorUnbondingDelegations( request: QueryDelegatorUnbondingDelegationsRequest, ): Promise; - /** Redelegations queries redelegations of given address. */ + /*DelegatorUnbondingDelegations queries all unbonding delegations of a given + delegator address.*/ + Redelegations(request: QueryRedelegationsRequest): Promise; - /** - * DelegatorValidators queries all validators info for given delegator - * address. - */ + /*Redelegations queries redelegations of given address.*/ + DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /** - * DelegatorValidator queries validator info for given delegator validator - * pair. - */ + /*DelegatorValidators queries all validators info for given delegator + address.*/ + DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - /** HistoricalInfo queries the historical info for given height. */ + /*DelegatorValidator queries validator info for given delegator validator + pair.*/ + HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - /** Pool queries the pool info. */ - Pool(request: QueryPoolRequest): Promise; - /** Parameters queries the staking parameters. */ - Params(request: QueryParamsRequest): Promise; -} + /*HistoricalInfo queries the historical info for given height.*/ + + Pool(request?: QueryPoolRequest): Promise; + /*Pool queries the pool info.*/ + Params(request?: QueryParamsRequest): Promise; + /*Parameters queries the staking parameters.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Validators = this.Validators.bind(this); @@ -2023,6 +2320,7 @@ export class QueryClientImpl implements Query { this.Pool = this.Pool.bind(this); this.Params = this.Params.bind(this); } + Validators(request: QueryValidatorsRequest): Promise { const data = QueryValidatorsRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.staking.v1beta1.Query", "Validators", data); @@ -2103,47 +2401,15 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryHistoricalInfoResponse.decode(new _m0.Reader(data))); } - Pool(request: QueryPoolRequest): Promise { + 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 _m0.Reader(data))); } - Params(request: QueryParamsRequest): Promise { + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index eb4126de..5a73fe4f 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,110 +1,122 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Header } from "../../../tendermint/types/types"; +import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; import { Duration } from "../../../google/protobuf/duration"; -import { Timestamp } from "../../../google/protobuf/timestamp"; -import { Header } from "../../../tendermint/types/types"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; 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"; - case BondStatus.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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; + header: Header; 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; + commissionRates: CommissionRates; /** update_time is the last time the commission rate was changed. */ - updateTime?: Timestamp; -} + updateTime: Timestamp; +} /** 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 @@ -115,188 +127,219 @@ export interface Description { * 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; + + consensusPubkey: Any; /** 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; + + description: Description; /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ + unbondingHeight: Long; /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime?: Timestamp; + + unbondingTime: Timestamp; /** commission defines the commission parameters. */ - commission?: Commission; + + commission: Commission; /** 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: Long; /** completion_time is the unix time for unbonding completion. */ - completionTime?: Timestamp; + + completionTime: Timestamp; /** 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: Long; /** completion_time defines the unix time for redelegation completion. */ - completionTime?: Timestamp; + + completionTime: Timestamp; /** 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; + unbondingTime: Duration; /** 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; - balance?: Coin; + delegation: Delegation; + balance: Coin; } - /** * 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; + redelegationEntry: RedelegationEntry; 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; + redelegation: Redelegation; entries: RedelegationEntryResponse[]; } - /** * Pool is used for tracking bonded and not-bonded token supply of the bond * denomination. */ + export interface Pool { notBondedTokens: string; bondedTokens: string; } function createBaseHistoricalInfo(): HistoricalInfo { - return { header: undefined, valset: [] }; + return { + header: undefined, + valset: [], + }; } export const HistoricalInfo = { @@ -304,9 +347,11 @@ export const HistoricalInfo = { 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; }, @@ -314,20 +359,25 @@ export const HistoricalInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHistoricalInfo(); + 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; }, @@ -341,11 +391,13 @@ export const HistoricalInfo = { 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; }, @@ -359,7 +411,11 @@ export const HistoricalInfo = { }; function createBaseCommissionRates(): CommissionRates { - return { rate: "", maxRate: "", maxChangeRate: "" }; + return { + rate: "", + maxRate: "", + maxChangeRate: "", + }; } export const CommissionRates = { @@ -367,12 +423,15 @@ export const CommissionRates = { 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; }, @@ -380,23 +439,29 @@ export const CommissionRates = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommissionRates(); + 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; }, @@ -426,7 +491,10 @@ export const CommissionRates = { }; function createBaseCommission(): Commission { - return { commissionRates: undefined, updateTime: undefined }; + return { + commissionRates: undefined, + updateTime: undefined, + }; } export const Commission = { @@ -434,9 +502,11 @@ export const Commission = { if (message.commissionRates !== undefined) { CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim(); } + if (message.updateTime !== undefined) { Timestamp.encode(message.updateTime, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -444,20 +514,25 @@ export const Commission = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommission(); + 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 = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -495,7 +570,13 @@ export const Commission = { }; function createBaseDescription(): Description { - return { moniker: "", identity: "", website: "", securityContact: "", details: "" }; + return { + moniker: "", + identity: "", + website: "", + securityContact: "", + details: "", + }; } export const Description = { @@ -503,18 +584,23 @@ export const Description = { 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; }, @@ -522,29 +608,37 @@ export const Description = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescription(); + 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; }, @@ -600,36 +694,47 @@ export const Validator = { 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.isZero()) { writer.uint32(64).int64(message.unbondingHeight); } + if (message.unbondingTime !== undefined) { Timestamp.encode(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; }, @@ -637,47 +742,61 @@ export const Validator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidator(); + 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 = reader.int64() as Long; break; + case 9: message.unbondingTime = 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; }, @@ -690,7 +809,7 @@ export const Validator = { tokens: isSet(object.tokens) ? String(object.tokens) : "", delegatorShares: isSet(object.delegatorShares) ? String(object.delegatorShares) : "", description: isSet(object.description) ? Description.fromJSON(object.description) : undefined, - unbondingHeight: isSet(object.unbondingHeight) ? Long.fromValue(object.unbondingHeight) : Long.ZERO, + unbondingHeight: isSet(object.unbondingHeight) ? Long.fromString(object.unbondingHeight) : Long.ZERO, unbondingTime: isSet(object.unbondingTime) ? fromJsonTimestamp(object.unbondingTime) : undefined, commission: isSet(object.commission) ? Commission.fromJSON(object.commission) : undefined, minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "", @@ -751,7 +870,9 @@ export const Validator = { }; function createBaseValAddresses(): ValAddresses { - return { addresses: [] }; + return { + addresses: [], + }; } export const ValAddresses = { @@ -759,6 +880,7 @@ export const ValAddresses = { for (const v of message.addresses) { writer.uint32(10).string(v!); } + return writer; }, @@ -766,31 +888,39 @@ export const ValAddresses = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValAddresses(); + 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 { - return { addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => String(e)) : [] }; + return { + addresses: Array.isArray(object?.addresses) ? object.addresses.map((e: any) => String(e)) : [], + }; }, toJSON(message: ValAddresses): unknown { const obj: any = {}; + if (message.addresses) { obj.addresses = message.addresses.map((e) => e); } else { obj.addresses = []; } + return obj; }, @@ -802,7 +932,10 @@ export const ValAddresses = { }; function createBaseDVPair(): DVPair { - return { delegatorAddress: "", validatorAddress: "" }; + return { + delegatorAddress: "", + validatorAddress: "", + }; } export const DVPair = { @@ -810,9 +943,11 @@ export const DVPair = { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } + if (message.validatorAddress !== "") { writer.uint32(18).string(message.validatorAddress); } + return writer; }, @@ -820,20 +955,25 @@ export const DVPair = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDVPair(); + 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; }, @@ -860,7 +1000,9 @@ export const DVPair = { }; function createBaseDVPairs(): DVPairs { - return { pairs: [] }; + return { + pairs: [], + }; } export const DVPairs = { @@ -868,6 +1010,7 @@ export const DVPairs = { for (const v of message.pairs) { DVPair.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -875,31 +1018,39 @@ export const DVPairs = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDVPairs(); + 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 { - return { pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromJSON(e)) : [] }; + return { + pairs: Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromJSON(e)) : [], + }; }, 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; }, @@ -911,7 +1062,11 @@ export const DVPairs = { }; function createBaseDVVTriplet(): DVVTriplet { - return { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "" }; + return { + delegatorAddress: "", + validatorSrcAddress: "", + validatorDstAddress: "", + }; } export const DVVTriplet = { @@ -919,12 +1074,15 @@ export const DVVTriplet = { 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; }, @@ -932,23 +1090,29 @@ export const DVVTriplet = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDVVTriplet(); + 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; }, @@ -978,7 +1142,9 @@ export const DVVTriplet = { }; function createBaseDVVTriplets(): DVVTriplets { - return { triplets: [] }; + return { + triplets: [], + }; } export const DVVTriplets = { @@ -986,6 +1152,7 @@ export const DVVTriplets = { for (const v of message.triplets) { DVVTriplet.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -993,17 +1160,21 @@ export const DVVTriplets = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDVVTriplets(); + 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; }, @@ -1017,11 +1188,13 @@ export const DVVTriplets = { 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; }, @@ -1033,7 +1206,11 @@ export const DVVTriplets = { }; function createBaseDelegation(): Delegation { - return { delegatorAddress: "", validatorAddress: "", shares: "" }; + return { + delegatorAddress: "", + validatorAddress: "", + shares: "", + }; } export const Delegation = { @@ -1041,12 +1218,15 @@ export const Delegation = { 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; }, @@ -1054,23 +1234,29 @@ export const Delegation = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegation(); + 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; }, @@ -1100,7 +1286,11 @@ export const Delegation = { }; function createBaseUnbondingDelegation(): UnbondingDelegation { - return { delegatorAddress: "", validatorAddress: "", entries: [] }; + return { + delegatorAddress: "", + validatorAddress: "", + entries: [], + }; } export const UnbondingDelegation = { @@ -1108,12 +1298,15 @@ export const UnbondingDelegation = { 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; }, @@ -1121,23 +1314,29 @@ export const UnbondingDelegation = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUnbondingDelegation(); + 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; }, @@ -1155,11 +1354,13 @@ export const UnbondingDelegation = { 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; }, @@ -1173,7 +1374,12 @@ export const UnbondingDelegation = { }; function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry { - return { creationHeight: Long.ZERO, completionTime: undefined, initialBalance: "", balance: "" }; + return { + creationHeight: Long.ZERO, + completionTime: undefined, + initialBalance: "", + balance: "", + }; } export const UnbondingDelegationEntry = { @@ -1181,15 +1387,19 @@ export const UnbondingDelegationEntry = { if (!message.creationHeight.isZero()) { writer.uint32(8).int64(message.creationHeight); } + if (message.completionTime !== undefined) { Timestamp.encode(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; }, @@ -1197,32 +1407,39 @@ export const UnbondingDelegationEntry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUnbondingDelegationEntry(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.creationHeight = reader.int64() as Long; break; + case 2: message.completionTime = 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 { return { - creationHeight: isSet(object.creationHeight) ? Long.fromValue(object.creationHeight) : Long.ZERO, + creationHeight: isSet(object.creationHeight) ? Long.fromString(object.creationHeight) : Long.ZERO, completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined, initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", balance: isSet(object.balance) ? String(object.balance) : "", @@ -1259,7 +1476,12 @@ export const UnbondingDelegationEntry = { }; function createBaseRedelegationEntry(): RedelegationEntry { - return { creationHeight: Long.ZERO, completionTime: undefined, initialBalance: "", sharesDst: "" }; + return { + creationHeight: Long.ZERO, + completionTime: undefined, + initialBalance: "", + sharesDst: "", + }; } export const RedelegationEntry = { @@ -1267,15 +1489,19 @@ export const RedelegationEntry = { if (!message.creationHeight.isZero()) { writer.uint32(8).int64(message.creationHeight); } + if (message.completionTime !== undefined) { Timestamp.encode(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; }, @@ -1283,32 +1509,39 @@ export const RedelegationEntry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRedelegationEntry(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.creationHeight = reader.int64() as Long; break; + case 2: message.completionTime = 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 { return { - creationHeight: isSet(object.creationHeight) ? Long.fromValue(object.creationHeight) : Long.ZERO, + creationHeight: isSet(object.creationHeight) ? Long.fromString(object.creationHeight) : Long.ZERO, completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined, initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", sharesDst: isSet(object.sharesDst) ? String(object.sharesDst) : "", @@ -1343,7 +1576,12 @@ export const RedelegationEntry = { }; function createBaseRedelegation(): Redelegation { - return { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "", entries: [] }; + return { + delegatorAddress: "", + validatorSrcAddress: "", + validatorDstAddress: "", + entries: [], + }; } export const Redelegation = { @@ -1351,15 +1589,19 @@ export const Redelegation = { 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; }, @@ -1367,26 +1609,33 @@ export const Redelegation = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRedelegation(); + 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; }, @@ -1406,11 +1655,13 @@ export const Redelegation = { 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; }, @@ -1425,7 +1676,13 @@ export const Redelegation = { }; function createBaseParams(): Params { - return { unbondingTime: undefined, maxValidators: 0, maxEntries: 0, historicalEntries: 0, bondDenom: "" }; + return { + unbondingTime: undefined, + maxValidators: 0, + maxEntries: 0, + historicalEntries: 0, + bondDenom: "", + }; } export const Params = { @@ -1433,18 +1690,23 @@ export const Params = { 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; }, @@ -1452,29 +1714,37 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + 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; }, @@ -1490,8 +1760,7 @@ export const Params = { toJSON(message: Params): unknown { const obj: any = {}; - message.unbondingTime !== undefined && - (obj.unbondingTime = message.unbondingTime ? Duration.toJSON(message.unbondingTime) : undefined); + message.unbondingTime !== undefined && (obj.unbondingTime = message.unbondingTime); message.maxValidators !== undefined && (obj.maxValidators = Math.round(message.maxValidators)); message.maxEntries !== undefined && (obj.maxEntries = Math.round(message.maxEntries)); message.historicalEntries !== undefined && @@ -1502,10 +1771,7 @@ export const Params = { fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.unbondingTime = - object.unbondingTime !== undefined && object.unbondingTime !== null - ? Duration.fromPartial(object.unbondingTime) - : undefined; + message.unbondingTime = object.unbondingTime ?? undefined; message.maxValidators = object.maxValidators ?? 0; message.maxEntries = object.maxEntries ?? 0; message.historicalEntries = object.historicalEntries ?? 0; @@ -1515,7 +1781,10 @@ export const Params = { }; function createBaseDelegationResponse(): DelegationResponse { - return { delegation: undefined, balance: undefined }; + return { + delegation: undefined, + balance: undefined, + }; } export const DelegationResponse = { @@ -1523,9 +1792,11 @@ export const DelegationResponse = { 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; }, @@ -1533,20 +1804,25 @@ export const DelegationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelegationResponse(); + 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; }, @@ -1579,7 +1855,10 @@ export const DelegationResponse = { }; function createBaseRedelegationEntryResponse(): RedelegationEntryResponse { - return { redelegationEntry: undefined, balance: "" }; + return { + redelegationEntry: undefined, + balance: "", + }; } export const RedelegationEntryResponse = { @@ -1587,9 +1866,11 @@ export const RedelegationEntryResponse = { if (message.redelegationEntry !== undefined) { RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim(); } + if (message.balance !== "") { writer.uint32(34).string(message.balance); } + return writer; }, @@ -1597,20 +1878,25 @@ export const RedelegationEntryResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRedelegationEntryResponse(); + 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; }, @@ -1647,7 +1933,10 @@ export const RedelegationEntryResponse = { }; function createBaseRedelegationResponse(): RedelegationResponse { - return { redelegation: undefined, entries: [] }; + return { + redelegation: undefined, + entries: [], + }; } export const RedelegationResponse = { @@ -1655,9 +1944,11 @@ export const RedelegationResponse = { 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; }, @@ -1665,20 +1956,25 @@ export const RedelegationResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRedelegationResponse(); + 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; }, @@ -1695,11 +1991,13 @@ export const RedelegationResponse = { 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; }, @@ -1715,7 +2013,10 @@ export const RedelegationResponse = { }; function createBasePool(): Pool { - return { notBondedTokens: "", bondedTokens: "" }; + return { + notBondedTokens: "", + bondedTokens: "", + }; } export const Pool = { @@ -1723,9 +2024,11 @@ export const Pool = { if (message.notBondedTokens !== "") { writer.uint32(10).string(message.notBondedTokens); } + if (message.bondedTokens !== "") { writer.uint32(18).string(message.bondedTokens); } + return writer; }, @@ -1733,20 +2036,25 @@ export const Pool = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePool(); + 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; }, @@ -1771,57 +2079,3 @@ export const Pool = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index f89f0d23..b9ab05f8 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,30 +1,28 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin } from "../../base/v1beta1/coin"; -import { CommissionRates, Description } from "./staking"; - +import { Timestamp } from "../../../google/protobuf/timestamp"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; - /** MsgCreateValidator defines a SDK message for creating a new validator. */ + export interface MsgCreateValidator { - description?: Description; - commission?: CommissionRates; + description: Description; + commission: CommissionRates; minSelfDelegation: string; delegatorAddress: string; validatorAddress: string; - pubkey?: Any; - value?: Coin; + pubkey: Any; + value: Coin; } - /** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ -export interface MsgCreateValidatorResponse {} +export interface MsgCreateValidatorResponse {} /** MsgEditValidator defines a SDK message for editing an existing validator. */ + export interface MsgEditValidator { - description?: Description; + description: Description; validatorAddress: string; /** * We pass a reference to the new commission rate and min self delegation as @@ -32,55 +30,56 @@ export interface MsgEditValidator { * 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 {} +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; + amount: Coin; } - /** MsgDelegateResponse defines the Msg/Delegate response type. */ -export interface MsgDelegateResponse {} +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; + amount: Coin; } - /** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ + export interface MsgBeginRedelegateResponse { - completionTime?: Timestamp; + completionTime: Timestamp; } - /** * MsgUndelegate defines a SDK message for performing an undelegation from a * delegate and a validator. */ + export interface MsgUndelegate { delegatorAddress: string; validatorAddress: string; - amount?: Coin; + amount: Coin; } - /** MsgUndelegateResponse defines the Msg/Undelegate response type. */ + export interface MsgUndelegateResponse { - completionTime?: Timestamp; + completionTime: Timestamp; } function createBaseMsgCreateValidator(): MsgCreateValidator { @@ -100,24 +99,31 @@ export const MsgCreateValidator = { 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; }, @@ -125,35 +131,45 @@ export const MsgCreateValidator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateValidator(); + 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; }, @@ -217,14 +233,17 @@ export const MsgCreateValidatorResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateValidatorResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -244,7 +263,12 @@ export const MsgCreateValidatorResponse = { }; function createBaseMsgEditValidator(): MsgEditValidator { - return { description: undefined, validatorAddress: "", commissionRate: "", minSelfDelegation: "" }; + return { + description: undefined, + validatorAddress: "", + commissionRate: "", + minSelfDelegation: "", + }; } export const MsgEditValidator = { @@ -252,15 +276,19 @@ export const MsgEditValidator = { 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; }, @@ -268,26 +296,33 @@ export const MsgEditValidator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgEditValidator(); + 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; }, @@ -336,14 +371,17 @@ export const MsgEditValidatorResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgEditValidatorResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -363,7 +401,11 @@ export const MsgEditValidatorResponse = { }; function createBaseMsgDelegate(): MsgDelegate { - return { delegatorAddress: "", validatorAddress: "", amount: undefined }; + return { + delegatorAddress: "", + validatorAddress: "", + amount: undefined, + }; } export const MsgDelegate = { @@ -371,12 +413,15 @@ export const MsgDelegate = { 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; }, @@ -384,23 +429,29 @@ export const MsgDelegate = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDelegate(); + 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; }, @@ -443,14 +494,17 @@ export const MsgDelegateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDelegateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -470,7 +524,12 @@ export const MsgDelegateResponse = { }; function createBaseMsgBeginRedelegate(): MsgBeginRedelegate { - return { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "", amount: undefined }; + return { + delegatorAddress: "", + validatorSrcAddress: "", + validatorDstAddress: "", + amount: undefined, + }; } export const MsgBeginRedelegate = { @@ -478,15 +537,19 @@ export const MsgBeginRedelegate = { 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; }, @@ -494,26 +557,33 @@ export const MsgBeginRedelegate = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgBeginRedelegate(); + 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; }, @@ -547,7 +617,9 @@ export const MsgBeginRedelegate = { }; function createBaseMsgBeginRedelegateResponse(): MsgBeginRedelegateResponse { - return { completionTime: undefined }; + return { + completionTime: undefined, + }; } export const MsgBeginRedelegateResponse = { @@ -555,6 +627,7 @@ export const MsgBeginRedelegateResponse = { if (message.completionTime !== undefined) { Timestamp.encode(message.completionTime, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -562,17 +635,21 @@ export const MsgBeginRedelegateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgBeginRedelegateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.completionTime = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -602,7 +679,11 @@ export const MsgBeginRedelegateResponse = { }; function createBaseMsgUndelegate(): MsgUndelegate { - return { delegatorAddress: "", validatorAddress: "", amount: undefined }; + return { + delegatorAddress: "", + validatorAddress: "", + amount: undefined, + }; } export const MsgUndelegate = { @@ -610,12 +691,15 @@ export const MsgUndelegate = { 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; }, @@ -623,23 +707,29 @@ export const MsgUndelegate = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUndelegate(); + 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; }, @@ -670,7 +760,9 @@ export const MsgUndelegate = { }; function createBaseMsgUndelegateResponse(): MsgUndelegateResponse { - return { completionTime: undefined }; + return { + completionTime: undefined, + }; } export const MsgUndelegateResponse = { @@ -678,6 +770,7 @@ export const MsgUndelegateResponse = { if (message.completionTime !== undefined) { Timestamp.encode(message.completionTime, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -685,17 +778,21 @@ export const MsgUndelegateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUndelegateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.completionTime = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -721,32 +818,30 @@ export const MsgUndelegateResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*CreateValidator defines a method for creating a new validator.*/ + EditValidator(request: MsgEditValidator): Promise; - /** - * Delegate defines a method for performing a delegation of coins - * from a delegator to a validator. - */ + /*EditValidator defines a method for editing an existing 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. - */ + /*Delegate defines a method for performing a delegation of coins + from a delegator to a validator.*/ + BeginRedelegate(request: MsgBeginRedelegate): Promise; - /** - * Undelegate defines a method for performing an undelegation from a - * delegate and a validator. - */ + /*BeginRedelegate defines a method for performing a redelegation + of coins from a delegator and source validator to a destination validator.*/ + Undelegate(request: MsgUndelegate): Promise; + /*Undelegate defines a method for performing an undelegation from a + delegate and a validator.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.CreateValidator = this.CreateValidator.bind(this); @@ -755,6 +850,7 @@ export class MsgClientImpl implements Msg { this.BeginRedelegate = this.BeginRedelegate.bind(this); this.Undelegate = this.Undelegate.bind(this); } + CreateValidator(request: MsgCreateValidator): Promise { const data = MsgCreateValidator.encode(request).finish(); const promise = this.rpc.request("cosmos.staking.v1beta1.Msg", "CreateValidator", data); @@ -785,61 +881,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgUndelegateResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index eb74ea18..f5630d51 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,142 +1,157 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../../google/protobuf/any"; import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; - +import { Any } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.tx.signing.v1beta1"; - /** SignMode represents a signing mode with its own security guarantees. */ + export enum SignMode { /** * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - * rejected + * rejected */ SIGN_MODE_UNSPECIFIED = 0, + /** * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - * verified with raw bytes from Tx + * verified with raw bytes from Tx */ SIGN_MODE_DIRECT = 1, + /** * SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some - * human-readable textual representation on top of the binary representation - * from SIGN_MODE_DIRECT + * human-readable textual representation on top of the binary representation + * from SIGN_MODE_DIRECT */ SIGN_MODE_TEXTUAL = 2, + /** * SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - * Amino JSON and will be removed in the future + * Amino JSON and will be removed in the future */ SIGN_MODE_LEGACY_AMINO_JSON = 127, + /** * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 * - * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - * but is not implemented on the SDK by default. To enable EIP-191, you need - * to pass a custom `TxConfig` that has an implementation of - * `SignModeHandler` for EIP-191. The SDK may decide to fully support - * EIP-191 in the future. + * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + * but is not implemented on the SDK by default. To enable EIP-191, you need + * to pass a custom `TxConfig` that has an implementation of + * `SignModeHandler` for EIP-191. The SDK may decide to fully support + * EIP-191 in the future. * - * Since: cosmos-sdk 0.45.2 + * Since: cosmos-sdk 0.45.2 */ SIGN_MODE_EIP_191 = 191, UNRECOGNIZED = -1, } - export function signModeFromJSON(object: any): SignMode { switch (object) { case 0: case "SIGN_MODE_UNSPECIFIED": return SignMode.SIGN_MODE_UNSPECIFIED; + case 1: case "SIGN_MODE_DIRECT": return SignMode.SIGN_MODE_DIRECT; + case 2: case "SIGN_MODE_TEXTUAL": return SignMode.SIGN_MODE_TEXTUAL; + case 127: case "SIGN_MODE_LEGACY_AMINO_JSON": return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; + case 191: case "SIGN_MODE_EIP_191": return SignMode.SIGN_MODE_EIP_191; + case -1: case "UNRECOGNIZED": default: return SignMode.UNRECOGNIZED; } } - export function signModeToJSON(object: SignMode): string { switch (object) { case SignMode.SIGN_MODE_UNSPECIFIED: return "SIGN_MODE_UNSPECIFIED"; + case SignMode.SIGN_MODE_DIRECT: return "SIGN_MODE_DIRECT"; + case SignMode.SIGN_MODE_TEXTUAL: return "SIGN_MODE_TEXTUAL"; + case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: return "SIGN_MODE_LEGACY_AMINO_JSON"; + case SignMode.SIGN_MODE_EIP_191: return "SIGN_MODE_EIP_191"; - case SignMode.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** SignatureDescriptors wraps multiple SignatureDescriptor's. */ + export interface SignatureDescriptors { /** signatures are the signature descriptors */ signatures: SignatureDescriptor[]; } - /** * SignatureDescriptor is a convenience type which represents the full data for * a signature including the public key of the signer, signing modes and the * signature itself. It is primarily used for coordinating signatures between * clients. */ + export interface SignatureDescriptor { /** public_key is the public key of the signer */ - publicKey?: Any; - data?: SignatureDescriptor_Data; + publicKey: Any; + data: SignatureDescriptor_Data; /** * sequence is the sequence of the account, which describes the * number of committed transactions signed by a given address. It is used to prevent * replay attacks. */ + sequence: Long; } - /** Data represents signature data */ + export interface SignatureDescriptor_Data { /** single represents a single signer */ - single?: SignatureDescriptor_Data_Single | undefined; + single?: SignatureDescriptor_Data_Single; /** multi represents a multisig signer */ - multi?: SignatureDescriptor_Data_Multi | undefined; -} + multi?: SignatureDescriptor_Data_Multi; +} /** Single is the signature data for a single signer */ + export interface SignatureDescriptor_Data_Single { /** mode is the signing mode of the single signer */ mode: SignMode; /** signature is the raw signature bytes */ + signature: Uint8Array; } - /** Multi is the signature data for a multisig public key */ + export interface SignatureDescriptor_Data_Multi { /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArray; + bitarray: CompactBitArray; /** signatures is the signatures of the multi-signature */ + signatures: SignatureDescriptor_Data[]; } function createBaseSignatureDescriptors(): SignatureDescriptors { - return { signatures: [] }; + return { + signatures: [], + }; } export const SignatureDescriptors = { @@ -144,6 +159,7 @@ export const SignatureDescriptors = { for (const v of message.signatures) { SignatureDescriptor.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -151,17 +167,21 @@ export const SignatureDescriptors = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureDescriptors(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signatures.push(SignatureDescriptor.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -175,11 +195,13 @@ export const SignatureDescriptors = { toJSON(message: SignatureDescriptors): unknown { const obj: any = {}; + if (message.signatures) { obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor.toJSON(e) : undefined)); } else { obj.signatures = []; } + return obj; }, @@ -191,7 +213,11 @@ export const SignatureDescriptors = { }; function createBaseSignatureDescriptor(): SignatureDescriptor { - return { publicKey: undefined, data: undefined, sequence: Long.UZERO }; + return { + publicKey: undefined, + data: undefined, + sequence: Long.UZERO, + }; } export const SignatureDescriptor = { @@ -199,12 +225,15 @@ export const SignatureDescriptor = { if (message.publicKey !== undefined) { Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); } + if (message.data !== undefined) { SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim(); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -212,23 +241,29 @@ export const SignatureDescriptor = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureDescriptor(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.publicKey = Any.decode(reader, reader.uint32()); break; + case 2: message.data = SignatureDescriptor_Data.decode(reader, reader.uint32()); break; + case 3: message.sequence = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -236,7 +271,7 @@ export const SignatureDescriptor = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, data: isSet(object.data) ? SignatureDescriptor_Data.fromJSON(object.data) : undefined, - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -269,7 +304,10 @@ export const SignatureDescriptor = { }; function createBaseSignatureDescriptor_Data(): SignatureDescriptor_Data { - return { single: undefined, multi: undefined }; + return { + single: undefined, + multi: undefined, + }; } export const SignatureDescriptor_Data = { @@ -277,9 +315,11 @@ export const SignatureDescriptor_Data = { if (message.single !== undefined) { SignatureDescriptor_Data_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); } + if (message.multi !== undefined) { SignatureDescriptor_Data_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -287,20 +327,25 @@ export const SignatureDescriptor_Data = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureDescriptor_Data(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.single = SignatureDescriptor_Data_Single.decode(reader, reader.uint32()); break; + case 2: message.multi = SignatureDescriptor_Data_Multi.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -337,7 +382,10 @@ export const SignatureDescriptor_Data = { }; function createBaseSignatureDescriptor_Data_Single(): SignatureDescriptor_Data_Single { - return { mode: 0, signature: new Uint8Array() }; + return { + mode: 0, + signature: new Uint8Array(), + }; } export const SignatureDescriptor_Data_Single = { @@ -345,9 +393,11 @@ export const SignatureDescriptor_Data_Single = { if (message.mode !== 0) { writer.uint32(8).int32(message.mode); } + if (message.signature.length !== 0) { writer.uint32(18).bytes(message.signature); } + return writer; }, @@ -355,20 +405,25 @@ export const SignatureDescriptor_Data_Single = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureDescriptor_Data_Single(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.mode = reader.int32() as any; break; + case 2: message.signature = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -400,7 +455,10 @@ export const SignatureDescriptor_Data_Single = { }; function createBaseSignatureDescriptor_Data_Multi(): SignatureDescriptor_Data_Multi { - return { bitarray: undefined, signatures: [] }; + return { + bitarray: undefined, + signatures: [], + }; } export const SignatureDescriptor_Data_Multi = { @@ -408,9 +466,11 @@ export const SignatureDescriptor_Data_Multi = { if (message.bitarray !== undefined) { CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); } + for (const v of message.signatures) { SignatureDescriptor_Data.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -418,20 +478,25 @@ export const SignatureDescriptor_Data_Multi = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureDescriptor_Data_Multi(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.bitarray = CompactBitArray.decode(reader, reader.uint32()); break; + case 2: message.signatures.push(SignatureDescriptor_Data.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -448,11 +513,13 @@ export const SignatureDescriptor_Data_Multi = { const obj: any = {}; message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined); + if (message.signatures) { obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor_Data.toJSON(e) : undefined)); } else { obj.signatures = []; } + return obj; }, @@ -468,75 +535,3 @@ export const SignatureDescriptor_Data_Multi = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 371b9b90..a1c20bc8 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,237 +1,260 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Block } from "../../../tendermint/types/block"; -import { BlockID } from "../../../tendermint/types/types"; -import { GasInfo, Result, TxResponse } from "../../base/abci/v1beta1/abci"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Tx } from "./tx"; - +import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; +import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; +import { BlockID } from "../../../tendermint/types/types"; +import { Block } from "../../../tendermint/types/block"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; - /** OrderBy defines the sorting order */ + export enum OrderBy { /** ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. */ ORDER_BY_UNSPECIFIED = 0, + /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ ORDER_BY_ASC = 1, + /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ ORDER_BY_DESC = 2, UNRECOGNIZED = -1, } - export function orderByFromJSON(object: any): OrderBy { switch (object) { case 0: case "ORDER_BY_UNSPECIFIED": return OrderBy.ORDER_BY_UNSPECIFIED; + case 1: case "ORDER_BY_ASC": return OrderBy.ORDER_BY_ASC; + case 2: case "ORDER_BY_DESC": return OrderBy.ORDER_BY_DESC; + case -1: case "UNRECOGNIZED": default: return OrderBy.UNRECOGNIZED; } } - export function orderByToJSON(object: OrderBy): string { switch (object) { case OrderBy.ORDER_BY_UNSPECIFIED: return "ORDER_BY_UNSPECIFIED"; + case OrderBy.ORDER_BY_ASC: return "ORDER_BY_ASC"; + case OrderBy.ORDER_BY_DESC: return "ORDER_BY_DESC"; - case OrderBy.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. */ + export enum BroadcastMode { /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ BROADCAST_MODE_UNSPECIFIED = 0, + /** * BROADCAST_MODE_BLOCK - BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - * the tx to be committed in a block. + * the tx to be committed in a block. */ BROADCAST_MODE_BLOCK = 1, + /** * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - * a CheckTx execution response only. + * a CheckTx execution response only. */ BROADCAST_MODE_SYNC = 2, + /** * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - * immediately. + * immediately. */ BROADCAST_MODE_ASYNC = 3, UNRECOGNIZED = -1, } - export function broadcastModeFromJSON(object: any): BroadcastMode { switch (object) { case 0: case "BROADCAST_MODE_UNSPECIFIED": return BroadcastMode.BROADCAST_MODE_UNSPECIFIED; + case 1: case "BROADCAST_MODE_BLOCK": return BroadcastMode.BROADCAST_MODE_BLOCK; + case 2: case "BROADCAST_MODE_SYNC": return BroadcastMode.BROADCAST_MODE_SYNC; + case 3: case "BROADCAST_MODE_ASYNC": return BroadcastMode.BROADCAST_MODE_ASYNC; + case -1: case "UNRECOGNIZED": default: return BroadcastMode.UNRECOGNIZED; } } - export function broadcastModeToJSON(object: BroadcastMode): string { switch (object) { case BroadcastMode.BROADCAST_MODE_UNSPECIFIED: return "BROADCAST_MODE_UNSPECIFIED"; + case BroadcastMode.BROADCAST_MODE_BLOCK: return "BROADCAST_MODE_BLOCK"; + case BroadcastMode.BROADCAST_MODE_SYNC: return "BROADCAST_MODE_SYNC"; + case BroadcastMode.BROADCAST_MODE_ASYNC: return "BROADCAST_MODE_ASYNC"; - case BroadcastMode.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** * GetTxsEventRequest is the request type for the Service.TxsByEvents * RPC method. */ + export interface GetTxsEventRequest { /** events is the list of transaction event type. */ - events: string[]; + events?: string[]; /** pagination defines a pagination for the request. */ + pagination?: PageRequest; - orderBy: OrderBy; + orderBy?: OrderBy; } - /** * GetTxsEventResponse is the response type for the Service.TxsByEvents * RPC method. */ + export interface GetTxsEventResponse { /** txs is the list of queried transactions. */ txs: Tx[]; /** tx_responses is the list of queried TxResponses. */ + txResponses: TxResponse[]; /** pagination defines a pagination for the response. */ + pagination?: PageResponse; } - /** * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest * RPC method. */ + export interface BroadcastTxRequest { /** tx_bytes is the raw transaction. */ txBytes: Uint8Array; mode: BroadcastMode; } - /** * BroadcastTxResponse is the response type for the * Service.BroadcastTx method. */ + export interface BroadcastTxResponse { /** tx_response is the queried TxResponses. */ - txResponse?: TxResponse; + txResponse: TxResponse; } - /** * SimulateRequest is the request type for the Service.Simulate * RPC method. */ + export interface SimulateRequest { /** * tx is the transaction to simulate. * Deprecated. Send raw tx bytes instead. - * - * @deprecated */ - tx?: Tx; + + /** @deprecated */ + tx: Tx; /** * tx_bytes is the raw transaction. * * Since: cosmos-sdk 0.43 */ + txBytes: Uint8Array; } - /** * SimulateResponse is the response type for the * Service.SimulateRPC method. */ + export interface SimulateResponse { /** gas_info is the information about gas used in the simulation. */ - gasInfo?: GasInfo; + gasInfo: GasInfo; /** result is the result of the simulation. */ - result?: Result; -} + result: Result; +} /** * GetTxRequest is the request type for the Service.GetTx * RPC method. */ + export interface GetTxRequest { /** hash is the tx hash to query, encoded as a hex string. */ hash: string; } - /** GetTxResponse is the response type for the Service.GetTx method. */ + export interface GetTxResponse { /** tx is the queried transaction. */ - tx?: Tx; + tx: Tx; /** tx_response is the queried TxResponses. */ - txResponse?: TxResponse; -} + txResponse: TxResponse; +} /** * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs * RPC method. * * Since: cosmos-sdk 0.45.2 */ + export interface GetBlockWithTxsRequest { /** height is the height of the block to query. */ height: Long; /** pagination defines a pagination for the request. */ + pagination?: PageRequest; } - /** * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. * * Since: cosmos-sdk 0.45.2 */ + export interface GetBlockWithTxsResponse { /** txs are the transactions in the block. */ txs: Tx[]; - blockId?: BlockID; - block?: Block; + blockId: BlockID; + block: Block; /** pagination defines a pagination for the response. */ + pagination?: PageResponse; } function createBaseGetTxsEventRequest(): GetTxsEventRequest { - return { events: [], pagination: undefined, orderBy: 0 }; + return { + events: [], + pagination: undefined, + orderBy: 0, + }; } export const GetTxsEventRequest = { @@ -239,12 +262,15 @@ export const GetTxsEventRequest = { for (const v of message.events) { writer.uint32(10).string(v!); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + if (message.orderBy !== 0) { writer.uint32(24).int32(message.orderBy); } + return writer; }, @@ -252,23 +278,29 @@ export const GetTxsEventRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetTxsEventRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.events.push(reader.string()); break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + case 3: message.orderBy = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -282,11 +314,13 @@ export const GetTxsEventRequest = { toJSON(message: GetTxsEventRequest): unknown { const obj: any = {}; + if (message.events) { obj.events = message.events.map((e) => e); } else { obj.events = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); message.orderBy !== undefined && (obj.orderBy = orderByToJSON(message.orderBy)); @@ -306,7 +340,11 @@ export const GetTxsEventRequest = { }; function createBaseGetTxsEventResponse(): GetTxsEventResponse { - return { txs: [], txResponses: [], pagination: undefined }; + return { + txs: [], + txResponses: [], + pagination: undefined, + }; } export const GetTxsEventResponse = { @@ -314,12 +352,15 @@ export const GetTxsEventResponse = { for (const v of message.txs) { Tx.encode(v!, writer.uint32(10).fork()).ldelim(); } + for (const v of message.txResponses) { TxResponse.encode(v!, writer.uint32(18).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -327,23 +368,29 @@ export const GetTxsEventResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetTxsEventResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.txs.push(Tx.decode(reader, reader.uint32())); break; + case 2: message.txResponses.push(TxResponse.decode(reader, reader.uint32())); break; + case 3: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -359,16 +406,19 @@ export const GetTxsEventResponse = { toJSON(message: GetTxsEventResponse): unknown { const obj: any = {}; + if (message.txs) { obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); } else { obj.txs = []; } + if (message.txResponses) { obj.txResponses = message.txResponses.map((e) => (e ? TxResponse.toJSON(e) : undefined)); } else { obj.txResponses = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -387,7 +437,10 @@ export const GetTxsEventResponse = { }; function createBaseBroadcastTxRequest(): BroadcastTxRequest { - return { txBytes: new Uint8Array(), mode: 0 }; + return { + txBytes: new Uint8Array(), + mode: 0, + }; } export const BroadcastTxRequest = { @@ -395,9 +448,11 @@ export const BroadcastTxRequest = { if (message.txBytes.length !== 0) { writer.uint32(10).bytes(message.txBytes); } + if (message.mode !== 0) { writer.uint32(16).int32(message.mode); } + return writer; }, @@ -405,20 +460,25 @@ export const BroadcastTxRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBroadcastTxRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.txBytes = reader.bytes(); break; + case 2: message.mode = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -446,7 +506,9 @@ export const BroadcastTxRequest = { }; function createBaseBroadcastTxResponse(): BroadcastTxResponse { - return { txResponse: undefined }; + return { + txResponse: undefined, + }; } export const BroadcastTxResponse = { @@ -454,6 +516,7 @@ export const BroadcastTxResponse = { if (message.txResponse !== undefined) { TxResponse.encode(message.txResponse, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -461,22 +524,28 @@ export const BroadcastTxResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBroadcastTxResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.txResponse = TxResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): BroadcastTxResponse { - return { txResponse: isSet(object.txResponse) ? TxResponse.fromJSON(object.txResponse) : undefined }; + return { + txResponse: isSet(object.txResponse) ? TxResponse.fromJSON(object.txResponse) : undefined, + }; }, toJSON(message: BroadcastTxResponse): unknown { @@ -497,7 +566,10 @@ export const BroadcastTxResponse = { }; function createBaseSimulateRequest(): SimulateRequest { - return { tx: undefined, txBytes: new Uint8Array() }; + return { + tx: undefined, + txBytes: new Uint8Array(), + }; } export const SimulateRequest = { @@ -505,9 +577,11 @@ export const SimulateRequest = { if (message.tx !== undefined) { Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); } + if (message.txBytes.length !== 0) { writer.uint32(18).bytes(message.txBytes); } + return writer; }, @@ -515,20 +589,25 @@ export const SimulateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSimulateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.tx = Tx.decode(reader, reader.uint32()); break; + case 2: message.txBytes = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -556,7 +635,10 @@ export const SimulateRequest = { }; function createBaseSimulateResponse(): SimulateResponse { - return { gasInfo: undefined, result: undefined }; + return { + gasInfo: undefined, + result: undefined, + }; } export const SimulateResponse = { @@ -564,9 +646,11 @@ export const SimulateResponse = { 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; }, @@ -574,20 +658,25 @@ export const SimulateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSimulateResponse(); + 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; }, @@ -619,7 +708,9 @@ export const SimulateResponse = { }; function createBaseGetTxRequest(): GetTxRequest { - return { hash: "" }; + return { + hash: "", + }; } export const GetTxRequest = { @@ -627,6 +718,7 @@ export const GetTxRequest = { if (message.hash !== "") { writer.uint32(10).string(message.hash); } + return writer; }, @@ -634,22 +726,28 @@ export const GetTxRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetTxRequest(); + 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): GetTxRequest { - return { hash: isSet(object.hash) ? String(object.hash) : "" }; + return { + hash: isSet(object.hash) ? String(object.hash) : "", + }; }, toJSON(message: GetTxRequest): unknown { @@ -666,7 +764,10 @@ export const GetTxRequest = { }; function createBaseGetTxResponse(): GetTxResponse { - return { tx: undefined, txResponse: undefined }; + return { + tx: undefined, + txResponse: undefined, + }; } export const GetTxResponse = { @@ -674,9 +775,11 @@ export const GetTxResponse = { if (message.tx !== undefined) { Tx.encode(message.tx, writer.uint32(10).fork()).ldelim(); } + if (message.txResponse !== undefined) { TxResponse.encode(message.txResponse, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -684,20 +787,25 @@ export const GetTxResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetTxResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.tx = Tx.decode(reader, reader.uint32()); break; + case 2: message.txResponse = TxResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -728,7 +836,10 @@ export const GetTxResponse = { }; function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { - return { height: Long.ZERO, pagination: undefined }; + return { + height: Long.ZERO, + pagination: undefined, + }; } export const GetBlockWithTxsRequest = { @@ -736,9 +847,11 @@ export const GetBlockWithTxsRequest = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -746,26 +859,31 @@ export const GetBlockWithTxsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockWithTxsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): GetBlockWithTxsRequest { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -791,7 +909,12 @@ export const GetBlockWithTxsRequest = { }; function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { - return { txs: [], blockId: undefined, block: undefined, pagination: undefined }; + return { + txs: [], + blockId: undefined, + block: undefined, + pagination: undefined, + }; } export const GetBlockWithTxsResponse = { @@ -799,15 +922,19 @@ export const GetBlockWithTxsResponse = { for (const v of message.txs) { Tx.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.blockId !== undefined) { BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); } + if (message.block !== undefined) { Block.encode(message.block, writer.uint32(26).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -815,26 +942,33 @@ export const GetBlockWithTxsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetBlockWithTxsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.txs.push(Tx.decode(reader, reader.uint32())); break; + case 2: message.blockId = BlockID.decode(reader, reader.uint32()); break; + case 3: message.block = Block.decode(reader, reader.uint32()); break; + case 4: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -849,11 +983,13 @@ export const GetBlockWithTxsResponse = { toJSON(message: GetBlockWithTxsResponse): unknown { const obj: any = {}; + if (message.txs) { obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); } else { obj.txs = []; } + message.blockId !== undefined && (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); @@ -878,27 +1014,29 @@ export const GetBlockWithTxsResponse = { return message; }, }; +/** Service defines the RPC service */ -/** Service defines a gRPC service for interacting with transactions. */ export interface Service { - /** Simulate simulates executing a transaction for estimating gas usage. */ Simulate(request: SimulateRequest): Promise; - /** GetTx fetches a tx by hash. */ + /*Simulate simulates executing a transaction for estimating gas usage.*/ + GetTx(request: GetTxRequest): Promise; - /** BroadcastTx broadcast transaction. */ + /*GetTx fetches a tx by hash.*/ + BroadcastTx(request: BroadcastTxRequest): Promise; - /** GetTxsEvent fetches txs by event. */ + /*BroadcastTx broadcast transaction.*/ + GetTxsEvent(request: GetTxsEventRequest): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ + /*GetTxsEvent fetches txs by event.*/ + GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; + /*GetBlockWithTxs fetches a block with decoded txs. + + Since: cosmos-sdk 0.45.2*/ } - -export class ServiceClientImpl implements Service { +export class QueryClientImpl implements Service { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Simulate = this.Simulate.bind(this); @@ -907,6 +1045,7 @@ export class ServiceClientImpl implements Service { this.GetTxsEvent = this.GetTxsEvent.bind(this); this.GetBlockWithTxs = this.GetBlockWithTxs.bind(this); } + Simulate(request: SimulateRequest): Promise { const data = SimulateRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "Simulate", data); @@ -937,79 +1076,3 @@ export class ServiceClientImpl implements Service { return promise.then((data) => GetBlockWithTxsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index f89c0968..4efe2cf7 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,30 +1,29 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; -import { Coin } from "../../base/v1beta1/coin"; -import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; - +import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; +import { Coin } from "../../base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; - /** Tx is the standard type used for broadcasting transactions. */ + export interface Tx { /** body is the processable content of the transaction */ - body?: TxBody; + body: TxBody; /** * auth_info is the authorization related content of the transaction, * specifically signers, signer modes and fee */ - authInfo?: AuthInfo; + + authInfo: AuthInfo; /** * signatures is a list of signatures that matches the length and order of * AuthInfo's signer_infos to allow connecting signature meta information like * public key and signing mode by position. */ + signatures: Uint8Array[]; } - /** * TxRaw is a variant of Tx that pins the signer's exact binary representation * of body and auth_info. This is used for signing, broadcasting and @@ -32,6 +31,7 @@ export interface Tx { * the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used * as the transaction ID. */ + export interface TxRaw { /** * body_bytes is a protobuf serialization of a TxBody that matches the @@ -42,16 +42,18 @@ export interface TxRaw { * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the * representation in SignDoc. */ + authInfoBytes: Uint8Array; /** * signatures is a list of signatures that matches the length and order of * AuthInfo's signer_infos to allow connecting signature meta information like * public key and signing mode by position. */ + signatures: Uint8Array[]; } - /** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */ + export interface SignDoc { /** * body_bytes is protobuf serialization of a TxBody that matches the @@ -62,18 +64,21 @@ export interface SignDoc { * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the * representation in TxRaw. */ + authInfoBytes: Uint8Array; /** * chain_id is the unique identifier of the chain this transaction targets. * It prevents signed transactions from being used on another chain by an * attacker */ + chainId: string; /** account_number is the account number of the account in state */ + accountNumber: Long; } - /** TxBody is the body of a transaction that all signers sign over. */ + export interface TxBody { /** * messages is a list of messages to be executed. The required signers of @@ -90,30 +95,34 @@ export interface TxBody { * WARNING: in clients, any publicly exposed text should not be called memo, * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). */ + memo: string; /** * timeout is the block height after which this transaction will not * be processed by the chain */ + timeoutHeight: Long; /** * extension_options are arbitrary options that can be added by chains * when the default options are not sufficient. If any of these are present * and can't be handled, the transaction will be rejected */ + extensionOptions: Any[]; /** * extension_options are arbitrary options that can be added by chains * when the default options are not sufficient. If any of these are present * and can't be handled, they will be ignored */ + nonCriticalExtensionOptions: Any[]; } - /** * AuthInfo describes the fee and signer modes that are used to sign a * transaction. */ + export interface AuthInfo { /** * signer_infos defines the signing modes for the required signers. The number @@ -128,67 +137,72 @@ export interface AuthInfo { * based on the cost of evaluating the body and doing signature verification * of the signers. This can be estimated via simulation. */ - fee?: Fee; -} + fee: Fee; +} /** * SignerInfo describes the public key and signing mode of a single top-level * signer. */ + export interface SignerInfo { /** * public_key is the public key of the signer. It is optional for accounts * that already exist in state. If unset, the verifier can use the required \ * signer address for this position and lookup the public key. */ - publicKey?: Any; + publicKey: Any; /** * mode_info describes the signing mode of the signer and is a nested * structure to support nested multisig pubkey's */ - modeInfo?: ModeInfo; + + modeInfo: ModeInfo; /** * sequence is the sequence of the account, which describes the * number of committed transactions signed by a given address. It is used to * prevent replay attacks. */ + sequence: Long; } - /** ModeInfo describes the signing mode of a single or nested multisig signer. */ + export interface ModeInfo { /** single represents a single signer */ - single?: ModeInfo_Single | undefined; + single?: ModeInfo_Single; /** multi represents a nested multisig signer */ - multi?: ModeInfo_Multi | undefined; -} + multi?: ModeInfo_Multi; +} /** * Single is the mode info for a single signer. It is structured as a message * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the * future */ + export interface ModeInfo_Single { /** mode is the signing mode of the single signer */ mode: SignMode; } - /** Multi is the mode info for a multisig public key */ + export interface ModeInfo_Multi { /** bitarray specifies which keys within the multisig are signing */ - bitarray?: CompactBitArray; + bitarray: CompactBitArray; /** * mode_infos is the corresponding modes of the signers of the multisig * which could include nested multisig public keys */ + modeInfos: ModeInfo[]; } - /** * Fee includes the amount of coins paid in fees and the maximum * gas to be used by the transaction. The ratio yields an effective "gasprice", * which must be above some miminum to be accepted into the mempool. */ + export interface Fee { /** amount is the amount of coins to be paid as a fee */ amount: Coin[]; @@ -196,23 +210,30 @@ export interface Fee { * gas_limit is the maximum gas that can be used in transaction processing * before an out of gas error occurs */ + gasLimit: Long; /** * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. * the payer must be a tx signer (and thus have signed this field in AuthInfo). * setting this field does *not* change the ordering of required signers for the transaction. */ + payer: string; /** * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does * not support fee grants, this will fail */ + granter: string; } function createBaseTx(): Tx { - return { body: undefined, authInfo: undefined, signatures: [] }; + return { + body: undefined, + authInfo: undefined, + signatures: [], + }; } export const Tx = { @@ -220,12 +241,15 @@ export const Tx = { if (message.body !== undefined) { TxBody.encode(message.body, writer.uint32(10).fork()).ldelim(); } + if (message.authInfo !== undefined) { AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim(); } + for (const v of message.signatures) { writer.uint32(26).bytes(v!); } + return writer; }, @@ -233,23 +257,29 @@ export const Tx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTx(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.body = TxBody.decode(reader, reader.uint32()); break; + case 2: message.authInfo = AuthInfo.decode(reader, reader.uint32()); break; + case 3: message.signatures.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -268,11 +298,13 @@ export const Tx = { message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined); message.authInfo !== undefined && (obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined); + if (message.signatures) { obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); } else { obj.signatures = []; } + return obj; }, @@ -290,7 +322,11 @@ export const Tx = { }; function createBaseTxRaw(): TxRaw { - return { bodyBytes: new Uint8Array(), authInfoBytes: new Uint8Array(), signatures: [] }; + return { + bodyBytes: new Uint8Array(), + authInfoBytes: new Uint8Array(), + signatures: [], + }; } export const TxRaw = { @@ -298,12 +334,15 @@ export const TxRaw = { if (message.bodyBytes.length !== 0) { writer.uint32(10).bytes(message.bodyBytes); } + if (message.authInfoBytes.length !== 0) { writer.uint32(18).bytes(message.authInfoBytes); } + for (const v of message.signatures) { writer.uint32(26).bytes(v!); } + return writer; }, @@ -311,23 +350,29 @@ export const TxRaw = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxRaw(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.bodyBytes = reader.bytes(); break; + case 2: message.authInfoBytes = reader.bytes(); break; + case 3: message.signatures.push(reader.bytes()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -351,11 +396,13 @@ export const TxRaw = { (obj.authInfoBytes = base64FromBytes( message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(), )); + if (message.signatures) { obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array())); } else { obj.signatures = []; } + return obj; }, @@ -382,15 +429,19 @@ export const SignDoc = { if (message.bodyBytes.length !== 0) { writer.uint32(10).bytes(message.bodyBytes); } + if (message.authInfoBytes.length !== 0) { writer.uint32(18).bytes(message.authInfoBytes); } + if (message.chainId !== "") { writer.uint32(26).string(message.chainId); } + if (!message.accountNumber.isZero()) { writer.uint32(32).uint64(message.accountNumber); } + return writer; }, @@ -398,26 +449,33 @@ export const SignDoc = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignDoc(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.bodyBytes = reader.bytes(); break; + case 2: message.authInfoBytes = reader.bytes(); break; + case 3: message.chainId = reader.string(); break; + case 4: message.accountNumber = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -426,7 +484,7 @@ export const SignDoc = { bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(), authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(), chainId: isSet(object.chainId) ? String(object.chainId) : "", - accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO, + accountNumber: isSet(object.accountNumber) ? Long.fromString(object.accountNumber) : Long.UZERO, }; }, @@ -474,18 +532,23 @@ export const TxBody = { for (const v of message.messages) { Any.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.memo !== "") { writer.uint32(18).string(message.memo); } + if (!message.timeoutHeight.isZero()) { writer.uint32(24).uint64(message.timeoutHeight); } + for (const v of message.extensionOptions) { Any.encode(v!, writer.uint32(8186).fork()).ldelim(); } + for (const v of message.nonCriticalExtensionOptions) { Any.encode(v!, writer.uint32(16378).fork()).ldelim(); } + return writer; }, @@ -493,29 +556,37 @@ export const TxBody = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxBody(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.messages.push(Any.decode(reader, reader.uint32())); break; + case 2: message.memo = reader.string(); break; + case 3: message.timeoutHeight = reader.uint64() as Long; break; + case 1023: message.extensionOptions.push(Any.decode(reader, reader.uint32())); break; + case 2047: message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -523,7 +594,7 @@ export const TxBody = { return { messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], memo: isSet(object.memo) ? String(object.memo) : "", - timeoutHeight: isSet(object.timeoutHeight) ? Long.fromValue(object.timeoutHeight) : Long.UZERO, + timeoutHeight: isSet(object.timeoutHeight) ? Long.fromString(object.timeoutHeight) : Long.UZERO, extensionOptions: Array.isArray(object?.extensionOptions) ? object.extensionOptions.map((e: any) => Any.fromJSON(e)) : [], @@ -535,19 +606,23 @@ export const TxBody = { toJSON(message: TxBody): unknown { const obj: any = {}; + if (message.messages) { obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.messages = []; } + message.memo !== undefined && (obj.memo = message.memo); message.timeoutHeight !== undefined && (obj.timeoutHeight = (message.timeoutHeight || Long.UZERO).toString()); + if (message.extensionOptions) { obj.extensionOptions = message.extensionOptions.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.extensionOptions = []; } + if (message.nonCriticalExtensionOptions) { obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) => e ? Any.toJSON(e) : undefined, @@ -555,6 +630,7 @@ export const TxBody = { } else { obj.nonCriticalExtensionOptions = []; } + return obj; }, @@ -574,7 +650,10 @@ export const TxBody = { }; function createBaseAuthInfo(): AuthInfo { - return { signerInfos: [], fee: undefined }; + return { + signerInfos: [], + fee: undefined, + }; } export const AuthInfo = { @@ -582,9 +661,11 @@ export const AuthInfo = { for (const v of message.signerInfos) { SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.fee !== undefined) { Fee.encode(message.fee, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -592,20 +673,25 @@ export const AuthInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAuthInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signerInfos.push(SignerInfo.decode(reader, reader.uint32())); break; + case 2: message.fee = Fee.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -620,11 +706,13 @@ export const AuthInfo = { toJSON(message: AuthInfo): unknown { const obj: any = {}; + if (message.signerInfos) { obj.signerInfos = message.signerInfos.map((e) => (e ? SignerInfo.toJSON(e) : undefined)); } else { obj.signerInfos = []; } + message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined); return obj; }, @@ -638,7 +726,11 @@ export const AuthInfo = { }; function createBaseSignerInfo(): SignerInfo { - return { publicKey: undefined, modeInfo: undefined, sequence: Long.UZERO }; + return { + publicKey: undefined, + modeInfo: undefined, + sequence: Long.UZERO, + }; } export const SignerInfo = { @@ -646,12 +738,15 @@ export const SignerInfo = { if (message.publicKey !== undefined) { Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); } + if (message.modeInfo !== undefined) { ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim(); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -659,23 +754,29 @@ export const SignerInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignerInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.publicKey = Any.decode(reader, reader.uint32()); break; + case 2: message.modeInfo = ModeInfo.decode(reader, reader.uint32()); break; + case 3: message.sequence = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -683,7 +784,7 @@ export const SignerInfo = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, modeInfo: isSet(object.modeInfo) ? ModeInfo.fromJSON(object.modeInfo) : undefined, - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -716,7 +817,10 @@ export const SignerInfo = { }; function createBaseModeInfo(): ModeInfo { - return { single: undefined, multi: undefined }; + return { + single: undefined, + multi: undefined, + }; } export const ModeInfo = { @@ -724,9 +828,11 @@ export const ModeInfo = { if (message.single !== undefined) { ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim(); } + if (message.multi !== undefined) { ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -734,20 +840,25 @@ export const ModeInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModeInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.single = ModeInfo_Single.decode(reader, reader.uint32()); break; + case 2: message.multi = ModeInfo_Multi.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -782,7 +893,9 @@ export const ModeInfo = { }; function createBaseModeInfo_Single(): ModeInfo_Single { - return { mode: 0 }; + return { + mode: 0, + }; } export const ModeInfo_Single = { @@ -790,6 +903,7 @@ export const ModeInfo_Single = { if (message.mode !== 0) { writer.uint32(8).int32(message.mode); } + return writer; }, @@ -797,22 +911,28 @@ export const ModeInfo_Single = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModeInfo_Single(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.mode = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ModeInfo_Single { - return { mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0 }; + return { + mode: isSet(object.mode) ? signModeFromJSON(object.mode) : 0, + }; }, toJSON(message: ModeInfo_Single): unknown { @@ -829,7 +949,10 @@ export const ModeInfo_Single = { }; function createBaseModeInfo_Multi(): ModeInfo_Multi { - return { bitarray: undefined, modeInfos: [] }; + return { + bitarray: undefined, + modeInfos: [], + }; } export const ModeInfo_Multi = { @@ -837,9 +960,11 @@ export const ModeInfo_Multi = { if (message.bitarray !== undefined) { CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim(); } + for (const v of message.modeInfos) { ModeInfo.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -847,20 +972,25 @@ export const ModeInfo_Multi = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModeInfo_Multi(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.bitarray = CompactBitArray.decode(reader, reader.uint32()); break; + case 2: message.modeInfos.push(ModeInfo.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -877,11 +1007,13 @@ export const ModeInfo_Multi = { const obj: any = {}; message.bitarray !== undefined && (obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined); + if (message.modeInfos) { obj.modeInfos = message.modeInfos.map((e) => (e ? ModeInfo.toJSON(e) : undefined)); } else { obj.modeInfos = []; } + return obj; }, @@ -897,7 +1029,12 @@ export const ModeInfo_Multi = { }; function createBaseFee(): Fee { - return { amount: [], gasLimit: Long.UZERO, payer: "", granter: "" }; + return { + amount: [], + gasLimit: Long.UZERO, + payer: "", + granter: "", + }; } export const Fee = { @@ -905,15 +1042,19 @@ export const Fee = { for (const v of message.amount) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (!message.gasLimit.isZero()) { writer.uint32(16).uint64(message.gasLimit); } + if (message.payer !== "") { writer.uint32(26).string(message.payer); } + if (message.granter !== "") { writer.uint32(34).string(message.granter); } + return writer; }, @@ -921,33 +1062,40 @@ export const Fee = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFee(); + 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.gasLimit = reader.uint64() as Long; break; + case 3: message.payer = reader.string(); break; + case 4: message.granter = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Fee { return { amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - gasLimit: isSet(object.gasLimit) ? Long.fromValue(object.gasLimit) : Long.UZERO, + gasLimit: isSet(object.gasLimit) ? Long.fromString(object.gasLimit) : Long.UZERO, payer: isSet(object.payer) ? String(object.payer) : "", granter: isSet(object.granter) ? String(object.granter) : "", }; @@ -955,11 +1103,13 @@ export const Fee = { toJSON(message: Fee): unknown { const obj: any = {}; + if (message.amount) { obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.amount = []; } + message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || Long.UZERO).toString()); message.payer !== undefined && (obj.payer = message.payer); message.granter !== undefined && (obj.granter = message.granter); @@ -978,75 +1128,3 @@ export const Fee = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index dc391ba9..ea898602 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,49 +1,47 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ModuleVersion, Plan } from "./upgrade"; - +import { Plan, ModuleVersion } from "./upgrade"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; - /** * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC * method. */ -export interface QueryCurrentPlanRequest {} +export interface QueryCurrentPlanRequest {} /** * QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC * method. */ + export interface QueryCurrentPlanResponse { /** plan is the current upgrade plan. */ - plan?: Plan; + plan: Plan; } - /** * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC * method. */ + export interface QueryAppliedPlanRequest { /** name is the name of the applied plan to query for. */ name: string; } - /** * QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC * method. */ + export interface QueryAppliedPlanResponse { /** height is the block height at which the plan was applied. */ height: Long; } - /** * QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState * RPC method. - * - * @deprecated */ + +/** @deprecated */ + export interface QueryUpgradedConsensusStateRequest { /** * last height of the current chain must be sent in request @@ -51,39 +49,39 @@ export interface QueryUpgradedConsensusStateRequest { */ lastHeight: Long; } - /** * QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState * RPC method. - * - * @deprecated */ + +/** @deprecated */ + export interface QueryUpgradedConsensusStateResponse { /** Since: cosmos-sdk 0.43 */ upgradedConsensusState: Uint8Array; } - /** * QueryModuleVersionsRequest is the request type for the Query/ModuleVersions * RPC method. * * Since: cosmos-sdk 0.43 */ + export interface QueryModuleVersionsRequest { /** * module_name is a field to query a specific module * consensus version from state. Leaving this empty will * fetch the full list of module versions from state */ - moduleName: string; + moduleName?: string; } - /** * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions * RPC method. * * Since: cosmos-sdk 0.43 */ + export interface QueryModuleVersionsResponse { /** module_versions is a list of module names with their consensus versions. */ moduleVersions: ModuleVersion[]; @@ -102,14 +100,17 @@ export const QueryCurrentPlanRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCurrentPlanRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -129,7 +130,9 @@ export const QueryCurrentPlanRequest = { }; function createBaseQueryCurrentPlanResponse(): QueryCurrentPlanResponse { - return { plan: undefined }; + return { + plan: undefined, + }; } export const QueryCurrentPlanResponse = { @@ -137,6 +140,7 @@ export const QueryCurrentPlanResponse = { if (message.plan !== undefined) { Plan.encode(message.plan, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -144,22 +148,28 @@ export const QueryCurrentPlanResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCurrentPlanResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.plan = Plan.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryCurrentPlanResponse { - return { plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined }; + return { + plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined, + }; }, toJSON(message: QueryCurrentPlanResponse): unknown { @@ -179,7 +189,9 @@ export const QueryCurrentPlanResponse = { }; function createBaseQueryAppliedPlanRequest(): QueryAppliedPlanRequest { - return { name: "" }; + return { + name: "", + }; } export const QueryAppliedPlanRequest = { @@ -187,6 +199,7 @@ export const QueryAppliedPlanRequest = { if (message.name !== "") { writer.uint32(10).string(message.name); } + return writer; }, @@ -194,22 +207,28 @@ export const QueryAppliedPlanRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAppliedPlanRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAppliedPlanRequest { - return { name: isSet(object.name) ? String(object.name) : "" }; + return { + name: isSet(object.name) ? String(object.name) : "", + }; }, toJSON(message: QueryAppliedPlanRequest): unknown { @@ -226,7 +245,9 @@ export const QueryAppliedPlanRequest = { }; function createBaseQueryAppliedPlanResponse(): QueryAppliedPlanResponse { - return { height: Long.ZERO }; + return { + height: Long.ZERO, + }; } export const QueryAppliedPlanResponse = { @@ -234,6 +255,7 @@ export const QueryAppliedPlanResponse = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + return writer; }, @@ -241,22 +263,28 @@ export const QueryAppliedPlanResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAppliedPlanResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryAppliedPlanResponse { - return { height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO }; + return { + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + }; }, toJSON(message: QueryAppliedPlanResponse): unknown { @@ -276,7 +304,9 @@ export const QueryAppliedPlanResponse = { }; function createBaseQueryUpgradedConsensusStateRequest(): QueryUpgradedConsensusStateRequest { - return { lastHeight: Long.ZERO }; + return { + lastHeight: Long.ZERO, + }; } export const QueryUpgradedConsensusStateRequest = { @@ -284,6 +314,7 @@ export const QueryUpgradedConsensusStateRequest = { if (!message.lastHeight.isZero()) { writer.uint32(8).int64(message.lastHeight); } + return writer; }, @@ -291,22 +322,28 @@ export const QueryUpgradedConsensusStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedConsensusStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.lastHeight = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryUpgradedConsensusStateRequest { - return { lastHeight: isSet(object.lastHeight) ? Long.fromValue(object.lastHeight) : Long.ZERO }; + return { + lastHeight: isSet(object.lastHeight) ? Long.fromString(object.lastHeight) : Long.ZERO, + }; }, toJSON(message: QueryUpgradedConsensusStateRequest): unknown { @@ -328,7 +365,9 @@ export const QueryUpgradedConsensusStateRequest = { }; function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse { - return { upgradedConsensusState: new Uint8Array() }; + return { + upgradedConsensusState: new Uint8Array(), + }; } export const QueryUpgradedConsensusStateResponse = { @@ -336,6 +375,7 @@ export const QueryUpgradedConsensusStateResponse = { if (message.upgradedConsensusState.length !== 0) { writer.uint32(18).bytes(message.upgradedConsensusState); } + return writer; }, @@ -343,17 +383,21 @@ export const QueryUpgradedConsensusStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedConsensusStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: message.upgradedConsensusState = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -384,7 +428,9 @@ export const QueryUpgradedConsensusStateResponse = { }; function createBaseQueryModuleVersionsRequest(): QueryModuleVersionsRequest { - return { moduleName: "" }; + return { + moduleName: "", + }; } export const QueryModuleVersionsRequest = { @@ -392,6 +438,7 @@ export const QueryModuleVersionsRequest = { if (message.moduleName !== "") { writer.uint32(10).string(message.moduleName); } + return writer; }, @@ -399,22 +446,28 @@ export const QueryModuleVersionsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryModuleVersionsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.moduleName = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryModuleVersionsRequest { - return { moduleName: isSet(object.moduleName) ? String(object.moduleName) : "" }; + return { + moduleName: isSet(object.moduleName) ? String(object.moduleName) : "", + }; }, toJSON(message: QueryModuleVersionsRequest): unknown { @@ -433,7 +486,9 @@ export const QueryModuleVersionsRequest = { }; function createBaseQueryModuleVersionsResponse(): QueryModuleVersionsResponse { - return { moduleVersions: [] }; + return { + moduleVersions: [], + }; } export const QueryModuleVersionsResponse = { @@ -441,6 +496,7 @@ export const QueryModuleVersionsResponse = { for (const v of message.moduleVersions) { ModuleVersion.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -448,17 +504,21 @@ export const QueryModuleVersionsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryModuleVersionsResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.moduleVersions.push(ModuleVersion.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -472,11 +532,13 @@ export const QueryModuleVersionsResponse = { toJSON(message: QueryModuleVersionsResponse): unknown { const obj: any = {}; + if (message.moduleVersions) { obj.moduleVersions = message.moduleVersions.map((e) => (e ? ModuleVersion.toJSON(e) : undefined)); } else { obj.moduleVersions = []; } + return obj; }, @@ -488,36 +550,33 @@ export const QueryModuleVersionsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query defines the gRPC upgrade querier service. */ export interface Query { - /** CurrentPlan queries the current upgrade plan. */ - CurrentPlan(request: QueryCurrentPlanRequest): Promise; - /** AppliedPlan queries a previously applied upgrade plan by its name. */ + CurrentPlan(request?: QueryCurrentPlanRequest): Promise; + /*CurrentPlan queries the current upgrade plan.*/ + AppliedPlan(request: QueryAppliedPlanRequest): Promise; - /** - * UpgradedConsensusState queries the consensus state that will serve - * as a trusted kernel for the next version of this chain. It will only be - * stored at the last height of this chain. - * UpgradedConsensusState RPC not supported with legacy querier - * This rpc is deprecated now that IBC has its own replacement - * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - * - * @deprecated - */ + /*AppliedPlan queries a previously applied upgrade plan by its name.*/ + UpgradedConsensusState( request: QueryUpgradedConsensusStateRequest, ): Promise; - /** - * ModuleVersions queries the list of module versions from state. - * - * Since: cosmos-sdk 0.43 - */ + /*UpgradedConsensusState queries the consensus state that will serve + as a trusted kernel for the next version of this chain. It will only be + stored at the last height of this chain. + UpgradedConsensusState RPC not supported with legacy querier + This rpc is deprecated now that IBC has its own replacement + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)*/ + ModuleVersions(request: QueryModuleVersionsRequest): Promise; + /*ModuleVersions queries the list of module versions from state. + + Since: cosmos-sdk 0.43*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.CurrentPlan = this.CurrentPlan.bind(this); @@ -525,7 +584,8 @@ export class QueryClientImpl implements Query { this.UpgradedConsensusState = this.UpgradedConsensusState.bind(this); this.ModuleVersions = this.ModuleVersions.bind(this); } - CurrentPlan(request: QueryCurrentPlanRequest): Promise { + + CurrentPlan(request: QueryCurrentPlanRequest = {}): Promise { const data = QueryCurrentPlanRequest.encode(request).finish(); const promise = this.rpc.request("cosmos.upgrade.v1beta1.Query", "CurrentPlan", data); return promise.then((data) => QueryCurrentPlanResponse.decode(new _m0.Reader(data))); @@ -551,79 +611,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryModuleVersionsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index 141a8371..a8e9dd98 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,12 +1,10 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; - +import { Any } from "../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; - /** Plan specifies information about a planned upgrade and when it should occur. */ + export interface Plan { /** * Sets the name for the upgrade. This name will be used by the upgraded @@ -22,63 +20,74 @@ export interface Plan { * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic * has been removed from the SDK. * If this field is not empty, an error will be thrown. - * - * @deprecated */ - time?: Timestamp; + + /** @deprecated */ + + time: Timestamp; /** * The height at which the upgrade must be performed. * Only used if Time is not set. */ + height: Long; /** * Any application specific upgrade info to be included on-chain * such as a git commit that validators could automatically upgrade to */ + info: string; /** * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been * moved to the IBC module in the sub module 02-client. * If this field is not empty, an error will be thrown. - * - * @deprecated */ - upgradedClientState?: Any; -} + /** @deprecated */ + + upgradedClientState: Any; +} /** * SoftwareUpgradeProposal is a gov Content type for initiating a software * upgrade. */ + export interface SoftwareUpgradeProposal { title: string; description: string; - plan?: Plan; + plan: Plan; } - /** * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software * upgrade. */ + export interface CancelSoftwareUpgradeProposal { title: string; description: string; } - /** * ModuleVersion specifies a module and its consensus version. * * Since: cosmos-sdk 0.43 */ + export interface ModuleVersion { /** name of the app module */ name: string; /** consensus version of the app module */ + version: Long; } function createBasePlan(): Plan { - return { name: "", time: undefined, height: Long.ZERO, info: "", upgradedClientState: undefined }; + return { + name: "", + time: undefined, + height: Long.ZERO, + info: "", + upgradedClientState: undefined, + }; } export const Plan = { @@ -86,18 +95,23 @@ export const Plan = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.time !== undefined) { Timestamp.encode(message.time, writer.uint32(18).fork()).ldelim(); } + if (!message.height.isZero()) { writer.uint32(24).int64(message.height); } + if (message.info !== "") { writer.uint32(34).string(message.info); } + if (message.upgradedClientState !== undefined) { Any.encode(message.upgradedClientState, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -105,29 +119,37 @@ export const Plan = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlan(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: message.time = Timestamp.decode(reader, reader.uint32()); break; + case 3: message.height = reader.int64() as Long; break; + case 4: message.info = reader.string(); break; + case 5: message.upgradedClientState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -135,7 +157,7 @@ export const Plan = { return { name: isSet(object.name) ? String(object.name) : "", time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, info: isSet(object.info) ? String(object.info) : "", upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) @@ -173,7 +195,11 @@ export const Plan = { }; function createBaseSoftwareUpgradeProposal(): SoftwareUpgradeProposal { - return { title: "", description: "", plan: undefined }; + return { + title: "", + description: "", + plan: undefined, + }; } export const SoftwareUpgradeProposal = { @@ -181,12 +207,15 @@ export const SoftwareUpgradeProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.plan !== undefined) { Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -194,23 +223,29 @@ export const SoftwareUpgradeProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSoftwareUpgradeProposal(); + 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.plan = Plan.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -241,7 +276,10 @@ export const SoftwareUpgradeProposal = { }; function createBaseCancelSoftwareUpgradeProposal(): CancelSoftwareUpgradeProposal { - return { title: "", description: "" }; + return { + title: "", + description: "", + }; } export const CancelSoftwareUpgradeProposal = { @@ -249,9 +287,11 @@ export const CancelSoftwareUpgradeProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + return writer; }, @@ -259,20 +299,25 @@ export const CancelSoftwareUpgradeProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCancelSoftwareUpgradeProposal(); + 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; }, @@ -301,7 +346,10 @@ export const CancelSoftwareUpgradeProposal = { }; function createBaseModuleVersion(): ModuleVersion { - return { name: "", version: Long.UZERO }; + return { + name: "", + version: Long.UZERO, + }; } export const ModuleVersion = { @@ -309,9 +357,11 @@ export const ModuleVersion = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (!message.version.isZero()) { writer.uint32(16).uint64(message.version); } + return writer; }, @@ -319,27 +369,32 @@ export const ModuleVersion = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleVersion(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: message.version = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ModuleVersion { return { name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? Long.fromValue(object.version) : Long.UZERO, + version: isSet(object.version) ? Long.fromString(object.version) : Long.UZERO, }; }, @@ -358,57 +413,3 @@ export const ModuleVersion = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index dcc84462..d26a32e5 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,14 +1,12 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; - /** * MsgCreateVestingAccount defines a message that enables creating a vesting * account. */ + export interface MsgCreateVestingAccount { fromAddress: string; toAddress: string; @@ -16,12 +14,18 @@ export interface MsgCreateVestingAccount { endTime: Long; delayed: boolean; } - /** MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. */ + export interface MsgCreateVestingAccountResponse {} function createBaseMsgCreateVestingAccount(): MsgCreateVestingAccount { - return { fromAddress: "", toAddress: "", amount: [], endTime: Long.ZERO, delayed: false }; + return { + fromAddress: "", + toAddress: "", + amount: [], + endTime: Long.ZERO, + delayed: false, + }; } export const MsgCreateVestingAccount = { @@ -29,18 +33,23 @@ export const MsgCreateVestingAccount = { 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.isZero()) { writer.uint32(32).int64(message.endTime); } + if (message.delayed === true) { writer.uint32(40).bool(message.delayed); } + return writer; }, @@ -48,29 +57,37 @@ export const MsgCreateVestingAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateVestingAccount(); + 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 = reader.int64() as Long; break; + case 5: message.delayed = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -79,7 +96,7 @@ export const MsgCreateVestingAccount = { fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? Long.fromValue(object.endTime) : Long.ZERO, + endTime: isSet(object.endTime) ? Long.fromString(object.endTime) : Long.ZERO, delayed: isSet(object.delayed) ? Boolean(object.delayed) : false, }; }, @@ -88,11 +105,13 @@ export const MsgCreateVestingAccount = { 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 || Long.ZERO).toString()); message.delayed !== undefined && (obj.delayed = message.delayed); return obj; @@ -123,14 +142,17 @@ export const MsgCreateVestingAccountResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateVestingAccountResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -150,57 +172,24 @@ export const MsgCreateVestingAccountResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the bank Msg service. */ export interface Msg { - /** - * CreateVestingAccount defines a method that enables creating a vesting - * account. - */ CreateVestingAccount(request: MsgCreateVestingAccount): Promise; + /*CreateVestingAccount defines a method that enables creating a vesting + account.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.CreateVestingAccount = this.CreateVestingAccount.bind(this); } + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index 654b607c..f906b8d8 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,57 +1,54 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; 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; + baseAccount: BaseAccount; originalVesting: Coin[]; delegatedFree: Coin[]; delegatedVesting: Coin[]; endTime: Long; } - /** * ContinuousVestingAccount implements the VestingAccount interface. It * continuously vests by unlocking coins linearly with respect to time. */ + export interface ContinuousVestingAccount { - baseVestingAccount?: BaseVestingAccount; + baseVestingAccount: BaseVestingAccount; startTime: Long; } - /** * 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; + baseVestingAccount: BaseVestingAccount; } - /** Period defines a length of time and amount of coins that will vest. */ + export interface Period { length: Long; amount: Coin[]; } - /** * PeriodicVestingAccount implements the VestingAccount interface. It * periodically vests by unlocking coins during each specified period. */ + export interface PeriodicVestingAccount { - baseVestingAccount?: BaseVestingAccount; + baseVestingAccount: BaseVestingAccount; startTime: Long; vestingPeriods: Period[]; } - /** * PermanentLockedAccount implements the VestingAccount interface. It does * not ever release coins, locking them indefinitely. Coins in this account can @@ -59,8 +56,9 @@ export interface PeriodicVestingAccount { * * Since: cosmos-sdk 0.43 */ + export interface PermanentLockedAccount { - baseVestingAccount?: BaseVestingAccount; + baseVestingAccount: BaseVestingAccount; } function createBaseBaseVestingAccount(): BaseVestingAccount { @@ -78,18 +76,23 @@ export const BaseVestingAccount = { 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.isZero()) { writer.uint32(40).int64(message.endTime); } + return writer; }, @@ -97,29 +100,37 @@ export const BaseVestingAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBaseVestingAccount(); + 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -135,7 +146,7 @@ export const BaseVestingAccount = { delegatedVesting: Array.isArray(object?.delegatedVesting) ? object.delegatedVesting.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? Long.fromValue(object.endTime) : Long.ZERO, + endTime: isSet(object.endTime) ? Long.fromString(object.endTime) : Long.ZERO, }; }, @@ -143,21 +154,25 @@ export const BaseVestingAccount = { 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 || Long.ZERO).toString()); return obj; }, @@ -178,7 +193,10 @@ export const BaseVestingAccount = { }; function createBaseContinuousVestingAccount(): ContinuousVestingAccount { - return { baseVestingAccount: undefined, startTime: Long.ZERO }; + return { + baseVestingAccount: undefined, + startTime: Long.ZERO, + }; } export const ContinuousVestingAccount = { @@ -186,9 +204,11 @@ export const ContinuousVestingAccount = { if (message.baseVestingAccount !== undefined) { BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); } + if (!message.startTime.isZero()) { writer.uint32(16).int64(message.startTime); } + return writer; }, @@ -196,20 +216,25 @@ export const ContinuousVestingAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseContinuousVestingAccount(); + 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -218,7 +243,7 @@ export const ContinuousVestingAccount = { baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? Long.fromValue(object.startTime) : Long.ZERO, + startTime: isSet(object.startTime) ? Long.fromString(object.startTime) : Long.ZERO, }; }, @@ -249,7 +274,9 @@ export const ContinuousVestingAccount = { }; function createBaseDelayedVestingAccount(): DelayedVestingAccount { - return { baseVestingAccount: undefined }; + return { + baseVestingAccount: undefined, + }; } export const DelayedVestingAccount = { @@ -257,6 +284,7 @@ export const DelayedVestingAccount = { if (message.baseVestingAccount !== undefined) { BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -264,17 +292,21 @@ export const DelayedVestingAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDelayedVestingAccount(); + 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; }, @@ -306,7 +338,10 @@ export const DelayedVestingAccount = { }; function createBasePeriod(): Period { - return { length: Long.ZERO, amount: [] }; + return { + length: Long.ZERO, + amount: [], + }; } export const Period = { @@ -314,9 +349,11 @@ export const Period = { if (!message.length.isZero()) { writer.uint32(8).int64(message.length); } + for (const v of message.amount) { Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -324,26 +361,31 @@ export const Period = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePeriod(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.length = 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 { return { - length: isSet(object.length) ? Long.fromValue(object.length) : Long.ZERO, + length: isSet(object.length) ? Long.fromString(object.length) : Long.ZERO, amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -351,11 +393,13 @@ export const Period = { toJSON(message: Period): unknown { const obj: any = {}; message.length !== undefined && (obj.length = (message.length || Long.ZERO).toString()); + if (message.amount) { obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.amount = []; } + return obj; }, @@ -369,7 +413,11 @@ export const Period = { }; function createBasePeriodicVestingAccount(): PeriodicVestingAccount { - return { baseVestingAccount: undefined, startTime: Long.ZERO, vestingPeriods: [] }; + return { + baseVestingAccount: undefined, + startTime: Long.ZERO, + vestingPeriods: [], + }; } export const PeriodicVestingAccount = { @@ -377,12 +425,15 @@ export const PeriodicVestingAccount = { if (message.baseVestingAccount !== undefined) { BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); } + if (!message.startTime.isZero()) { writer.uint32(16).int64(message.startTime); } + for (const v of message.vestingPeriods) { Period.encode(v!, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -390,23 +441,29 @@ export const PeriodicVestingAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePeriodicVestingAccount(); + 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 = reader.int64() as Long; break; + case 3: message.vestingPeriods.push(Period.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -415,7 +472,7 @@ export const PeriodicVestingAccount = { baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? Long.fromValue(object.startTime) : Long.ZERO, + startTime: isSet(object.startTime) ? Long.fromString(object.startTime) : Long.ZERO, vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e: any) => Period.fromJSON(e)) : [], @@ -429,11 +486,13 @@ export const PeriodicVestingAccount = { ? BaseVestingAccount.toJSON(message.baseVestingAccount) : undefined); message.startTime !== undefined && (obj.startTime = (message.startTime || Long.ZERO).toString()); + if (message.vestingPeriods) { obj.vestingPeriods = message.vestingPeriods.map((e) => (e ? Period.toJSON(e) : undefined)); } else { obj.vestingPeriods = []; } + return obj; }, @@ -453,7 +512,9 @@ export const PeriodicVestingAccount = { }; function createBasePermanentLockedAccount(): PermanentLockedAccount { - return { baseVestingAccount: undefined }; + return { + baseVestingAccount: undefined, + }; } export const PermanentLockedAccount = { @@ -461,6 +522,7 @@ export const PermanentLockedAccount = { if (message.baseVestingAccount !== undefined) { BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -468,17 +530,21 @@ export const PermanentLockedAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePermanentLockedAccount(); + 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; }, @@ -508,31 +574,3 @@ export const PermanentLockedAccount = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmos_proto/cosmos.ts b/src/cosmos_proto/cosmos.ts index 1ef6995b..cb0ff5c3 100644 --- a/src/cosmos_proto/cosmos.ts +++ b/src/cosmos_proto/cosmos.ts @@ -1,3 +1 @@ -/* eslint-disable */ - -export const protobufPackage = "cosmos_proto"; +export {}; diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index 7dd99ae9..45d9ac88 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,54 +1,59 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { MsgExecuteContract, MsgInstantiateContract, MsgStoreCode } from "./tx"; -import { CodeInfo, ContractInfo, Model, Params } from "./types"; - +import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; +import { Params, CodeInfo, ContractInfo, Model } from "./types"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** GenesisState - genesis state of x/wasm */ + export interface GenesisState { - params?: Params; + params: Params; codes: Code[]; contracts: Contract[]; sequences: Sequence[]; genMsgs: GenesisState_GenMsgs[]; } - /** * GenMsgs define the messages that can be executed during genesis phase in * order. The intention is to have more human readable data that is auditable. */ + export interface GenesisState_GenMsgs { - storeCode?: MsgStoreCode | undefined; - instantiateContract?: MsgInstantiateContract | undefined; - executeContract?: MsgExecuteContract | undefined; + storeCode?: MsgStoreCode; + instantiateContract?: MsgInstantiateContract; + executeContract?: MsgExecuteContract; } - /** Code struct encompasses CodeInfo and CodeBytes */ + export interface Code { codeId: Long; - codeInfo?: CodeInfo; + codeInfo: CodeInfo; codeBytes: Uint8Array; /** Pinned to wasmvm cache */ + pinned: boolean; } - /** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */ + export interface Contract { contractAddress: string; - contractInfo?: ContractInfo; + contractInfo: ContractInfo; contractState: Model[]; } - /** Sequence key and value of an id generation counter */ + export interface Sequence { idKey: Uint8Array; value: Long; } function createBaseGenesisState(): GenesisState { - return { params: undefined, codes: [], contracts: [], sequences: [], genMsgs: [] }; + return { + params: undefined, + codes: [], + contracts: [], + sequences: [], + genMsgs: [], + }; } export const GenesisState = { @@ -56,18 +61,23 @@ export const GenesisState = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + for (const v of message.codes) { Code.encode(v!, writer.uint32(18).fork()).ldelim(); } + for (const v of message.contracts) { Contract.encode(v!, writer.uint32(26).fork()).ldelim(); } + for (const v of message.sequences) { Sequence.encode(v!, writer.uint32(34).fork()).ldelim(); } + for (const v of message.genMsgs) { GenesisState_GenMsgs.encode(v!, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -75,29 +85,37 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.params = Params.decode(reader, reader.uint32()); break; + case 2: message.codes.push(Code.decode(reader, reader.uint32())); break; + case 3: message.contracts.push(Contract.decode(reader, reader.uint32())); break; + case 4: message.sequences.push(Sequence.decode(reader, reader.uint32())); break; + case 5: message.genMsgs.push(GenesisState_GenMsgs.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -120,26 +138,31 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); + if (message.codes) { obj.codes = message.codes.map((e) => (e ? Code.toJSON(e) : undefined)); } else { obj.codes = []; } + if (message.contracts) { obj.contracts = message.contracts.map((e) => (e ? Contract.toJSON(e) : undefined)); } else { obj.contracts = []; } + if (message.sequences) { obj.sequences = message.sequences.map((e) => (e ? Sequence.toJSON(e) : undefined)); } else { obj.sequences = []; } + if (message.genMsgs) { obj.genMsgs = message.genMsgs.map((e) => (e ? GenesisState_GenMsgs.toJSON(e) : undefined)); } else { obj.genMsgs = []; } + return obj; }, @@ -156,7 +179,11 @@ export const GenesisState = { }; function createBaseGenesisState_GenMsgs(): GenesisState_GenMsgs { - return { storeCode: undefined, instantiateContract: undefined, executeContract: undefined }; + return { + storeCode: undefined, + instantiateContract: undefined, + executeContract: undefined, + }; } export const GenesisState_GenMsgs = { @@ -164,12 +191,15 @@ export const GenesisState_GenMsgs = { if (message.storeCode !== undefined) { MsgStoreCode.encode(message.storeCode, writer.uint32(10).fork()).ldelim(); } + if (message.instantiateContract !== undefined) { MsgInstantiateContract.encode(message.instantiateContract, writer.uint32(18).fork()).ldelim(); } + if (message.executeContract !== undefined) { MsgExecuteContract.encode(message.executeContract, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -177,23 +207,29 @@ export const GenesisState_GenMsgs = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState_GenMsgs(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.storeCode = MsgStoreCode.decode(reader, reader.uint32()); break; + case 2: message.instantiateContract = MsgInstantiateContract.decode(reader, reader.uint32()); break; + case 3: message.executeContract = MsgExecuteContract.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -243,7 +279,12 @@ export const GenesisState_GenMsgs = { }; function createBaseCode(): Code { - return { codeId: Long.UZERO, codeInfo: undefined, codeBytes: new Uint8Array(), pinned: false }; + return { + codeId: Long.UZERO, + codeInfo: undefined, + codeBytes: new Uint8Array(), + pinned: false, + }; } export const Code = { @@ -251,15 +292,19 @@ export const Code = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + if (message.codeInfo !== undefined) { CodeInfo.encode(message.codeInfo, writer.uint32(18).fork()).ldelim(); } + if (message.codeBytes.length !== 0) { writer.uint32(26).bytes(message.codeBytes); } + if (message.pinned === true) { writer.uint32(32).bool(message.pinned); } + return writer; }, @@ -267,32 +312,39 @@ export const Code = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCode(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + case 2: message.codeInfo = CodeInfo.decode(reader, reader.uint32()); break; + case 3: message.codeBytes = reader.bytes(); break; + case 4: message.pinned = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Code { return { - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, codeInfo: isSet(object.codeInfo) ? CodeInfo.fromJSON(object.codeInfo) : undefined, codeBytes: isSet(object.codeBytes) ? bytesFromBase64(object.codeBytes) : new Uint8Array(), pinned: isSet(object.pinned) ? Boolean(object.pinned) : false, @@ -327,7 +379,11 @@ export const Code = { }; function createBaseContract(): Contract { - return { contractAddress: "", contractInfo: undefined, contractState: [] }; + return { + contractAddress: "", + contractInfo: undefined, + contractState: [], + }; } export const Contract = { @@ -335,12 +391,15 @@ export const Contract = { if (message.contractAddress !== "") { writer.uint32(10).string(message.contractAddress); } + if (message.contractInfo !== undefined) { ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); } + for (const v of message.contractState) { Model.encode(v!, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -348,23 +407,29 @@ export const Contract = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseContract(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.contractAddress = reader.string(); break; + case 2: message.contractInfo = ContractInfo.decode(reader, reader.uint32()); break; + case 3: message.contractState.push(Model.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -383,11 +448,13 @@ export const Contract = { message.contractAddress !== undefined && (obj.contractAddress = message.contractAddress); message.contractInfo !== undefined && (obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined); + if (message.contractState) { obj.contractState = message.contractState.map((e) => (e ? Model.toJSON(e) : undefined)); } else { obj.contractState = []; } + return obj; }, @@ -404,7 +471,10 @@ export const Contract = { }; function createBaseSequence(): Sequence { - return { idKey: new Uint8Array(), value: Long.UZERO }; + return { + idKey: new Uint8Array(), + value: Long.UZERO, + }; } export const Sequence = { @@ -412,9 +482,11 @@ export const Sequence = { if (message.idKey.length !== 0) { writer.uint32(10).bytes(message.idKey); } + if (!message.value.isZero()) { writer.uint32(16).uint64(message.value); } + return writer; }, @@ -422,27 +494,32 @@ export const Sequence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSequence(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.idKey = reader.bytes(); break; + case 2: message.value = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Sequence { return { idKey: isSet(object.idKey) ? bytesFromBase64(object.idKey) : new Uint8Array(), - value: isSet(object.value) ? Long.fromValue(object.value) : Long.UZERO, + value: isSet(object.value) ? Long.fromString(object.value) : Long.UZERO, }; }, @@ -462,75 +539,3 @@ export const Sequence = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index 22062ab2..3b31ada7 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,10 +1,8 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** MsgIBCSend */ + export interface MsgIBCSend { /** the channel by which the packet will be sent */ channel: string; @@ -12,26 +10,34 @@ export interface MsgIBCSend { * Timeout height relative to the current block height. * The timeout is disabled when set to 0. */ + timeoutHeight: Long; /** * Timeout timestamp (in nanoseconds) relative to the current block timestamp. * The timeout is disabled when set to 0. */ + timeoutTimestamp: Long; /** * Data is the payload to transfer. We must not make assumption what format or * content is in here. */ + data: Uint8Array; } - /** MsgIBCCloseChannel port and channel need to be owned by the contract */ + export interface MsgIBCCloseChannel { channel: string; } function createBaseMsgIBCSend(): MsgIBCSend { - return { channel: "", timeoutHeight: Long.UZERO, timeoutTimestamp: Long.UZERO, data: new Uint8Array() }; + return { + channel: "", + timeoutHeight: Long.UZERO, + timeoutTimestamp: Long.UZERO, + data: new Uint8Array(), + }; } export const MsgIBCSend = { @@ -39,15 +45,19 @@ export const MsgIBCSend = { if (message.channel !== "") { writer.uint32(18).string(message.channel); } + if (!message.timeoutHeight.isZero()) { writer.uint32(32).uint64(message.timeoutHeight); } + if (!message.timeoutTimestamp.isZero()) { writer.uint32(40).uint64(message.timeoutTimestamp); } + if (message.data.length !== 0) { writer.uint32(50).bytes(message.data); } + return writer; }, @@ -55,34 +65,43 @@ export const MsgIBCSend = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgIBCSend(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: message.channel = reader.string(); break; + case 4: message.timeoutHeight = reader.uint64() as Long; break; + case 5: message.timeoutTimestamp = reader.uint64() as Long; break; + case 6: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgIBCSend { return { channel: isSet(object.channel) ? String(object.channel) : "", - timeoutHeight: isSet(object.timeoutHeight) ? Long.fromValue(object.timeoutHeight) : Long.UZERO, - timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, + timeoutHeight: isSet(object.timeoutHeight) ? Long.fromString(object.timeoutHeight) : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) + ? Long.fromString(object.timeoutTimestamp) + : Long.UZERO, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), }; }, @@ -116,7 +135,9 @@ export const MsgIBCSend = { }; function createBaseMsgIBCCloseChannel(): MsgIBCCloseChannel { - return { channel: "" }; + return { + channel: "", + }; } export const MsgIBCCloseChannel = { @@ -124,6 +145,7 @@ export const MsgIBCCloseChannel = { if (message.channel !== "") { writer.uint32(18).string(message.channel); } + return writer; }, @@ -131,22 +153,28 @@ export const MsgIBCCloseChannel = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgIBCCloseChannel(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: message.channel = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgIBCCloseChannel { - return { channel: isSet(object.channel) ? String(object.channel) : "" }; + return { + channel: isSet(object.channel) ? String(object.channel) : "", + }; }, toJSON(message: MsgIBCCloseChannel): unknown { @@ -161,75 +189,3 @@ export const MsgIBCCloseChannel = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index eeb97436..73634370 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,141 +1,171 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { AccessConfig } from "./types"; - +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** StoreCodeProposal gov proposal content type to submit WASM code to the system */ + export interface StoreCodeProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; /** InstantiatePermission to apply on contract creation, optional */ - instantiatePermission?: AccessConfig; -} + instantiatePermission: AccessConfig; +} /** * InstantiateContractProposal gov proposal content type to instantiate a * contract. */ + export interface InstantiateContractProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; /** Admin is an optional address that can execute migrations */ + admin: string; /** CodeID is the reference to the stored WASM code */ + codeId: Long; /** Label is optional metadata to be stored with a constract instance. */ + label: string; /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; } - /** MigrateContractProposal gov proposal content type to migrate a contract. */ + export interface MigrateContractProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** Contract is the address of the smart contract */ + contract: string; /** CodeID references the new WASM codesudo */ + codeId: Long; /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; } - /** SudoContractProposal gov proposal content type to call sudo on a contract. */ + export interface SudoContractProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** Contract is the address of the smart contract */ + contract: string; /** Msg json encoded message to be passed to the contract as sudo */ + msg: Uint8Array; } - /** * ExecuteContractProposal gov proposal content type to call execute on a * contract. */ + export interface ExecuteContractProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** RunAs is the address that is passed to the contract's environment as sender */ + runAs: string; /** Contract is the address of the smart contract */ + contract: string; /** Msg json encoded message to be passed to the contract as execute */ + msg: Uint8Array; /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; } - /** UpdateAdminProposal gov proposal content type to set an admin for a contract. */ + export interface UpdateAdminProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** NewAdmin address to be set */ + newAdmin: string; /** Contract is the address of the smart contract */ + contract: string; } - /** * ClearAdminProposal gov proposal content type to clear the admin of a * contract. */ + export interface ClearAdminProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** Contract is the address of the smart contract */ + contract: string; } - /** * PinCodesProposal gov proposal content type to pin a set of code ids in the * wasmvm cache. */ + export interface PinCodesProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** CodeIDs references the new WASM codes */ + codeIds: Long[]; } - /** * UnpinCodesProposal gov proposal content type to unpin a set of code ids in * the wasmvm cache. */ + export interface UnpinCodesProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** CodeIDs references the WASM codes */ + codeIds: Long[]; } @@ -154,18 +184,23 @@ export const StoreCodeProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.runAs !== "") { writer.uint32(26).string(message.runAs); } + if (message.wasmByteCode.length !== 0) { writer.uint32(34).bytes(message.wasmByteCode); } + if (message.instantiatePermission !== undefined) { AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim(); } + return writer; }, @@ -173,29 +208,37 @@ export const StoreCodeProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStoreCodeProposal(); + 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.runAs = reader.string(); break; + case 4: message.wasmByteCode = reader.bytes(); break; + case 7: message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -259,27 +302,35 @@ export const InstantiateContractProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.runAs !== "") { writer.uint32(26).string(message.runAs); } + if (message.admin !== "") { writer.uint32(34).string(message.admin); } + if (!message.codeId.isZero()) { writer.uint32(40).uint64(message.codeId); } + if (message.label !== "") { writer.uint32(50).string(message.label); } + if (message.msg.length !== 0) { writer.uint32(58).bytes(message.msg); } + for (const v of message.funds) { Coin.encode(v!, writer.uint32(66).fork()).ldelim(); } + return writer; }, @@ -287,38 +338,49 @@ export const InstantiateContractProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInstantiateContractProposal(); + 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.runAs = reader.string(); break; + case 4: message.admin = reader.string(); break; + case 5: message.codeId = reader.uint64() as Long; break; + case 6: message.label = reader.string(); break; + case 7: message.msg = reader.bytes(); break; + case 8: message.funds.push(Coin.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -328,7 +390,7 @@ export const InstantiateContractProposal = { description: isSet(object.description) ? String(object.description) : "", runAs: isSet(object.runAs) ? String(object.runAs) : "", admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, label: isSet(object.label) ? String(object.label) : "", msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [], @@ -345,11 +407,13 @@ export const InstantiateContractProposal = { message.label !== undefined && (obj.label = message.label); message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); + if (message.funds) { obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.funds = []; } + return obj; }, @@ -371,7 +435,13 @@ export const InstantiateContractProposal = { }; function createBaseMigrateContractProposal(): MigrateContractProposal { - return { title: "", description: "", contract: "", codeId: Long.UZERO, msg: new Uint8Array() }; + return { + title: "", + description: "", + contract: "", + codeId: Long.UZERO, + msg: new Uint8Array(), + }; } export const MigrateContractProposal = { @@ -379,18 +449,23 @@ export const MigrateContractProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.contract !== "") { writer.uint32(34).string(message.contract); } + if (!message.codeId.isZero()) { writer.uint32(40).uint64(message.codeId); } + if (message.msg.length !== 0) { writer.uint32(50).bytes(message.msg); } + return writer; }, @@ -398,29 +473,37 @@ export const MigrateContractProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMigrateContractProposal(); + 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 4: message.contract = reader.string(); break; + case 5: message.codeId = reader.uint64() as Long; break; + case 6: message.msg = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -429,7 +512,7 @@ export const MigrateContractProposal = { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; }, @@ -458,7 +541,12 @@ export const MigrateContractProposal = { }; function createBaseSudoContractProposal(): SudoContractProposal { - return { title: "", description: "", contract: "", msg: new Uint8Array() }; + return { + title: "", + description: "", + contract: "", + msg: new Uint8Array(), + }; } export const SudoContractProposal = { @@ -466,15 +554,19 @@ export const SudoContractProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.contract !== "") { writer.uint32(26).string(message.contract); } + if (message.msg.length !== 0) { writer.uint32(34).bytes(message.msg); } + return writer; }, @@ -482,26 +574,33 @@ export const SudoContractProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSudoContractProposal(); + 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.contract = reader.string(); break; + case 4: message.msg = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -535,7 +634,14 @@ export const SudoContractProposal = { }; function createBaseExecuteContractProposal(): ExecuteContractProposal { - return { title: "", description: "", runAs: "", contract: "", msg: new Uint8Array(), funds: [] }; + return { + title: "", + description: "", + runAs: "", + contract: "", + msg: new Uint8Array(), + funds: [], + }; } export const ExecuteContractProposal = { @@ -543,21 +649,27 @@ export const ExecuteContractProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.runAs !== "") { writer.uint32(26).string(message.runAs); } + if (message.contract !== "") { writer.uint32(34).string(message.contract); } + if (message.msg.length !== 0) { writer.uint32(42).bytes(message.msg); } + for (const v of message.funds) { Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } + return writer; }, @@ -565,32 +677,41 @@ export const ExecuteContractProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseExecuteContractProposal(); + 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.runAs = reader.string(); break; + case 4: message.contract = reader.string(); break; + case 5: message.msg = reader.bytes(); break; + case 6: message.funds.push(Coin.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -613,11 +734,13 @@ export const ExecuteContractProposal = { message.contract !== undefined && (obj.contract = message.contract); message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); + if (message.funds) { obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.funds = []; } + return obj; }, @@ -634,7 +757,12 @@ export const ExecuteContractProposal = { }; function createBaseUpdateAdminProposal(): UpdateAdminProposal { - return { title: "", description: "", newAdmin: "", contract: "" }; + return { + title: "", + description: "", + newAdmin: "", + contract: "", + }; } export const UpdateAdminProposal = { @@ -642,15 +770,19 @@ export const UpdateAdminProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.newAdmin !== "") { writer.uint32(26).string(message.newAdmin); } + if (message.contract !== "") { writer.uint32(34).string(message.contract); } + return writer; }, @@ -658,26 +790,33 @@ export const UpdateAdminProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateAdminProposal(); + 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.newAdmin = reader.string(); break; + case 4: message.contract = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -710,7 +849,11 @@ export const UpdateAdminProposal = { }; function createBaseClearAdminProposal(): ClearAdminProposal { - return { title: "", description: "", contract: "" }; + return { + title: "", + description: "", + contract: "", + }; } export const ClearAdminProposal = { @@ -718,12 +861,15 @@ export const ClearAdminProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.contract !== "") { writer.uint32(26).string(message.contract); } + return writer; }, @@ -731,23 +877,29 @@ export const ClearAdminProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClearAdminProposal(); + 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.contract = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -777,7 +929,11 @@ export const ClearAdminProposal = { }; function createBasePinCodesProposal(): PinCodesProposal { - return { title: "", description: "", codeIds: [] }; + return { + title: "", + description: "", + codeIds: [], + }; } export const PinCodesProposal = { @@ -785,13 +941,17 @@ export const PinCodesProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + writer.uint32(26).fork(); + for (const v of message.codeIds) { writer.uint64(v); } + writer.ldelim(); return writer; }, @@ -800,30 +960,38 @@ export const PinCodesProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePinCodesProposal(); + 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: if ((tag & 7) === 2) { const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.codeIds.push(reader.uint64() as Long); } } else { message.codeIds.push(reader.uint64() as Long); } + break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -831,7 +999,7 @@ export const PinCodesProposal = { return { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], }; }, @@ -839,11 +1007,13 @@ export const PinCodesProposal = { const obj: any = {}; message.title !== undefined && (obj.title = message.title); message.description !== undefined && (obj.description = message.description); + if (message.codeIds) { obj.codeIds = message.codeIds.map((e) => (e || Long.UZERO).toString()); } else { obj.codeIds = []; } + return obj; }, @@ -857,7 +1027,11 @@ export const PinCodesProposal = { }; function createBaseUnpinCodesProposal(): UnpinCodesProposal { - return { title: "", description: "", codeIds: [] }; + return { + title: "", + description: "", + codeIds: [], + }; } export const UnpinCodesProposal = { @@ -865,13 +1039,17 @@ export const UnpinCodesProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + writer.uint32(26).fork(); + for (const v of message.codeIds) { writer.uint64(v); } + writer.ldelim(); return writer; }, @@ -880,30 +1058,38 @@ export const UnpinCodesProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUnpinCodesProposal(); + 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: if ((tag & 7) === 2) { const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.codeIds.push(reader.uint64() as Long); } } else { message.codeIds.push(reader.uint64() as Long); } + break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -911,7 +1097,7 @@ export const UnpinCodesProposal = { return { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], }; }, @@ -919,11 +1105,13 @@ export const UnpinCodesProposal = { const obj: any = {}; message.title !== undefined && (obj.title = message.title); message.description !== undefined && (obj.description = message.description); + if (message.codeIds) { obj.codeIds = message.codeIds.map((e) => (e || Long.UZERO).toString()); } else { obj.codeIds = []; } + return obj; }, @@ -935,75 +1123,3 @@ export const UnpinCodesProposal = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 89a6f695..96f41c1f 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,187 +1,196 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -import { ContractCodeHistoryEntry, ContractInfo, Model } from "./types"; - +import { ContractInfo, ContractCodeHistoryEntry, Model } from "./types"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC * method */ + export interface QueryContractInfoRequest { /** address is the address of the contract to query */ address: string; } - /** * QueryContractInfoResponse is the response type for the Query/ContractInfo RPC * method */ + export interface QueryContractInfoResponse { /** address is the address of the contract */ address: string; - contractInfo?: ContractInfo; + contractInfo: ContractInfo; } - /** * QueryContractHistoryRequest is the request type for the Query/ContractHistory * RPC method */ + export interface QueryContractHistoryRequest { /** address is the address of the contract to query */ address: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * QueryContractHistoryResponse is the response type for the * Query/ContractHistory RPC method */ + export interface QueryContractHistoryResponse { entries: ContractCodeHistoryEntry[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * QueryContractsByCodeRequest is the request type for the Query/ContractsByCode * RPC method */ + export interface QueryContractsByCodeRequest { - /** grpc-gateway_out does not support Go style CodID */ + /** + * grpc-gateway_out does not support Go style CodID + * pagination defines an optional pagination for the request. + */ codeId: Long; - /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * QueryContractsByCodeResponse is the response type for the * Query/ContractsByCode RPC method */ + export interface QueryContractsByCodeResponse { /** contracts are a set of contract addresses */ contracts: string[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * QueryAllContractStateRequest is the request type for the * Query/AllContractState RPC method */ + export interface QueryAllContractStateRequest { /** address is the address of the contract */ address: string; /** pagination defines an optional pagination for the request. */ + pagination?: PageRequest; } - /** * QueryAllContractStateResponse is the response type for the * Query/AllContractState RPC method */ + export interface QueryAllContractStateResponse { models: Model[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * QueryRawContractStateRequest is the request type for the * Query/RawContractState RPC method */ + export interface QueryRawContractStateRequest { /** address is the address of the contract */ address: string; queryData: Uint8Array; } - /** * QueryRawContractStateResponse is the response type for the * Query/RawContractState RPC method */ + export interface QueryRawContractStateResponse { /** Data contains the raw store data */ data: Uint8Array; } - /** * QuerySmartContractStateRequest is the request type for the * Query/SmartContractState RPC method */ + export interface QuerySmartContractStateRequest { /** address is the address of the contract */ address: string; /** QueryData contains the query data passed to the contract */ + queryData: Uint8Array; } - /** * QuerySmartContractStateResponse is the response type for the * Query/SmartContractState RPC method */ + export interface QuerySmartContractStateResponse { /** Data contains the json data returned from the smart contract */ data: Uint8Array; } - /** QueryCodeRequest is the request type for the Query/Code RPC method */ + export interface QueryCodeRequest { /** grpc-gateway_out does not support Go style CodID */ codeId: Long; } - /** CodeInfoResponse contains code meta data from CodeInfo */ + export interface CodeInfoResponse { - /** id for legacy support */ codeId: Long; creator: string; dataHash: Uint8Array; } - /** QueryCodeResponse is the response type for the Query/Code RPC method */ + export interface QueryCodeResponse { - codeInfo?: CodeInfoResponse; + codeInfo: CodeInfoResponse; data: Uint8Array; } - /** QueryCodesRequest is the request type for the Query/Codes RPC method */ + export interface QueryCodesRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** QueryCodesResponse is the response type for the Query/Codes RPC method */ + export interface QueryCodesResponse { codeInfos: CodeInfoResponse[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } - /** * QueryPinnedCodesRequest is the request type for the Query/PinnedCodes * RPC method */ + export interface QueryPinnedCodesRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * QueryPinnedCodesResponse is the response type for the * Query/PinnedCodes RPC method */ + export interface QueryPinnedCodesResponse { codeIds: Long[]; /** pagination defines the pagination in the response. */ + pagination?: PageResponse; } function createBaseQueryContractInfoRequest(): QueryContractInfoRequest { - return { address: "" }; + return { + address: "", + }; } export const QueryContractInfoRequest = { @@ -189,6 +198,7 @@ export const QueryContractInfoRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + return writer; }, @@ -196,22 +206,28 @@ export const QueryContractInfoRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractInfoRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryContractInfoRequest { - return { address: isSet(object.address) ? String(object.address) : "" }; + return { + address: isSet(object.address) ? String(object.address) : "", + }; }, toJSON(message: QueryContractInfoRequest): unknown { @@ -230,7 +246,10 @@ export const QueryContractInfoRequest = { }; function createBaseQueryContractInfoResponse(): QueryContractInfoResponse { - return { address: "", contractInfo: undefined }; + return { + address: "", + contractInfo: undefined, + }; } export const QueryContractInfoResponse = { @@ -238,9 +257,11 @@ export const QueryContractInfoResponse = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.contractInfo !== undefined) { ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -248,20 +269,25 @@ export const QueryContractInfoResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractInfoResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.contractInfo = ContractInfo.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -294,7 +320,10 @@ export const QueryContractInfoResponse = { }; function createBaseQueryContractHistoryRequest(): QueryContractHistoryRequest { - return { address: "", pagination: undefined }; + return { + address: "", + pagination: undefined, + }; } export const QueryContractHistoryRequest = { @@ -302,9 +331,11 @@ export const QueryContractHistoryRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -312,20 +343,25 @@ export const QueryContractHistoryRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractHistoryRequest(); + 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; }, @@ -358,7 +394,10 @@ export const QueryContractHistoryRequest = { }; function createBaseQueryContractHistoryResponse(): QueryContractHistoryResponse { - return { entries: [], pagination: undefined }; + return { + entries: [], + pagination: undefined, + }; } export const QueryContractHistoryResponse = { @@ -366,9 +405,11 @@ export const QueryContractHistoryResponse = { for (const v of message.entries) { ContractCodeHistoryEntry.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -376,20 +417,25 @@ export const QueryContractHistoryResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractHistoryResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.entries.push(ContractCodeHistoryEntry.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -404,11 +450,13 @@ export const QueryContractHistoryResponse = { toJSON(message: QueryContractHistoryResponse): unknown { const obj: any = {}; + if (message.entries) { obj.entries = message.entries.map((e) => (e ? ContractCodeHistoryEntry.toJSON(e) : undefined)); } else { obj.entries = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -428,7 +476,10 @@ export const QueryContractHistoryResponse = { }; function createBaseQueryContractsByCodeRequest(): QueryContractsByCodeRequest { - return { codeId: Long.UZERO, pagination: undefined }; + return { + codeId: Long.UZERO, + pagination: undefined, + }; } export const QueryContractsByCodeRequest = { @@ -436,9 +487,11 @@ export const QueryContractsByCodeRequest = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -446,26 +499,31 @@ export const QueryContractsByCodeRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractsByCodeRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = 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): QueryContractsByCodeRequest { return { - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -493,7 +551,10 @@ export const QueryContractsByCodeRequest = { }; function createBaseQueryContractsByCodeResponse(): QueryContractsByCodeResponse { - return { contracts: [], pagination: undefined }; + return { + contracts: [], + pagination: undefined, + }; } export const QueryContractsByCodeResponse = { @@ -501,9 +562,11 @@ export const QueryContractsByCodeResponse = { for (const v of message.contracts) { writer.uint32(10).string(v!); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -511,20 +574,25 @@ export const QueryContractsByCodeResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryContractsByCodeResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.contracts.push(reader.string()); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -537,11 +605,13 @@ export const QueryContractsByCodeResponse = { toJSON(message: QueryContractsByCodeResponse): unknown { const obj: any = {}; + if (message.contracts) { obj.contracts = message.contracts.map((e) => e); } else { obj.contracts = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -561,7 +631,10 @@ export const QueryContractsByCodeResponse = { }; function createBaseQueryAllContractStateRequest(): QueryAllContractStateRequest { - return { address: "", pagination: undefined }; + return { + address: "", + pagination: undefined, + }; } export const QueryAllContractStateRequest = { @@ -569,9 +642,11 @@ export const QueryAllContractStateRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -579,20 +654,25 @@ export const QueryAllContractStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllContractStateRequest(); + 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; }, @@ -625,7 +705,10 @@ export const QueryAllContractStateRequest = { }; function createBaseQueryAllContractStateResponse(): QueryAllContractStateResponse { - return { models: [], pagination: undefined }; + return { + models: [], + pagination: undefined, + }; } export const QueryAllContractStateResponse = { @@ -633,9 +716,11 @@ export const QueryAllContractStateResponse = { for (const v of message.models) { Model.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -643,20 +728,25 @@ export const QueryAllContractStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllContractStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.models.push(Model.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -669,11 +759,13 @@ export const QueryAllContractStateResponse = { toJSON(message: QueryAllContractStateResponse): unknown { const obj: any = {}; + if (message.models) { obj.models = message.models.map((e) => (e ? Model.toJSON(e) : undefined)); } else { obj.models = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -693,7 +785,10 @@ export const QueryAllContractStateResponse = { }; function createBaseQueryRawContractStateRequest(): QueryRawContractStateRequest { - return { address: "", queryData: new Uint8Array() }; + return { + address: "", + queryData: new Uint8Array(), + }; } export const QueryRawContractStateRequest = { @@ -701,9 +796,11 @@ export const QueryRawContractStateRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.queryData.length !== 0) { writer.uint32(18).bytes(message.queryData); } + return writer; }, @@ -711,20 +808,25 @@ export const QueryRawContractStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRawContractStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.queryData = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -756,7 +858,9 @@ export const QueryRawContractStateRequest = { }; function createBaseQueryRawContractStateResponse(): QueryRawContractStateResponse { - return { data: new Uint8Array() }; + return { + data: new Uint8Array(), + }; } export const QueryRawContractStateResponse = { @@ -764,6 +868,7 @@ export const QueryRawContractStateResponse = { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } + return writer; }, @@ -771,22 +876,28 @@ export const QueryRawContractStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRawContractStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryRawContractStateResponse { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() }; + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), + }; }, toJSON(message: QueryRawContractStateResponse): unknown { @@ -806,7 +917,10 @@ export const QueryRawContractStateResponse = { }; function createBaseQuerySmartContractStateRequest(): QuerySmartContractStateRequest { - return { address: "", queryData: new Uint8Array() }; + return { + address: "", + queryData: new Uint8Array(), + }; } export const QuerySmartContractStateRequest = { @@ -814,9 +928,11 @@ export const QuerySmartContractStateRequest = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.queryData.length !== 0) { writer.uint32(18).bytes(message.queryData); } + return writer; }, @@ -824,20 +940,25 @@ export const QuerySmartContractStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySmartContractStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.queryData = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -869,7 +990,9 @@ export const QuerySmartContractStateRequest = { }; function createBaseQuerySmartContractStateResponse(): QuerySmartContractStateResponse { - return { data: new Uint8Array() }; + return { + data: new Uint8Array(), + }; } export const QuerySmartContractStateResponse = { @@ -877,6 +1000,7 @@ export const QuerySmartContractStateResponse = { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } + return writer; }, @@ -884,22 +1008,28 @@ export const QuerySmartContractStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuerySmartContractStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QuerySmartContractStateResponse { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() }; + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), + }; }, toJSON(message: QuerySmartContractStateResponse): unknown { @@ -919,7 +1049,9 @@ export const QuerySmartContractStateResponse = { }; function createBaseQueryCodeRequest(): QueryCodeRequest { - return { codeId: Long.UZERO }; + return { + codeId: Long.UZERO, + }; } export const QueryCodeRequest = { @@ -927,6 +1059,7 @@ export const QueryCodeRequest = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + return writer; }, @@ -934,22 +1067,28 @@ export const QueryCodeRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCodeRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryCodeRequest { - return { codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO }; + return { + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + }; }, toJSON(message: QueryCodeRequest): unknown { @@ -967,7 +1106,11 @@ export const QueryCodeRequest = { }; function createBaseCodeInfoResponse(): CodeInfoResponse { - return { codeId: Long.UZERO, creator: "", dataHash: new Uint8Array() }; + return { + codeId: Long.UZERO, + creator: "", + dataHash: new Uint8Array(), + }; } export const CodeInfoResponse = { @@ -975,12 +1118,15 @@ export const CodeInfoResponse = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + if (message.creator !== "") { writer.uint32(18).string(message.creator); } + if (message.dataHash.length !== 0) { writer.uint32(26).bytes(message.dataHash); } + return writer; }, @@ -988,29 +1134,35 @@ export const CodeInfoResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCodeInfoResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + case 2: message.creator = reader.string(); break; + case 3: message.dataHash = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): CodeInfoResponse { return { - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, creator: isSet(object.creator) ? String(object.creator) : "", dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(), }; @@ -1036,7 +1188,10 @@ export const CodeInfoResponse = { }; function createBaseQueryCodeResponse(): QueryCodeResponse { - return { codeInfo: undefined, data: new Uint8Array() }; + return { + codeInfo: undefined, + data: new Uint8Array(), + }; } export const QueryCodeResponse = { @@ -1044,9 +1199,11 @@ export const QueryCodeResponse = { if (message.codeInfo !== undefined) { CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim(); } + if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } + return writer; }, @@ -1054,20 +1211,25 @@ export const QueryCodeResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCodeResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeInfo = CodeInfoResponse.decode(reader, reader.uint32()); break; + case 2: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1099,7 +1261,9 @@ export const QueryCodeResponse = { }; function createBaseQueryCodesRequest(): QueryCodesRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryCodesRequest = { @@ -1107,6 +1271,7 @@ export const QueryCodesRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1114,22 +1279,28 @@ export const QueryCodesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCodesRequest(); + 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): QueryCodesRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryCodesRequest): unknown { @@ -1150,7 +1321,10 @@ export const QueryCodesRequest = { }; function createBaseQueryCodesResponse(): QueryCodesResponse { - return { codeInfos: [], pagination: undefined }; + return { + codeInfos: [], + pagination: undefined, + }; } export const QueryCodesResponse = { @@ -1158,9 +1332,11 @@ export const QueryCodesResponse = { for (const v of message.codeInfos) { CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1168,20 +1344,25 @@ export const QueryCodesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCodesResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeInfos.push(CodeInfoResponse.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1196,11 +1377,13 @@ export const QueryCodesResponse = { toJSON(message: QueryCodesResponse): unknown { const obj: any = {}; + if (message.codeInfos) { obj.codeInfos = message.codeInfos.map((e) => (e ? CodeInfoResponse.toJSON(e) : undefined)); } else { obj.codeInfos = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -1218,7 +1401,9 @@ export const QueryCodesResponse = { }; function createBaseQueryPinnedCodesRequest(): QueryPinnedCodesRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryPinnedCodesRequest = { @@ -1226,6 +1411,7 @@ export const QueryPinnedCodesRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1233,22 +1419,28 @@ export const QueryPinnedCodesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPinnedCodesRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryPinnedCodesRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryPinnedCodesRequest): unknown { @@ -1269,19 +1461,26 @@ export const QueryPinnedCodesRequest = { }; function createBaseQueryPinnedCodesResponse(): QueryPinnedCodesResponse { - return { codeIds: [], pagination: undefined }; + return { + codeIds: [], + pagination: undefined, + }; } export const QueryPinnedCodesResponse = { encode(message: QueryPinnedCodesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); + for (const v of message.codeIds) { writer.uint64(v); } + writer.ldelim(); + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1289,44 +1488,53 @@ export const QueryPinnedCodesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPinnedCodesResponse(); + 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.codeIds.push(reader.uint64() as Long); } } else { message.codeIds.push(reader.uint64() as Long); } + break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryPinnedCodesResponse { return { - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryPinnedCodesResponse): unknown { const obj: any = {}; + if (message.codeIds) { obj.codeIds = message.codeIds.map((e) => (e || Long.UZERO).toString()); } else { obj.codeIds = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -1344,31 +1552,39 @@ export const QueryPinnedCodesResponse = { return message; }, }; +/** Query defines the RPC service */ -/** Query provides defines the gRPC querier service */ export interface Query { - /** ContractInfo gets the contract meta data */ ContractInfo(request: QueryContractInfoRequest): Promise; - /** ContractHistory gets the contract code history */ + /*ContractInfo gets the contract meta data*/ + ContractHistory(request: QueryContractHistoryRequest): Promise; - /** ContractsByCode lists all smart contracts for a code id */ + /*ContractHistory gets the contract code history*/ + ContractsByCode(request: QueryContractsByCodeRequest): Promise; - /** AllContractState gets all raw store data for a single contract */ + /*ContractsByCode lists all smart contracts for a code id*/ + AllContractState(request: QueryAllContractStateRequest): Promise; - /** RawContractState gets single key from the raw store data of a contract */ + /*AllContractState gets all raw store data for a single contract*/ + RawContractState(request: QueryRawContractStateRequest): Promise; - /** SmartContractState get smart query result from the contract */ + /*RawContractState gets single key from the raw store data of a contract*/ + SmartContractState(request: QuerySmartContractStateRequest): Promise; - /** Code gets the binary code and metadata for a singe wasm code */ + /*SmartContractState get smart query result from the contract*/ + Code(request: QueryCodeRequest): Promise; - /** Codes gets the metadata for all stored wasm codes */ - Codes(request: QueryCodesRequest): Promise; - /** PinnedCodes gets the pinned code ids */ - PinnedCodes(request: QueryPinnedCodesRequest): Promise; -} + /*Code gets the binary code and metadata for a singe wasm code*/ + Codes(request?: QueryCodesRequest): Promise; + /*Codes gets the metadata for all stored wasm codes*/ + + PinnedCodes(request?: QueryPinnedCodesRequest): Promise; + /*PinnedCodes gets the pinned code ids*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.ContractInfo = this.ContractInfo.bind(this); @@ -1381,6 +1597,7 @@ export class QueryClientImpl implements Query { this.Codes = this.Codes.bind(this); this.PinnedCodes = this.PinnedCodes.bind(this); } + ContractInfo(request: QueryContractInfoRequest): Promise { const data = QueryContractInfoRequest.encode(request).finish(); const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "ContractInfo", data); @@ -1423,91 +1640,23 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryCodeResponse.decode(new _m0.Reader(data))); } - Codes(request: QueryCodesRequest): Promise { + Codes( + request: QueryCodesRequest = { + pagination: undefined, + }, + ): Promise { const data = QueryCodesRequest.encode(request).finish(); const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "Codes", data); return promise.then((data) => QueryCodesResponse.decode(new _m0.Reader(data))); } - PinnedCodes(request: QueryPinnedCodesRequest): Promise { + PinnedCodes( + request: QueryPinnedCodesRequest = { + pagination: undefined, + }, + ): Promise { const data = QueryPinnedCodesRequest.encode(request).finish(); const promise = this.rpc.request("cosmwasm.wasm.v1.Query", "PinnedCodes", data); return promise.then((data) => QueryPinnedCodesResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index 7580f736..4f652cab 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,88 +1,100 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { AccessConfig } from "./types"; - +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** MsgStoreCode submit Wasm code to the system */ + export interface MsgStoreCode { /** Sender is the that actor that signed the messages */ sender: string; /** WASMByteCode can be raw or gzip compressed */ + wasmByteCode: Uint8Array; /** * InstantiatePermission access control to apply on contract creation, * optional */ - instantiatePermission?: AccessConfig; -} + instantiatePermission: AccessConfig; +} /** MsgStoreCodeResponse returns store result data. */ + export interface MsgStoreCodeResponse { /** CodeID is the reference to the stored WASM code */ codeId: Long; } - /** * MsgInstantiateContract create a new smart contract instance for the given * code id. */ + export interface MsgInstantiateContract { /** Sender is the that actor that signed the messages */ sender: string; /** Admin is an optional address that can execute migrations */ + admin: string; /** CodeID is the reference to the stored WASM code */ + codeId: Long; /** Label is optional metadata to be stored with a contract instance. */ + label: string; /** Msg json encoded message to be passed to the contract on instantiation */ + msg: Uint8Array; /** Funds coins that are transferred to the contract on instantiation */ + funds: Coin[]; } - /** MsgInstantiateContractResponse return instantiation result data */ + export interface MsgInstantiateContractResponse { /** Address is the bech32 address of the new contract instance. */ address: string; /** Data contains base64-encoded bytes to returned from the contract */ + data: Uint8Array; } - /** MsgExecuteContract submits the given message data to a smart contract */ + export interface MsgExecuteContract { /** Sender is the that actor that signed the messages */ sender: string; /** Contract is the address of the smart contract */ + contract: string; /** Msg json encoded message to be passed to the contract */ + msg: Uint8Array; /** Funds coins that are transferred to the contract on execution */ + funds: Coin[]; } - /** MsgExecuteContractResponse returns execution result data. */ + export interface MsgExecuteContractResponse { /** Data contains base64-encoded bytes to returned from the contract */ data: Uint8Array; } - /** MsgMigrateContract runs a code upgrade/ downgrade for a smart contract */ + export interface MsgMigrateContract { /** Sender is the that actor that signed the messages */ sender: string; /** Contract is the address of the smart contract */ + contract: string; /** CodeID references the new WASM code */ + codeId: Long; /** Msg json encoded message to be passed to the contract on migration */ + msg: Uint8Array; } - /** MsgMigrateContractResponse returns contract migration result data. */ + export interface MsgMigrateContractResponse { /** * Data contains same raw bytes returned as data from the wasm contract. @@ -90,33 +102,40 @@ export interface MsgMigrateContractResponse { */ data: Uint8Array; } - /** MsgUpdateAdmin sets a new admin for a smart contract */ + export interface MsgUpdateAdmin { /** Sender is the that actor that signed the messages */ sender: string; /** NewAdmin address to be set */ + newAdmin: string; /** Contract is the address of the smart contract */ + contract: string; } - /** MsgUpdateAdminResponse returns empty data */ -export interface MsgUpdateAdminResponse {} +export interface MsgUpdateAdminResponse {} /** MsgClearAdmin removes any admin stored for a smart contract */ + export interface MsgClearAdmin { /** Sender is the that actor that signed the messages */ sender: string; /** Contract is the address of the smart contract */ + contract: string; } - /** MsgClearAdminResponse returns empty data */ + export interface MsgClearAdminResponse {} function createBaseMsgStoreCode(): MsgStoreCode { - return { sender: "", wasmByteCode: new Uint8Array(), instantiatePermission: undefined }; + return { + sender: "", + wasmByteCode: new Uint8Array(), + instantiatePermission: undefined, + }; } export const MsgStoreCode = { @@ -124,12 +143,15 @@ export const MsgStoreCode = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.wasmByteCode.length !== 0) { writer.uint32(18).bytes(message.wasmByteCode); } + if (message.instantiatePermission !== undefined) { AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -137,23 +159,29 @@ export const MsgStoreCode = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStoreCode(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: message.wasmByteCode = reader.bytes(); break; + case 5: message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -194,7 +222,9 @@ export const MsgStoreCode = { }; function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { - return { codeId: Long.UZERO }; + return { + codeId: Long.UZERO, + }; } export const MsgStoreCodeResponse = { @@ -202,6 +232,7 @@ export const MsgStoreCodeResponse = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + return writer; }, @@ -209,22 +240,28 @@ export const MsgStoreCodeResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStoreCodeResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgStoreCodeResponse { - return { codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO }; + return { + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + }; }, toJSON(message: MsgStoreCodeResponse): unknown { @@ -242,7 +279,14 @@ export const MsgStoreCodeResponse = { }; function createBaseMsgInstantiateContract(): MsgInstantiateContract { - return { sender: "", admin: "", codeId: Long.UZERO, label: "", msg: new Uint8Array(), funds: [] }; + return { + sender: "", + admin: "", + codeId: Long.UZERO, + label: "", + msg: new Uint8Array(), + funds: [], + }; } export const MsgInstantiateContract = { @@ -250,21 +294,27 @@ export const MsgInstantiateContract = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.admin !== "") { writer.uint32(18).string(message.admin); } + if (!message.codeId.isZero()) { writer.uint32(24).uint64(message.codeId); } + if (message.label !== "") { writer.uint32(34).string(message.label); } + if (message.msg.length !== 0) { writer.uint32(42).bytes(message.msg); } + for (const v of message.funds) { Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } + return writer; }, @@ -272,32 +322,41 @@ export const MsgInstantiateContract = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgInstantiateContract(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: message.admin = reader.string(); break; + case 3: message.codeId = reader.uint64() as Long; break; + case 4: message.label = reader.string(); break; + case 5: message.msg = reader.bytes(); break; + case 6: message.funds.push(Coin.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -305,7 +364,7 @@ export const MsgInstantiateContract = { return { sender: isSet(object.sender) ? String(object.sender) : "", admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, label: isSet(object.label) ? String(object.label) : "", msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [], @@ -320,11 +379,13 @@ export const MsgInstantiateContract = { message.label !== undefined && (obj.label = message.label); message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); + if (message.funds) { obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.funds = []; } + return obj; }, @@ -342,7 +403,10 @@ export const MsgInstantiateContract = { }; function createBaseMsgInstantiateContractResponse(): MsgInstantiateContractResponse { - return { address: "", data: new Uint8Array() }; + return { + address: "", + data: new Uint8Array(), + }; } export const MsgInstantiateContractResponse = { @@ -350,9 +414,11 @@ export const MsgInstantiateContractResponse = { if (message.address !== "") { writer.uint32(10).string(message.address); } + if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } + return writer; }, @@ -360,20 +426,25 @@ export const MsgInstantiateContractResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgInstantiateContractResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.string(); break; + case 2: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -403,7 +474,12 @@ export const MsgInstantiateContractResponse = { }; function createBaseMsgExecuteContract(): MsgExecuteContract { - return { sender: "", contract: "", msg: new Uint8Array(), funds: [] }; + return { + sender: "", + contract: "", + msg: new Uint8Array(), + funds: [], + }; } export const MsgExecuteContract = { @@ -411,15 +487,19 @@ export const MsgExecuteContract = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.contract !== "") { writer.uint32(18).string(message.contract); } + if (message.msg.length !== 0) { writer.uint32(26).bytes(message.msg); } + for (const v of message.funds) { Coin.encode(v!, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -427,26 +507,33 @@ export const MsgExecuteContract = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgExecuteContract(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: message.contract = reader.string(); break; + case 3: message.msg = reader.bytes(); break; + case 5: message.funds.push(Coin.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -465,11 +552,13 @@ export const MsgExecuteContract = { message.contract !== undefined && (obj.contract = message.contract); message.msg !== undefined && (obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array())); + if (message.funds) { obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined)); } else { obj.funds = []; } + return obj; }, @@ -484,7 +573,9 @@ export const MsgExecuteContract = { }; function createBaseMsgExecuteContractResponse(): MsgExecuteContractResponse { - return { data: new Uint8Array() }; + return { + data: new Uint8Array(), + }; } export const MsgExecuteContractResponse = { @@ -492,6 +583,7 @@ export const MsgExecuteContractResponse = { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } + return writer; }, @@ -499,22 +591,28 @@ export const MsgExecuteContractResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgExecuteContractResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgExecuteContractResponse { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() }; + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), + }; }, toJSON(message: MsgExecuteContractResponse): unknown { @@ -534,7 +632,12 @@ export const MsgExecuteContractResponse = { }; function createBaseMsgMigrateContract(): MsgMigrateContract { - return { sender: "", contract: "", codeId: Long.UZERO, msg: new Uint8Array() }; + return { + sender: "", + contract: "", + codeId: Long.UZERO, + msg: new Uint8Array(), + }; } export const MsgMigrateContract = { @@ -542,15 +645,19 @@ export const MsgMigrateContract = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.contract !== "") { writer.uint32(18).string(message.contract); } + if (!message.codeId.isZero()) { writer.uint32(24).uint64(message.codeId); } + if (message.msg.length !== 0) { writer.uint32(34).bytes(message.msg); } + return writer; }, @@ -558,26 +665,33 @@ export const MsgMigrateContract = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMigrateContract(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: message.contract = reader.string(); break; + case 3: message.codeId = reader.uint64() as Long; break; + case 4: message.msg = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -585,7 +699,7 @@ export const MsgMigrateContract = { return { sender: isSet(object.sender) ? String(object.sender) : "", contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; }, @@ -612,7 +726,9 @@ export const MsgMigrateContract = { }; function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { - return { data: new Uint8Array() }; + return { + data: new Uint8Array(), + }; } export const MsgMigrateContractResponse = { @@ -620,6 +736,7 @@ export const MsgMigrateContractResponse = { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } + return writer; }, @@ -627,22 +744,28 @@ export const MsgMigrateContractResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMigrateContractResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): MsgMigrateContractResponse { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array() }; + return { + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), + }; }, toJSON(message: MsgMigrateContractResponse): unknown { @@ -662,7 +785,11 @@ export const MsgMigrateContractResponse = { }; function createBaseMsgUpdateAdmin(): MsgUpdateAdmin { - return { sender: "", newAdmin: "", contract: "" }; + return { + sender: "", + newAdmin: "", + contract: "", + }; } export const MsgUpdateAdmin = { @@ -670,12 +797,15 @@ export const MsgUpdateAdmin = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.newAdmin !== "") { writer.uint32(18).string(message.newAdmin); } + if (message.contract !== "") { writer.uint32(26).string(message.contract); } + return writer; }, @@ -683,23 +813,29 @@ export const MsgUpdateAdmin = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateAdmin(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 2: message.newAdmin = reader.string(); break; + case 3: message.contract = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -741,14 +877,17 @@ export const MsgUpdateAdminResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateAdminResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -768,7 +907,10 @@ export const MsgUpdateAdminResponse = { }; function createBaseMsgClearAdmin(): MsgClearAdmin { - return { sender: "", contract: "" }; + return { + sender: "", + contract: "", + }; } export const MsgClearAdmin = { @@ -776,9 +918,11 @@ export const MsgClearAdmin = { if (message.sender !== "") { writer.uint32(10).string(message.sender); } + if (message.contract !== "") { writer.uint32(26).string(message.contract); } + return writer; }, @@ -786,20 +930,25 @@ export const MsgClearAdmin = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgClearAdmin(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sender = reader.string(); break; + case 3: message.contract = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -838,14 +987,17 @@ export const MsgClearAdminResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgClearAdminResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -863,25 +1015,30 @@ export const MsgClearAdminResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the wasm Msg service. */ export interface Msg { - /** StoreCode to submit Wasm code to the system */ StoreCode(request: MsgStoreCode): Promise; - /** Instantiate creates a new smart contract instance for the given code id. */ + /*StoreCode to submit Wasm code to the system*/ + InstantiateContract(request: MsgInstantiateContract): Promise; - /** Execute submits the given message data to a smart contract */ + /*Instantiate creates a new smart contract instance for the given code id.*/ + ExecuteContract(request: MsgExecuteContract): Promise; - /** Migrate runs a code upgrade/ downgrade for a smart contract */ + /*Execute submits the given message data to a smart contract*/ + MigrateContract(request: MsgMigrateContract): Promise; - /** UpdateAdmin sets a new admin for a smart contract */ + /*Migrate runs a code upgrade/ downgrade for a smart contract*/ + UpdateAdmin(request: MsgUpdateAdmin): Promise; - /** ClearAdmin removes any admin stored for a smart contract */ + /*UpdateAdmin sets a new admin for a smart contract*/ + ClearAdmin(request: MsgClearAdmin): Promise; + /*ClearAdmin removes any admin stored for a smart contract*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.StoreCode = this.StoreCode.bind(this); @@ -891,6 +1048,7 @@ export class MsgClientImpl implements Msg { this.UpdateAdmin = this.UpdateAdmin.bind(this); this.ClearAdmin = this.ClearAdmin.bind(this); } + StoreCode(request: MsgStoreCode): Promise { const data = MsgStoreCode.encode(request).finish(); const promise = this.rpc.request("cosmwasm.wasm.v1.Msg", "StoreCode", data); @@ -927,79 +1085,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgClearAdminResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 30ed0684..8db22078 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,176 +1,199 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; - /** AccessType permission types */ + export enum AccessType { /** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */ ACCESS_TYPE_UNSPECIFIED = 0, + /** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */ ACCESS_TYPE_NOBODY = 1, + /** ACCESS_TYPE_ONLY_ADDRESS - AccessTypeOnlyAddress restricted to an address */ ACCESS_TYPE_ONLY_ADDRESS = 2, + /** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */ ACCESS_TYPE_EVERYBODY = 3, UNRECOGNIZED = -1, } - export function accessTypeFromJSON(object: any): AccessType { switch (object) { case 0: case "ACCESS_TYPE_UNSPECIFIED": return AccessType.ACCESS_TYPE_UNSPECIFIED; + case 1: case "ACCESS_TYPE_NOBODY": return AccessType.ACCESS_TYPE_NOBODY; + case 2: case "ACCESS_TYPE_ONLY_ADDRESS": return AccessType.ACCESS_TYPE_ONLY_ADDRESS; + case 3: case "ACCESS_TYPE_EVERYBODY": return AccessType.ACCESS_TYPE_EVERYBODY; + case -1: case "UNRECOGNIZED": default: return AccessType.UNRECOGNIZED; } } - export function accessTypeToJSON(object: AccessType): string { switch (object) { case AccessType.ACCESS_TYPE_UNSPECIFIED: return "ACCESS_TYPE_UNSPECIFIED"; + case AccessType.ACCESS_TYPE_NOBODY: return "ACCESS_TYPE_NOBODY"; + case AccessType.ACCESS_TYPE_ONLY_ADDRESS: return "ACCESS_TYPE_ONLY_ADDRESS"; + case AccessType.ACCESS_TYPE_EVERYBODY: return "ACCESS_TYPE_EVERYBODY"; - case AccessType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** ContractCodeHistoryOperationType actions that caused a code change */ + export enum ContractCodeHistoryOperationType { /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */ CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0, + /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */ CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1, + /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */ CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2, + /** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */ CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3, UNRECOGNIZED = -1, } - export function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType { switch (object) { case 0: case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED; + case 1: case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT; + case 2: case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE; + case 3: case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS; + case -1: case "UNRECOGNIZED": default: return ContractCodeHistoryOperationType.UNRECOGNIZED; } } - export function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string { switch (object) { case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT"; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"; + case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; - case ContractCodeHistoryOperationType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** AccessTypeParam */ + export interface AccessTypeParam { value: AccessType; } - /** AccessConfig access control type. */ + export interface AccessConfig { permission: AccessType; address: string; } - /** Params defines the set of wasm parameters. */ + export interface Params { - codeUploadAccess?: AccessConfig; + codeUploadAccess: AccessConfig; instantiateDefaultPermission: AccessType; maxWasmCodeSize: Long; } - /** CodeInfo is data for the uploaded contract WASM code */ + export interface CodeInfo { /** CodeHash is the unique identifier created by wasmvm */ codeHash: Uint8Array; /** Creator address who initially stored the code */ + creator: string; /** InstantiateConfig access control to apply on contract creation, optional */ - instantiateConfig?: AccessConfig; -} + instantiateConfig: AccessConfig; +} /** ContractInfo stores a WASM contract instance */ + export interface ContractInfo { /** CodeID is the reference to the stored Wasm code */ codeId: Long; /** Creator address who initially instantiated the contract */ + creator: string; /** Admin is an optional address that can execute migrations */ + admin: string; /** Label is optional metadata to be stored with a contract instance. */ + label: string; /** * Created Tx position when the contract was instantiated. * This data should kept internal and not be exposed via query results. Just * use for sorting */ - created?: AbsoluteTxPosition; + + created: AbsoluteTxPosition; ibcPortId: string; /** * Extension is an extension point to store custom metadata within the * persistence model. */ - extension?: Any; -} + extension: Any; +} /** ContractCodeHistoryEntry metadata to a contract. */ + export interface ContractCodeHistoryEntry { operation: ContractCodeHistoryOperationType; /** CodeID is the reference to the stored WASM code */ + codeId: Long; /** Updated Tx position when the operation was executed. */ - updated?: AbsoluteTxPosition; + + updated: AbsoluteTxPosition; msg: Uint8Array; } - /** * AbsoluteTxPosition is a unique transaction position that allows for global * ordering of transactions. */ + export interface AbsoluteTxPosition { /** BlockHeight is the block the contract was created at */ blockHeight: Long; @@ -178,19 +201,23 @@ export interface AbsoluteTxPosition { * TxIndex is a monotonic counter within the block (actual transaction index, * or gas consumed) */ + txIndex: Long; } - /** Model is a struct that holds a KV pair */ + export interface Model { /** hex-encode key to read it better (this is often ascii) */ key: Uint8Array; /** base64-encode raw value */ + value: Uint8Array; } function createBaseAccessTypeParam(): AccessTypeParam { - return { value: 0 }; + return { + value: 0, + }; } export const AccessTypeParam = { @@ -198,6 +225,7 @@ export const AccessTypeParam = { if (message.value !== 0) { writer.uint32(8).int32(message.value); } + return writer; }, @@ -205,22 +233,28 @@ export const AccessTypeParam = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccessTypeParam(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.value = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): AccessTypeParam { - return { value: isSet(object.value) ? accessTypeFromJSON(object.value) : 0 }; + return { + value: isSet(object.value) ? accessTypeFromJSON(object.value) : 0, + }; }, toJSON(message: AccessTypeParam): unknown { @@ -237,7 +271,10 @@ export const AccessTypeParam = { }; function createBaseAccessConfig(): AccessConfig { - return { permission: 0, address: "" }; + return { + permission: 0, + address: "", + }; } export const AccessConfig = { @@ -245,9 +282,11 @@ export const AccessConfig = { if (message.permission !== 0) { writer.uint32(8).int32(message.permission); } + if (message.address !== "") { writer.uint32(18).string(message.address); } + return writer; }, @@ -255,20 +294,25 @@ export const AccessConfig = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccessConfig(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.permission = reader.int32() as any; break; + case 2: message.address = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -295,7 +339,11 @@ export const AccessConfig = { }; function createBaseParams(): Params { - return { codeUploadAccess: undefined, instantiateDefaultPermission: 0, maxWasmCodeSize: Long.UZERO }; + return { + codeUploadAccess: undefined, + instantiateDefaultPermission: 0, + maxWasmCodeSize: Long.UZERO, + }; } export const Params = { @@ -303,12 +351,15 @@ export const Params = { if (message.codeUploadAccess !== undefined) { AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim(); } + if (message.instantiateDefaultPermission !== 0) { writer.uint32(16).int32(message.instantiateDefaultPermission); } + if (!message.maxWasmCodeSize.isZero()) { writer.uint32(24).uint64(message.maxWasmCodeSize); } + return writer; }, @@ -316,23 +367,29 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32()); break; + case 2: message.instantiateDefaultPermission = reader.int32() as any; break; + case 3: message.maxWasmCodeSize = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -344,7 +401,7 @@ export const Params = { instantiateDefaultPermission: isSet(object.instantiateDefaultPermission) ? accessTypeFromJSON(object.instantiateDefaultPermission) : 0, - maxWasmCodeSize: isSet(object.maxWasmCodeSize) ? Long.fromValue(object.maxWasmCodeSize) : Long.UZERO, + maxWasmCodeSize: isSet(object.maxWasmCodeSize) ? Long.fromString(object.maxWasmCodeSize) : Long.UZERO, }; }, @@ -377,7 +434,11 @@ export const Params = { }; function createBaseCodeInfo(): CodeInfo { - return { codeHash: new Uint8Array(), creator: "", instantiateConfig: undefined }; + return { + codeHash: new Uint8Array(), + creator: "", + instantiateConfig: undefined, + }; } export const CodeInfo = { @@ -385,12 +446,15 @@ export const CodeInfo = { if (message.codeHash.length !== 0) { writer.uint32(10).bytes(message.codeHash); } + if (message.creator !== "") { writer.uint32(18).string(message.creator); } + if (message.instantiateConfig !== undefined) { AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -398,23 +462,29 @@ export const CodeInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCodeInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeHash = reader.bytes(); break; + case 2: message.creator = reader.string(); break; + case 5: message.instantiateConfig = AccessConfig.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -469,24 +539,31 @@ export const ContractInfo = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + if (message.creator !== "") { writer.uint32(18).string(message.creator); } + if (message.admin !== "") { writer.uint32(26).string(message.admin); } + if (message.label !== "") { writer.uint32(34).string(message.label); } + if (message.created !== undefined) { AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim(); } + if (message.ibcPortId !== "") { writer.uint32(50).string(message.ibcPortId); } + if (message.extension !== undefined) { Any.encode(message.extension, writer.uint32(58).fork()).ldelim(); } + return writer; }, @@ -494,41 +571,51 @@ export const ContractInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseContractInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + case 2: message.creator = reader.string(); break; + case 3: message.admin = reader.string(); break; + case 4: message.label = reader.string(); break; + case 5: message.created = AbsoluteTxPosition.decode(reader, reader.uint32()); break; + case 6: message.ibcPortId = reader.string(); break; + case 7: message.extension = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ContractInfo { return { - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, creator: isSet(object.creator) ? String(object.creator) : "", admin: isSet(object.admin) ? String(object.admin) : "", label: isSet(object.label) ? String(object.label) : "", @@ -573,7 +660,12 @@ export const ContractInfo = { }; function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry { - return { operation: 0, codeId: Long.UZERO, updated: undefined, msg: new Uint8Array() }; + return { + operation: 0, + codeId: Long.UZERO, + updated: undefined, + msg: new Uint8Array(), + }; } export const ContractCodeHistoryEntry = { @@ -581,15 +673,19 @@ export const ContractCodeHistoryEntry = { if (message.operation !== 0) { writer.uint32(8).int32(message.operation); } + if (!message.codeId.isZero()) { writer.uint32(16).uint64(message.codeId); } + if (message.updated !== undefined) { AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim(); } + if (message.msg.length !== 0) { writer.uint32(34).bytes(message.msg); } + return writer; }, @@ -597,33 +693,40 @@ export const ContractCodeHistoryEntry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseContractCodeHistoryEntry(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.operation = reader.int32() as any; break; + case 2: message.codeId = reader.uint64() as Long; break; + case 3: message.updated = AbsoluteTxPosition.decode(reader, reader.uint32()); break; + case 4: message.msg = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ContractCodeHistoryEntry { return { operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : 0, - codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, updated: isSet(object.updated) ? AbsoluteTxPosition.fromJSON(object.updated) : undefined, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; @@ -658,7 +761,10 @@ export const ContractCodeHistoryEntry = { }; function createBaseAbsoluteTxPosition(): AbsoluteTxPosition { - return { blockHeight: Long.UZERO, txIndex: Long.UZERO }; + return { + blockHeight: Long.UZERO, + txIndex: Long.UZERO, + }; } export const AbsoluteTxPosition = { @@ -666,9 +772,11 @@ export const AbsoluteTxPosition = { if (!message.blockHeight.isZero()) { writer.uint32(8).uint64(message.blockHeight); } + if (!message.txIndex.isZero()) { writer.uint32(16).uint64(message.txIndex); } + return writer; }, @@ -676,27 +784,32 @@ export const AbsoluteTxPosition = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAbsoluteTxPosition(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockHeight = reader.uint64() as Long; break; + case 2: message.txIndex = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): AbsoluteTxPosition { return { - blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.UZERO, - txIndex: isSet(object.txIndex) ? Long.fromValue(object.txIndex) : Long.UZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.UZERO, + txIndex: isSet(object.txIndex) ? Long.fromString(object.txIndex) : Long.UZERO, }; }, @@ -720,7 +833,10 @@ export const AbsoluteTxPosition = { }; function createBaseModel(): Model { - return { key: new Uint8Array(), value: new Uint8Array() }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + }; } export const Model = { @@ -728,9 +844,11 @@ export const Model = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + return writer; }, @@ -738,20 +856,25 @@ export const Model = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModel(); + 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; }, @@ -778,75 +901,3 @@ export const Model = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/gogoproto/gogo.ts b/src/gogoproto/gogo.ts index ecf800e0..cb0ff5c3 100644 --- a/src/gogoproto/gogo.ts +++ b/src/gogoproto/gogo.ts @@ -1,3 +1 @@ -/* eslint-disable */ - -export const protobufPackage = "gogoproto"; +export {}; diff --git a/src/google/api/annotations.ts b/src/google/api/annotations.ts index c2161053..cb0ff5c3 100644 --- a/src/google/api/annotations.ts +++ b/src/google/api/annotations.ts @@ -1,3 +1 @@ -/* eslint-disable */ - -export const protobufPackage = "google.api"; +export {}; diff --git a/src/google/api/http.ts b/src/google/api/http.ts index bab4058e..2084f522 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,14 +1,12 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../helpers"; 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. @@ -24,9 +22,9 @@ export interface Http { * 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 @@ -40,6 +38,7 @@ export interface Http { * 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}"; @@ -79,6 +78,7 @@ export interface Http { * 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}"; @@ -93,6 +93,7 @@ export interface Http { * SubMessage sub = 3; // `sub.subfield` becomes a parameter * } * + * * This enables a HTTP JSON to RPC mapping as below: * * HTTP | RPC @@ -108,6 +109,7 @@ export interface Http { * specifies the mapping. Consider a REST update method on the * message resource collection: * + * * service Messaging { * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { * option (google.api.http) = { @@ -121,6 +123,7 @@ export interface Http { * 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: @@ -147,6 +150,7 @@ export interface Http { * string text = 2; * } * + * * The following HTTP JSON to RPC mapping is enabled: * * HTTP | RPC @@ -177,6 +181,7 @@ export interface Http { * string user_id = 2; * } * + * * This enables the following two alternative HTTP JSON to RPC * mappings: * @@ -239,6 +244,7 @@ export interface Http { * 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. @@ -247,53 +253,66 @@ export interface HttpRule { */ selector: string; /** Used for listing and getting information about resources. */ - get: string | undefined; + + get?: string; /** Used for updating a resource. */ - put: string | undefined; + + put?: string; /** Used for creating a resource. */ - post: string | undefined; + + post?: string; /** Used for deleting a resource. */ - delete: string | undefined; + + delete?: string; /** Used for updating a resource. */ - patch: string | undefined; + + patch?: string; /** * 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; + + custom?: CustomHttpPattern; /** * 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; } function createBaseHttp(): Http { - return { rules: [], fullyDecodeReservedExpansion: false }; + return { + rules: [], + fullyDecodeReservedExpansion: false, + }; } export const Http = { @@ -301,9 +320,11 @@ export const Http = { 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; }, @@ -311,20 +332,25 @@ export const Http = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHttp(); + 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; }, @@ -339,11 +365,13 @@ export const Http = { 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; @@ -377,33 +405,43 @@ export const HttpRule = { 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; }, @@ -411,44 +449,57 @@ export const HttpRule = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHttpRule(); + 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; }, @@ -481,11 +532,13 @@ export const HttpRule = { (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; }, @@ -509,7 +562,10 @@ export const HttpRule = { }; function createBaseCustomHttpPattern(): CustomHttpPattern { - return { kind: "", path: "" }; + return { + kind: "", + path: "", + }; } export const CustomHttpPattern = { @@ -517,9 +573,11 @@ export const CustomHttpPattern = { if (message.kind !== "") { writer.uint32(10).string(message.kind); } + if (message.path !== "") { writer.uint32(18).string(message.path); } + return writer; }, @@ -527,20 +585,25 @@ export const CustomHttpPattern = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCustomHttpPattern(); + 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; }, @@ -565,31 +628,3 @@ export const CustomHttpPattern = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 514ab036..8e78525a 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; 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. @@ -56,6 +53,7 @@ export const protobufPackage = "google.protobuf"; * in the type URL, for example "foo.bar.com/x/y.z" will yield type * name "y.z". * + * * JSON * ==== * The JSON representation of an `Any` value uses the regular @@ -84,6 +82,7 @@ export const protobufPackage = "google.protobuf"; * "value": "1.212s" * } */ + export interface Any { /** * A URL/resource name that uniquely identifies the type of the serialized @@ -116,11 +115,15 @@ export interface Any { */ typeUrl: string; /** Must be a valid serialized protocol buffer of the above specified type. */ + value: Uint8Array; } function createBaseAny(): Any { - return { typeUrl: "", value: new Uint8Array() }; + return { + typeUrl: "", + value: new Uint8Array(), + }; } export const Any = { @@ -128,9 +131,11 @@ export const Any = { if (message.typeUrl !== "") { writer.uint32(10).string(message.typeUrl); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + return writer; }, @@ -138,20 +143,25 @@ export const Any = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAny(); + 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; }, @@ -177,75 +187,3 @@ export const Any = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 9bec118a..31cb1529 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,316 +1,194 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; 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; - /** - * 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; - /** - * 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; - 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 { - /** Inclusive. */ - start: number; - /** Exclusive. */ - end: number; - options?: ExtensionRangeOptions; -} - -/** - * 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; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - */ - proto3Optional: boolean; -} - export enum FieldDescriptorProto_Type { /** * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. + * 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. + * 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. + * 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. + * 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"; - case FieldDescriptorProto_Type.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - export enum FieldDescriptorProto_Label { /** LABEL_OPTIONAL - 0 is reserved for errors */ LABEL_OPTIONAL = 1, @@ -318,63 +196,401 @@ export enum FieldDescriptorProto_Label { 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"; + } +} +/** Generated classes can be optimized for speed or code size. */ + +export enum FileOptions_OptimizeMode { + /** + * SPEED - Generate complete code for parsing, serialization, + * etc. + */ + SPEED = 1, + + /** CODE_SIZE - Use ReflectionOps to implement these methods. */ + 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 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"; + } +} +/** + * 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"; + } +} +/** + * 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; + 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; + /** + * 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; + /** + * 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; + 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 { + /** Inclusive. */ + start: number; + /** Exclusive. */ + + end: number; + options: ExtensionRangeOptions; +} +/** + * 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. + */ -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"; - case FieldDescriptorProto_Label.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} + 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; +} /** Describes a oneof. */ + export interface OneofDescriptorProto { name: string; - options?: OneofOptions; + options: OneofOptions; } - /** Describes an enum type. */ + export interface EnumDescriptorProto { name: string; value: EnumValueDescriptorProto[]; - options?: EnumOptions; + options: EnumOptions; /** * 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. @@ -383,43 +599,47 @@ export interface EnumDescriptorProto { * 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; + options: EnumValueOptions; } - /** Describes a service. */ + export interface ServiceDescriptorProto { name: string; method: MethodDescriptorProto[]; - options?: ServiceOptions; + options: ServiceOptions; } - /** 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; + options: MethodOptions; /** 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 @@ -429,27 +649,28 @@ export interface FileOptions { */ javaPackage: string; /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. + * 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 enabled, then the Java code generator will generate a separate .java + * 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 wrapper class - * named by java_outer_classname. However, the wrapper class will still be + * 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 - */ + /** This option does nothing. */ + + /** @deprecated */ + javaGenerateEqualsAndHash: boolean; /** * If set true, then the Java2 code generator will generate code that @@ -459,6 +680,7 @@ export interface FileOptions { * 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; /** @@ -468,6 +690,7 @@ export interface FileOptions { * - 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 @@ -481,6 +704,7 @@ export interface FileOptions { * these default to false. Old code which depends on generic services should * explicitly set them to true. */ + ccGenericServices: boolean; javaGenericServices: boolean; pyGenericServices: boolean; @@ -491,18 +715,22 @@ export interface FileOptions { * 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 @@ -510,80 +738,42 @@ export interface FileOptions { * 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"; - case FileOptions_OptimizeMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + uninterpretedOption: UninterpretedOption[]; } - export interface MessageOptions { /** * Set true to use the old proto1 MessageSet wire format for extensions. @@ -611,6 +801,7 @@ export interface MessageOptions { * 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? @@ -618,6 +809,7 @@ export interface MessageOptions { * 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 @@ -642,11 +834,12 @@ export interface MessageOptions { * 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 @@ -662,6 +855,7 @@ export interface FieldOptions { * 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 @@ -676,6 +870,7 @@ export interface FieldOptions { * 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 @@ -695,6 +890,7 @@ export interface FieldOptions { * 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. @@ -706,6 +902,7 @@ export interface FieldOptions { * check its required fields, regardless of whether or not the message has * been parsed. */ + lazy: boolean; /** * Is this field deprecated? @@ -713,100 +910,19 @@ export interface FieldOptions { * 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"; - case FieldOptions_CType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -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"; - case FieldOptions_JSType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + uninterpretedOption: UninterpretedOption[]; } - 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 @@ -819,11 +935,12 @@ export interface EnumOptions { * 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? @@ -833,9 +950,9 @@ export interface EnumValueOptions { */ deprecated: boolean; /** The parser stores options it doesn't recognize here. See above. */ + uninterpretedOption: UninterpretedOption[]; } - export interface ServiceOptions { /** * Is this service deprecated? @@ -845,68 +962,22 @@ export interface ServiceOptions { */ 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[]; } +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. */ -/** - * 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"; - case MethodOptions_IdempotencyLevel.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - + uninterpretedOption: UninterpretedOption[]; +} /** * A message representing a option the parser does not recognize. This only * appears in options protos created by the compiler::Parser class. @@ -915,12 +986,14 @@ export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_Idemp * 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: Long; negativeIntValue: Long; @@ -928,7 +1001,6 @@ export interface UninterpretedOption { 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 @@ -936,15 +1008,16 @@ export interface UninterpretedOption { * 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 @@ -993,7 +1066,6 @@ export interface SourceCodeInfo { */ location: SourceCodeInfo_Location[]; } - export interface SourceCodeInfo_Location { /** * Identifies which part of the FileDescriptorProto was defined at this @@ -1028,6 +1100,7 @@ export interface SourceCodeInfo_Location { * 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 @@ -1071,23 +1144,24 @@ export interface SourceCodeInfo_Location { * optional string corge = 5; * /* Block comment attached * * to corge. Leading asterisks - * * will be removed. * / + * * will be removed. *\/ * /* Block comment attached to - * * grault. * / + * * 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 @@ -1095,7 +1169,6 @@ export interface GeneratedCodeInfo { */ annotation: GeneratedCodeInfo_Annotation[]; } - export interface GeneratedCodeInfo_Annotation { /** * Identifies the element in the original source .proto file. This field @@ -1103,22 +1176,27 @@ export interface GeneratedCodeInfo_Annotation { */ 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; } function createBaseFileDescriptorSet(): FileDescriptorSet { - return { file: [] }; + return { + file: [], + }; } export const FileDescriptorSet = { @@ -1126,6 +1204,7 @@ export const FileDescriptorSet = { for (const v of message.file) { FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1133,17 +1212,21 @@ export const FileDescriptorSet = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileDescriptorSet(); + 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; }, @@ -1155,11 +1238,13 @@ export const FileDescriptorSet = { 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; }, @@ -1192,43 +1277,58 @@ export const FileDescriptorProto = { 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; }, @@ -1236,64 +1336,83 @@ export const FileDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileDescriptorProto(); + 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; }, @@ -1332,41 +1451,49 @@ export const FileDescriptorProto = { 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) => Math.round(e)); } else { obj.publicDependency = []; } + if (message.weakDependency) { obj.weakDependency = message.weakDependency.map((e) => Math.round(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 && @@ -1421,33 +1548,43 @@ export const DescriptorProto = { 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; }, @@ -1455,44 +1592,57 @@ export const DescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto(); + 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; }, @@ -1528,26 +1678,31 @@ export const DescriptorProto = { 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, @@ -1555,13 +1710,16 @@ export const DescriptorProto = { } 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, @@ -1569,11 +1727,13 @@ export const DescriptorProto = { } else { obj.reservedRange = []; } + if (message.reservedName) { obj.reservedName = message.reservedName.map((e) => e); } else { obj.reservedName = []; } + return obj; }, @@ -1599,7 +1759,11 @@ export const DescriptorProto = { }; function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { start: 0, end: 0, options: undefined }; + return { + start: 0, + end: 0, + options: undefined, + }; } export const DescriptorProto_ExtensionRange = { @@ -1607,12 +1771,15 @@ export const DescriptorProto_ExtensionRange = { 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; }, @@ -1620,23 +1787,29 @@ export const DescriptorProto_ExtensionRange = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_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; }, @@ -1672,7 +1845,10 @@ export const DescriptorProto_ExtensionRange = { }; function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { start: 0, end: 0 }; + return { + start: 0, + end: 0, + }; } export const DescriptorProto_ReservedRange = { @@ -1680,9 +1856,11 @@ export const DescriptorProto_ReservedRange = { if (message.start !== 0) { writer.uint32(8).int32(message.start); } + if (message.end !== 0) { writer.uint32(16).int32(message.end); } + return writer; }, @@ -1690,20 +1868,25 @@ export const DescriptorProto_ReservedRange = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_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; }, @@ -1732,7 +1915,9 @@ export const DescriptorProto_ReservedRange = { }; function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpretedOption: [] }; + return { + uninterpretedOption: [], + }; } export const ExtensionRangeOptions = { @@ -1740,6 +1925,7 @@ export const ExtensionRangeOptions = { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } + return writer; }, @@ -1747,17 +1933,21 @@ export const ExtensionRangeOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseExtensionRangeOptions(); + 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; }, @@ -1771,6 +1961,7 @@ export const ExtensionRangeOptions = { toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; + if (message.uninterpretedOption) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined, @@ -1778,6 +1969,7 @@ export const ExtensionRangeOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -1793,15 +1985,14 @@ function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", number: 0, - label: 1, - type: 1, + label: 0, + type: 0, typeName: "", extendee: "", defaultValue: "", oneofIndex: 0, jsonName: "", options: undefined, - proto3Optional: false, }; } @@ -1810,36 +2001,43 @@ export const FieldDescriptorProto = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.number !== 0) { writer.uint32(24).int32(message.number); } - if (message.label !== 1) { + + if (message.label !== 0) { writer.uint32(32).int32(message.label); } - if (message.type !== 1) { + + if (message.type !== 0) { 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(); } - if (message.proto3Optional === true) { - writer.uint32(136).bool(message.proto3Optional); - } + return writer; }, @@ -1847,47 +2045,57 @@ export const FieldDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFieldDescriptorProto(); + 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; - case 17: - message.proto3Optional = reader.bool(); - break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1895,15 +2103,14 @@ export const FieldDescriptorProto = { return { name: isSet(object.name) ? String(object.name) : "", number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, + label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 0, + type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 0, typeName: isSet(object.typeName) ? String(object.typeName) : "", extendee: isSet(object.extendee) ? String(object.extendee) : "", defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, - proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, }; }, @@ -1920,7 +2127,6 @@ export const FieldDescriptorProto = { message.jsonName !== undefined && (obj.jsonName = message.jsonName); message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined); - message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); return obj; }, @@ -1928,8 +2134,8 @@ export const FieldDescriptorProto = { const message = createBaseFieldDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; - message.label = object.label ?? 1; - message.type = object.type ?? 1; + message.label = object.label ?? 0; + message.type = object.type ?? 0; message.typeName = object.typeName ?? ""; message.extendee = object.extendee ?? ""; message.defaultValue = object.defaultValue ?? ""; @@ -1939,13 +2145,15 @@ export const FieldDescriptorProto = { object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; - message.proto3Optional = object.proto3Optional ?? false; return message; }, }; function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { name: "", options: undefined }; + return { + name: "", + options: undefined, + }; } export const OneofDescriptorProto = { @@ -1953,9 +2161,11 @@ export const OneofDescriptorProto = { if (message.name !== "") { writer.uint32(10).string(message.name); } + if (message.options !== undefined) { OneofOptions.encode(message.options, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1963,20 +2173,25 @@ export const OneofDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOneofDescriptorProto(); + 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; }, @@ -2007,7 +2222,13 @@ export const OneofDescriptorProto = { }; function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; + return { + name: "", + value: [], + options: undefined, + reservedRange: [], + reservedName: [], + }; } export const EnumDescriptorProto = { @@ -2015,18 +2236,23 @@ export const EnumDescriptorProto = { 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; }, @@ -2034,29 +2260,37 @@ export const EnumDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumDescriptorProto(); + 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; }, @@ -2077,13 +2311,16 @@ export const EnumDescriptorProto = { 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, @@ -2091,11 +2328,13 @@ export const EnumDescriptorProto = { } else { obj.reservedRange = []; } + if (message.reservedName) { obj.reservedName = message.reservedName.map((e) => e); } else { obj.reservedName = []; } + return obj; }, @@ -2115,7 +2354,10 @@ export const EnumDescriptorProto = { }; function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { start: 0, end: 0 }; + return { + start: 0, + end: 0, + }; } export const EnumDescriptorProto_EnumReservedRange = { @@ -2126,9 +2368,11 @@ export const EnumDescriptorProto_EnumReservedRange = { if (message.start !== 0) { writer.uint32(8).int32(message.start); } + if (message.end !== 0) { writer.uint32(16).int32(message.end); } + return writer; }, @@ -2136,20 +2380,25 @@ export const EnumDescriptorProto_EnumReservedRange = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumDescriptorProto_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; }, @@ -2178,7 +2427,11 @@ export const EnumDescriptorProto_EnumReservedRange = { }; function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { name: "", number: 0, options: undefined }; + return { + name: "", + number: 0, + options: undefined, + }; } export const EnumValueDescriptorProto = { @@ -2186,12 +2439,15 @@ export const EnumValueDescriptorProto = { 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; }, @@ -2199,23 +2455,29 @@ export const EnumValueDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumValueDescriptorProto(); + 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; }, @@ -2251,7 +2513,11 @@ export const EnumValueDescriptorProto = { }; function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { name: "", method: [], options: undefined }; + return { + name: "", + method: [], + options: undefined, + }; } export const ServiceDescriptorProto = { @@ -2259,12 +2525,15 @@ export const ServiceDescriptorProto = { 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; }, @@ -2272,23 +2541,29 @@ export const ServiceDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceDescriptorProto(); + 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; }, @@ -2305,11 +2580,13 @@ export const ServiceDescriptorProto = { 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; @@ -2343,21 +2620,27 @@ export const MethodDescriptorProto = { 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; }, @@ -2365,32 +2648,41 @@ export const MethodDescriptorProto = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMethodDescriptorProto(); + 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; }, @@ -2439,7 +2731,7 @@ function createBaseFileOptions(): FileOptions { javaMultipleFiles: false, javaGenerateEqualsAndHash: false, javaStringCheckUtf8: false, - optimizeFor: 1, + optimizeFor: 0, goPackage: "", ccGenericServices: false, javaGenericServices: false, @@ -2463,66 +2755,87 @@ export const FileOptions = { 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) { + + if (message.optimizeFor !== 0) { 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; }, @@ -2530,77 +2843,101 @@ export const FileOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileOptions(); + 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; }, @@ -2613,7 +2950,7 @@ export const FileOptions = { ? Boolean(object.javaGenerateEqualsAndHash) : false, javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, - optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, + optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 0, goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, @@ -2658,6 +2995,7 @@ export const FileOptions = { 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, @@ -2665,6 +3003,7 @@ export const FileOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -2675,7 +3014,7 @@ export const FileOptions = { message.javaMultipleFiles = object.javaMultipleFiles ?? false; message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 1; + message.optimizeFor = object.optimizeFor ?? 0; message.goPackage = object.goPackage ?? ""; message.ccGenericServices = object.ccGenericServices ?? false; message.javaGenericServices = object.javaGenericServices ?? false; @@ -2711,18 +3050,23 @@ export const MessageOptions = { 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; }, @@ -2730,29 +3074,37 @@ export const MessageOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessageOptions(); + 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; }, @@ -2777,6 +3129,7 @@ export const MessageOptions = { (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, @@ -2784,6 +3137,7 @@ export const MessageOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -2816,24 +3170,31 @@ export const FieldOptions = { 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; }, @@ -2841,35 +3202,45 @@ export const FieldOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFieldOptions(); + 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; }, @@ -2895,6 +3266,7 @@ export const FieldOptions = { 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, @@ -2902,6 +3274,7 @@ export const FieldOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -2920,7 +3293,9 @@ export const FieldOptions = { }; function createBaseOneofOptions(): OneofOptions { - return { uninterpretedOption: [] }; + return { + uninterpretedOption: [], + }; } export const OneofOptions = { @@ -2928,6 +3303,7 @@ export const OneofOptions = { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } + return writer; }, @@ -2935,17 +3311,21 @@ export const OneofOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOneofOptions(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 999: message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -2959,6 +3339,7 @@ export const OneofOptions = { toJSON(message: OneofOptions): unknown { const obj: any = {}; + if (message.uninterpretedOption) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined, @@ -2966,6 +3347,7 @@ export const OneofOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -2978,7 +3360,11 @@ export const OneofOptions = { }; function createBaseEnumOptions(): EnumOptions { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; + return { + allowAlias: false, + deprecated: false, + uninterpretedOption: [], + }; } export const EnumOptions = { @@ -2986,12 +3372,15 @@ export const EnumOptions = { 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; }, @@ -2999,23 +3388,29 @@ export const EnumOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumOptions(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: 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; }, @@ -3033,6 +3428,7 @@ export const EnumOptions = { 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, @@ -3040,6 +3436,7 @@ export const EnumOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -3054,7 +3451,10 @@ export const EnumOptions = { }; function createBaseEnumValueOptions(): EnumValueOptions { - return { deprecated: false, uninterpretedOption: [] }; + return { + deprecated: false, + uninterpretedOption: [], + }; } export const EnumValueOptions = { @@ -3062,9 +3462,11 @@ export const EnumValueOptions = { 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; }, @@ -3072,20 +3474,25 @@ export const EnumValueOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumValueOptions(); + 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; }, @@ -3101,6 +3508,7 @@ export const EnumValueOptions = { 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, @@ -3108,6 +3516,7 @@ export const EnumValueOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -3121,7 +3530,10 @@ export const EnumValueOptions = { }; function createBaseServiceOptions(): ServiceOptions { - return { deprecated: false, uninterpretedOption: [] }; + return { + deprecated: false, + uninterpretedOption: [], + }; } export const ServiceOptions = { @@ -3129,9 +3541,11 @@ export const ServiceOptions = { 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; }, @@ -3139,20 +3553,25 @@ export const ServiceOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceOptions(); + 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; }, @@ -3168,6 +3587,7 @@ export const ServiceOptions = { 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, @@ -3175,6 +3595,7 @@ export const ServiceOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -3188,7 +3609,11 @@ export const ServiceOptions = { }; function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; + return { + deprecated: false, + idempotencyLevel: 0, + uninterpretedOption: [], + }; } export const MethodOptions = { @@ -3196,12 +3621,15 @@ export const MethodOptions = { 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; }, @@ -3209,23 +3637,29 @@ export const MethodOptions = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMethodOptions(); + 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; }, @@ -3246,6 +3680,7 @@ export const MethodOptions = { 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, @@ -3253,6 +3688,7 @@ export const MethodOptions = { } else { obj.uninterpretedOption = []; } + return obj; }, @@ -3283,24 +3719,31 @@ export const UninterpretedOption = { 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.isZero()) { writer.uint32(32).uint64(message.positiveIntValue); } + if (!message.negativeIntValue.isZero()) { 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; }, @@ -3308,35 +3751,45 @@ export const UninterpretedOption = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUninterpretedOption(); + 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 = reader.uint64() as Long; break; + case 5: message.negativeIntValue = 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; }, @@ -3346,8 +3799,10 @@ export const UninterpretedOption = { ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? Long.fromValue(object.positiveIntValue) : Long.UZERO, - negativeIntValue: isSet(object.negativeIntValue) ? Long.fromValue(object.negativeIntValue) : Long.ZERO, + positiveIntValue: isSet(object.positiveIntValue) + ? Long.fromString(object.positiveIntValue) + : Long.UZERO, + negativeIntValue: isSet(object.negativeIntValue) ? Long.fromString(object.negativeIntValue) : Long.ZERO, doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(), aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", @@ -3356,11 +3811,13 @@ export const UninterpretedOption = { 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 || Long.UZERO).toString()); @@ -3395,7 +3852,10 @@ export const UninterpretedOption = { }; function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { namePart: "", isExtension: false }; + return { + namePart: "", + isExtension: false, + }; } export const UninterpretedOption_NamePart = { @@ -3403,9 +3863,11 @@ export const UninterpretedOption_NamePart = { if (message.namePart !== "") { writer.uint32(10).string(message.namePart); } + if (message.isExtension === true) { writer.uint32(16).bool(message.isExtension); } + return writer; }, @@ -3413,20 +3875,25 @@ export const UninterpretedOption_NamePart = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUninterpretedOption_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; }, @@ -3455,7 +3922,9 @@ export const UninterpretedOption_NamePart = { }; function createBaseSourceCodeInfo(): SourceCodeInfo { - return { location: [] }; + return { + location: [], + }; } export const SourceCodeInfo = { @@ -3463,6 +3932,7 @@ export const SourceCodeInfo = { for (const v of message.location) { SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -3470,17 +3940,21 @@ export const SourceCodeInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSourceCodeInfo(); + 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; }, @@ -3494,11 +3968,13 @@ export const SourceCodeInfo = { 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; }, @@ -3510,30 +3986,44 @@ export const SourceCodeInfo = { }; function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { - return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] }; + return { + path: [], + span: [], + leadingComments: "", + trailingComments: "", + leadingDetachedComments: [], + }; } export const SourceCodeInfo_Location = { encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.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; }, @@ -3541,43 +4031,55 @@ export const SourceCodeInfo_Location = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSourceCodeInfo_Location(); + 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; }, @@ -3595,23 +4097,28 @@ export const SourceCodeInfo_Location = { toJSON(message: SourceCodeInfo_Location): unknown { const obj: any = {}; + if (message.path) { obj.path = message.path.map((e) => Math.round(e)); } else { obj.path = []; } + if (message.span) { obj.span = message.span.map((e) => Math.round(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; }, @@ -3627,7 +4134,9 @@ export const SourceCodeInfo_Location = { }; function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { annotation: [] }; + return { + annotation: [], + }; } export const GeneratedCodeInfo = { @@ -3635,6 +4144,7 @@ export const GeneratedCodeInfo = { for (const v of message.annotation) { GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -3642,17 +4152,21 @@ export const GeneratedCodeInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGeneratedCodeInfo(); + 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; }, @@ -3666,6 +4180,7 @@ export const GeneratedCodeInfo = { toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; + if (message.annotation) { obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined, @@ -3673,6 +4188,7 @@ export const GeneratedCodeInfo = { } else { obj.annotation = []; } + return obj; }, @@ -3684,25 +4200,36 @@ export const GeneratedCodeInfo = { }; function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { path: [], sourceFile: "", begin: 0, end: 0 }; + return { + path: [], + sourceFile: "", + begin: 0, + end: 0, + }; } export const GeneratedCodeInfo_Annotation = { encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.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; }, @@ -3710,33 +4237,42 @@ export const GeneratedCodeInfo_Annotation = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGeneratedCodeInfo_Annotation(); + 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; }, @@ -3751,11 +4287,13 @@ export const GeneratedCodeInfo_Annotation = { toJSON(message: GeneratedCodeInfo_Annotation): unknown { const obj: any = {}; + if (message.path) { obj.path = message.path.map((e) => Math.round(e)); } else { obj.path = []; } + message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); message.begin !== undefined && (obj.begin = Math.round(message.begin)); message.end !== undefined && (obj.end = Math.round(message.end)); @@ -3773,75 +4311,3 @@ export const GeneratedCodeInfo_Annotation = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index be8e0f61..89299988 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../helpers"; 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 @@ -26,7 +23,7 @@ export const protobufPackage = "google.protobuf"; * if (duration.seconds < 0 && duration.nanos > 0) { * duration.seconds += 1; * duration.nanos -= 1000000000; - * } else if (duration.seconds > 0 && duration.nanos < 0) { + * } else if (durations.seconds > 0 && duration.nanos < 0) { * duration.seconds -= 1; * duration.nanos += 1000000000; * } @@ -64,6 +61,7 @@ export const protobufPackage = "google.protobuf"; * 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 @@ -79,11 +77,15 @@ export interface Duration { * of the same sign as the `seconds` field. Must be from -999,999,999 * to +999,999,999 inclusive. */ + nanos: number; } function createBaseDuration(): Duration { - return { seconds: Long.ZERO, nanos: 0 }; + return { + seconds: Long.ZERO, + nanos: 0, + }; } export const Duration = { @@ -91,9 +93,11 @@ export const Duration = { if (!message.seconds.isZero()) { writer.uint32(8).int64(message.seconds); } + if (message.nanos !== 0) { writer.uint32(16).int32(message.nanos); } + return writer; }, @@ -101,26 +105,31 @@ export const Duration = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDuration(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.seconds = reader.int64() as Long; break; + case 2: message.nanos = reader.int32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Duration { return { - seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, + seconds: isSet(object.seconds) ? Long.fromString(object.seconds) : Long.ZERO, nanos: isSet(object.nanos) ? Number(object.nanos) : 0, }; }, @@ -140,31 +149,3 @@ export const Duration = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index a30ec047..54d4d1a9 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,9 +1,6 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "google.protobuf"; - /** * A Timestamp represents a point in time independent of any time zone or local * calendar, encoded as a count of seconds and fractions of seconds at @@ -55,15 +52,8 @@ export const protobufPackage = "google.protobuf"; * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) * .setNanos((int) ((millis % 1000) * 1000000)).build(); * - * Example 5: Compute Timestamp from Java `Instant.now()`. - * - * Instant now = Instant.now(); * - * Timestamp timestamp = - * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - * .setNanos(now.getNano()).build(); - * - * Example 6: Compute Timestamp from current time in Python. + * Example 5: Compute Timestamp from current time in Python. * * timestamp = Timestamp() * timestamp.GetCurrentTime() @@ -95,6 +85,7 @@ export const protobufPackage = "google.protobuf"; * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D * ) to obtain a formatter capable of generating timestamps in this format. */ + export interface Timestamp { /** * Represents seconds of UTC time since Unix epoch @@ -108,11 +99,15 @@ export interface Timestamp { * that count forward in time. Must be from 0 to 999,999,999 * inclusive. */ + nanos: number; } function createBaseTimestamp(): Timestamp { - return { seconds: Long.ZERO, nanos: 0 }; + return { + seconds: Long.ZERO, + nanos: 0, + }; } export const Timestamp = { @@ -120,9 +115,11 @@ export const Timestamp = { if (!message.seconds.isZero()) { writer.uint32(8).int64(message.seconds); } + if (message.nanos !== 0) { writer.uint32(16).int32(message.nanos); } + return writer; }, @@ -130,26 +127,31 @@ export const Timestamp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTimestamp(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.seconds = reader.int64() as Long; break; + case 2: message.nanos = reader.int32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Timestamp { return { - seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, + seconds: isSet(object.seconds) ? Long.fromString(object.seconds) : Long.ZERO, nanos: isSet(object.nanos) ? Number(object.nanos) : 0, }; }, @@ -169,31 +171,3 @@ export const Timestamp = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/helpers.ts b/src/helpers.ts new file mode 100644 index 00000000..c1561d56 --- /dev/null +++ b/src/helpers.ts @@ -0,0 +1,231 @@ +/** + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.38.1 + * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain + * and run the transpile command or yarn proto command to regenerate this bundle. + */ + +import * as _m0 from "protobufjs/minimal"; +import Long from "long"; + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + + _m0.configure(); +} + +export { Long }; + +declare var self: any | undefined; +declare var window: any | undefined; +declare var global: 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")); + +export 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")); + +export function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return btoa(bin.join("")); +} + +export interface AminoHeight { + readonly revision_number?: string; + readonly revision_height?: string; +} + +export function omitDefault(input: T): T | undefined { + if (typeof input === "string") { + return input === "" ? undefined : input; + } + + if (typeof input === "number") { + return input === 0 ? undefined : input; + } + + if (Long.isLong(input)) { + return input.isZero() ? undefined : input; + } + + throw new Error(`Got unsupported type ${typeof input}`); +} + +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: Long; + /** + * 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 function toDuration(duration: string): Duration { + return { + seconds: Long.fromNumber(Math.floor(parseInt(duration) / 1000000000)), + nanos: parseInt(duration) % 1000000000, + }; +} + +export function fromDuration(duration: Duration): string { + return (parseInt(duration.seconds) * 1000000000 + duration.nanos).toString(); +} + +export function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +export function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +export interface PageRequest { + key: Uint8Array; + offset: Long; + limit: Long; + countTotal: boolean; + reverse: boolean; +} + +export interface PageRequestParams { + "pagination.key"?: string; + "pagination.offset"?: string; + "pagination.limit"?: string; + "pagination.count_total"?: boolean; + "pagination.reverse"?: boolean; +} + +export interface Params { + params: PageRequestParams; +} + +export const setPaginationParams = (options: Params, pagination?: PageRequest) => { + if (!pagination) { + return options; + } + + if (typeof pagination?.countTotal !== "undefined") { + options.params["pagination.count_total"] = pagination.countTotal; + } + if (typeof pagination?.key !== "undefined") { + // String to Uint8Array + // let uint8arr = new Uint8Array(Buffer.from(data,'base64')); + + // Uint8Array to String + options.params["pagination.key"] = Buffer.from(pagination.key).toString("base64"); + } + if (typeof pagination?.offset !== "undefined") { + options.params["pagination.limit"] = Long.toString(pagination.limit); + } + if (typeof pagination?.limit !== "undefined") { + options.params["pagination.offset"] = Long.toString(pagination.offset); + } + if (typeof pagination?.reverse !== "undefined") { + options.params["pagination.reverse"] = pagination.reverse; + } + + return options; +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin + ? P + : P & { [K in keyof P]: Exact } & Record>, never>; + +export interface Rpc { + request(service: string, method: string, data: Uint8Array): Promise; +} + +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: Long; + /** + * 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 function toTimestamp(date: Date): Timestamp { + const seconds = numberToLong(date.getTime() / 1_000); + const nanos = (date.getTime() % 1000) * 1000000; + return { + seconds, + nanos, + }; +} + +export function fromTimestamp(t: Timestamp): Date { + let millis = t.seconds.toNumber() * 1000; + millis += t.nanos / 1000000; + return new Date(millis); +} + +const fromJSON = (object: any): Timestamp => { + return { + seconds: isSet(object.seconds) ? Long.fromString(object.seconds) : Long.ZERO, + nanos: isSet(object.nanos) ? Number(object.nanos) : 0, + }; +}; + +export function fromJsonTimestamp(o: any): Date { + if (o instanceof Date) { + return o; + } else if (typeof o === "string") { + return new Date(o); + } else { + return fromTimestamp(fromJSON(o)); + } +} + +function numberToLong(number: number) { + return Long.fromNumber(number); +} diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index 4ce080d2..aba4fba7 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,19 +1,21 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { DenomTrace, Params } from "./transfer"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; - /** GenesisState defines the ibc-transfer genesis state */ + export interface GenesisState { portId: string; denomTraces: DenomTrace[]; - params?: Params; + params: Params; } function createBaseGenesisState(): GenesisState { - return { portId: "", denomTraces: [], params: undefined }; + return { + portId: "", + denomTraces: [], + params: undefined, + }; } export const GenesisState = { @@ -21,12 +23,15 @@ export const GenesisState = { 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; }, @@ -34,23 +39,29 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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; }, @@ -67,11 +78,13 @@ export const GenesisState = { 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; }, @@ -85,31 +98,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index d720f68d..4d48a1c6 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,60 +1,61 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; 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; + denomTrace: DenomTrace; } - /** * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC * method */ + export interface QueryDenomTracesRequest { /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; } - /** * 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; } - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; + params: Params; } function createBaseQueryDenomTraceRequest(): QueryDenomTraceRequest { - return { hash: "" }; + return { + hash: "", + }; } export const QueryDenomTraceRequest = { @@ -62,6 +63,7 @@ export const QueryDenomTraceRequest = { if (message.hash !== "") { writer.uint32(10).string(message.hash); } + return writer; }, @@ -69,22 +71,28 @@ export const QueryDenomTraceRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomTraceRequest(); + 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 { - return { hash: isSet(object.hash) ? String(object.hash) : "" }; + return { + hash: isSet(object.hash) ? String(object.hash) : "", + }; }, toJSON(message: QueryDenomTraceRequest): unknown { @@ -101,7 +109,9 @@ export const QueryDenomTraceRequest = { }; function createBaseQueryDenomTraceResponse(): QueryDenomTraceResponse { - return { denomTrace: undefined }; + return { + denomTrace: undefined, + }; } export const QueryDenomTraceResponse = { @@ -109,6 +119,7 @@ export const QueryDenomTraceResponse = { if (message.denomTrace !== undefined) { DenomTrace.encode(message.denomTrace, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -116,22 +127,28 @@ export const QueryDenomTraceResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomTraceResponse(); + 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 { - return { denomTrace: isSet(object.denomTrace) ? DenomTrace.fromJSON(object.denomTrace) : undefined }; + return { + denomTrace: isSet(object.denomTrace) ? DenomTrace.fromJSON(object.denomTrace) : undefined, + }; }, toJSON(message: QueryDenomTraceResponse): unknown { @@ -152,7 +169,9 @@ export const QueryDenomTraceResponse = { }; function createBaseQueryDenomTracesRequest(): QueryDenomTracesRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryDenomTracesRequest = { @@ -160,6 +179,7 @@ export const QueryDenomTracesRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -167,22 +187,28 @@ export const QueryDenomTracesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomTracesRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryDenomTracesRequest): unknown { @@ -203,7 +229,10 @@ export const QueryDenomTracesRequest = { }; function createBaseQueryDenomTracesResponse(): QueryDenomTracesResponse { - return { denomTraces: [], pagination: undefined }; + return { + denomTraces: [], + pagination: undefined, + }; } export const QueryDenomTracesResponse = { @@ -211,9 +240,11 @@ export const QueryDenomTracesResponse = { 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; }, @@ -221,20 +252,25 @@ export const QueryDenomTracesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomTracesResponse(); + 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; }, @@ -249,11 +285,13 @@ export const QueryDenomTracesResponse = { 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; @@ -285,14 +323,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -312,7 +353,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -320,6 +363,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -327,22 +371,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -358,72 +408,47 @@ export const QueryParamsResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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; -} + /*DenomTrace queries a denomination trace information.*/ + DenomTraces(request?: QueryDenomTracesRequest): Promise; + /*DenomTraces queries all denomination traces.*/ + + Params(request?: QueryParamsRequest): Promise; + /*Params queries all parameters of the ibc-transfer module.*/ +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.DenomTrace = this.DenomTrace.bind(this); this.DenomTraces = this.DenomTraces.bind(this); this.Params = this.Params.bind(this); } + 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 _m0.Reader(data))); } - DenomTraces(request: QueryDenomTracesRequest): Promise { + DenomTraces( + request: QueryDenomTracesRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); } - Params(request: QueryParamsRequest): Promise { + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index cd0aba0e..a801cbe2 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,13 +1,11 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; - /** * 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 @@ -15,15 +13,16 @@ export interface DenomTrace { */ 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 @@ -34,11 +33,15 @@ export interface Params { * receive_enabled enables or disables all cross-chain token transfers to this * chain. */ + receiveEnabled: boolean; } function createBaseDenomTrace(): DenomTrace { - return { path: "", baseDenom: "" }; + return { + path: "", + baseDenom: "", + }; } export const DenomTrace = { @@ -46,9 +49,11 @@ export const DenomTrace = { if (message.path !== "") { writer.uint32(10).string(message.path); } + if (message.baseDenom !== "") { writer.uint32(18).string(message.baseDenom); } + return writer; }, @@ -56,20 +61,25 @@ export const DenomTrace = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDenomTrace(); + 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; }, @@ -96,7 +106,10 @@ export const DenomTrace = { }; function createBaseParams(): Params { - return { sendEnabled: false, receiveEnabled: false }; + return { + sendEnabled: false, + receiveEnabled: false, + }; } export const Params = { @@ -104,9 +117,11 @@ export const Params = { if (message.sendEnabled === true) { writer.uint32(8).bool(message.sendEnabled); } + if (message.receiveEnabled === true) { writer.uint32(16).bool(message.receiveEnabled); } + return writer; }, @@ -114,20 +129,25 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + 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; }, @@ -152,31 +172,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index 72875081..6a0fdd08 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,40 +1,44 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; 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/ibc/tree/master/spec/app/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; + + token: Coin; /** 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; + + timeoutHeight: Height; /** * Timeout timestamp (in nanoseconds) relative to the current block timestamp. * The timeout is disabled when set to 0. */ + timeoutTimestamp: Long; } - /** MsgTransferResponse defines the Msg/Transfer response type. */ + export interface MsgTransferResponse {} function createBaseMsgTransfer(): MsgTransfer { @@ -54,24 +58,31 @@ export const MsgTransfer = { 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.isZero()) { writer.uint32(56).uint64(message.timeoutTimestamp); } + return writer; }, @@ -79,35 +90,45 @@ export const MsgTransfer = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTransfer(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -119,7 +140,9 @@ export const MsgTransfer = { sender: isSet(object.sender) ? String(object.sender) : "", receiver: isSet(object.receiver) ? String(object.receiver) : "", timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) + ? Long.fromString(object.timeoutTimestamp) + : Long.UZERO, }; }, @@ -170,14 +193,17 @@ export const MsgTransferResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTransferResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -195,54 +221,23 @@ export const MsgTransferResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** Msg defines the ibc/transfer Msg service. */ export interface Msg { - /** Transfer defines a rpc handler method for MsgTransfer. */ Transfer(request: MsgTransfer): Promise; + /*Transfer defines a rpc handler method for MsgTransfer.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Transfer = this.Transfer.bind(this); } + 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 _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index cf506df3..3fe5a5ea 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,27 +1,33 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v2"; - /** * FungibleTokenPacketData defines a struct for the packet payload * See FungibleTokenPacketData spec: * https://github.com/cosmos/ibc/tree/master/spec/app/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: string; /** the sender address */ + sender: string; /** the recipient address on the destination chain */ + receiver: string; } function createBaseFungibleTokenPacketData(): FungibleTokenPacketData { - return { denom: "", amount: "", sender: "", receiver: "" }; + return { + denom: "", + amount: "", + sender: "", + receiver: "", + }; } export const FungibleTokenPacketData = { @@ -29,15 +35,19 @@ export const FungibleTokenPacketData = { if (message.denom !== "") { writer.uint32(10).string(message.denom); } + if (message.amount !== "") { writer.uint32(18).string(message.amount); } + if (message.sender !== "") { writer.uint32(26).string(message.sender); } + if (message.receiver !== "") { writer.uint32(34).string(message.receiver); } + return writer; }, @@ -45,26 +55,33 @@ export const FungibleTokenPacketData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFungibleTokenPacketData(); + 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; + case 3: message.sender = reader.string(); break; + case 4: message.receiver = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -95,31 +112,3 @@ export const FungibleTokenPacketData = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index 4192b875..3ecb70c8 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,176 +1,201 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Height } from "../../client/v1/client"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; 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. + * 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. + * 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"; - case State.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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. + * 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"; - case Order.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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; + + counterparty: Counterparty; /** * 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; + + counterparty: Counterparty; /** * 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 @@ -179,38 +204,47 @@ export interface Packet { */ sequence: Long; /** 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; + + timeoutHeight: Height; /** block timestamp (in nanoseconds) after which the packet times out */ + timeoutTimestamp: Long; } - /** * 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: Long; /** embedded data that represents packet state. */ + data: Uint8Array; } - /** * Acknowledgement is the recommended acknowledgement format to be used by * app-specific protocols. @@ -220,13 +254,20 @@ export interface PacketState { * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope */ + export interface Acknowledgement { - result: Uint8Array | undefined; - error: string | undefined; + result?: Uint8Array; + error?: string; } function createBaseChannel(): Channel { - return { state: 0, ordering: 0, counterparty: undefined, connectionHops: [], version: "" }; + return { + state: 0, + ordering: 0, + counterparty: undefined, + connectionHops: [], + version: "", + }; } export const Channel = { @@ -234,18 +275,23 @@ export const Channel = { 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; }, @@ -253,29 +299,37 @@ export const Channel = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseChannel(); + 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; }, @@ -297,11 +351,13 @@ export const Channel = { 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; }, @@ -337,24 +393,31 @@ export const IdentifiedChannel = { 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; }, @@ -362,35 +425,45 @@ export const IdentifiedChannel = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIdentifiedChannel(); + 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; }, @@ -414,11 +487,13 @@ export const IdentifiedChannel = { 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); @@ -442,7 +517,10 @@ export const IdentifiedChannel = { }; function createBaseCounterparty(): Counterparty { - return { portId: "", channelId: "" }; + return { + portId: "", + channelId: "", + }; } export const Counterparty = { @@ -450,9 +528,11 @@ export const Counterparty = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + return writer; }, @@ -460,20 +540,25 @@ export const Counterparty = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCounterparty(); + 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; }, @@ -517,27 +602,35 @@ export const Packet = { if (!message.sequence.isZero()) { 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.isZero()) { writer.uint32(64).uint64(message.timeoutTimestamp); } + return writer; }, @@ -545,51 +638,64 @@ export const Packet = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacket(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sequence = 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Packet { return { - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : "", sourceChannel: isSet(object.sourceChannel) ? String(object.sourceChannel) : "", destinationPort: isSet(object.destinationPort) ? String(object.destinationPort) : "", destinationChannel: isSet(object.destinationChannel) ? String(object.destinationChannel) : "", data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) + ? Long.fromString(object.timeoutTimestamp) + : Long.UZERO, }; }, @@ -633,7 +739,12 @@ export const Packet = { }; function createBasePacketState(): PacketState { - return { portId: "", channelId: "", sequence: Long.UZERO, data: new Uint8Array() }; + return { + portId: "", + channelId: "", + sequence: Long.UZERO, + data: new Uint8Array(), + }; } export const PacketState = { @@ -641,15 +752,19 @@ export const PacketState = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + if (message.data.length !== 0) { writer.uint32(34).bytes(message.data); } + return writer; }, @@ -657,26 +772,33 @@ export const PacketState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacketState(); + 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 = reader.uint64() as Long; break; + case 4: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -684,7 +806,7 @@ export const PacketState = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), }; }, @@ -713,7 +835,10 @@ export const PacketState = { }; function createBaseAcknowledgement(): Acknowledgement { - return { result: undefined, error: undefined }; + return { + result: undefined, + error: undefined, + }; } export const Acknowledgement = { @@ -721,9 +846,11 @@ export const Acknowledgement = { if (message.result !== undefined) { writer.uint32(170).bytes(message.result); } + if (message.error !== undefined) { writer.uint32(178).string(message.error); } + return writer; }, @@ -731,20 +858,25 @@ export const Acknowledgement = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAcknowledgement(); + 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; }, @@ -770,75 +902,3 @@ export const Acknowledgement = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 85c82a07..9496dae6 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,11 +1,9 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { IdentifiedChannel, PacketState } from "./channel"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; - /** GenesisState defines the ibc channel submodule's genesis state. */ + export interface GenesisState { channels: IdentifiedChannel[]; acknowledgements: PacketState[]; @@ -15,13 +13,14 @@ export interface GenesisState { recvSequences: PacketSequence[]; ackSequences: PacketSequence[]; /** the sequence for the next generated channel identifier */ + nextChannelSequence: Long; } - /** * PacketSequence defines the genesis type necessary to retrieve and store * next send and receive sequences. */ + export interface PacketSequence { portId: string; channelId: string; @@ -46,27 +45,35 @@ export const GenesisState = { 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.isZero()) { writer.uint32(64).uint64(message.nextChannelSequence); } + return writer; }, @@ -74,38 +81,49 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -133,48 +151,56 @@ export const GenesisState = { ? object.ackSequences.map((e: any) => PacketSequence.fromJSON(e)) : [], nextChannelSequence: isSet(object.nextChannelSequence) - ? Long.fromValue(object.nextChannelSequence) + ? Long.fromString(object.nextChannelSequence) : Long.UZERO, }; }, 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 || Long.UZERO).toString()); return obj; @@ -198,7 +224,11 @@ export const GenesisState = { }; function createBasePacketSequence(): PacketSequence { - return { portId: "", channelId: "", sequence: Long.UZERO }; + return { + portId: "", + channelId: "", + sequence: Long.UZERO, + }; } export const PacketSequence = { @@ -206,12 +236,15 @@ export const PacketSequence = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -219,23 +252,29 @@ export const PacketSequence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacketSequence(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -243,7 +282,7 @@ export const PacketSequence = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -266,31 +305,3 @@ export const PacketSequence = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 6f101acb..817382fe 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,336 +1,384 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; - +import { Height, IdentifiedClientState } from "../../client/v1/client"; +import { Any } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; 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; + channel: Channel; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** QueryChannelsRequest is the request type for the Query/Channels RPC method */ + export interface QueryChannelsRequest { /** pagination request */ pagination?: PageRequest; } - /** 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; /** query block height */ - height?: Height; -} + height: Height; +} /** * QueryConnectionChannelsRequest is the request type for the * Query/QueryConnectionChannels RPC method */ + export interface QueryConnectionChannelsRequest { /** connection unique identifier */ connection: string; /** pagination request */ + pagination?: PageRequest; } - /** * 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; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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; + identifiedClientState: IdentifiedClientState; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * 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: Long; /** revision height of the consensus state */ + revisionHeight: Long; } - /** * QueryChannelClientStateResponse is the Response type for the * Query/QueryChannelClientState RPC method */ + export interface QueryChannelConsensusStateResponse { /** consensus state associated with the channel */ - consensusState?: Any; + consensusState: Any; /** client ID associated with the consensus state */ + clientId: string; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * 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: Long; } - /** * 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; -} + proofHeight: Height; +} /** * 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; } - /** * QueryPacketCommitmentsResponse is the request type for the * Query/QueryPacketCommitments RPC method */ + export interface QueryPacketCommitmentsResponse { commitments: PacketState[]; /** pagination response */ + pagination?: PageResponse; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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: Long; } - /** * 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; -} + proofHeight: Height; +} /** * 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: Long; } - /** * 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; -} + proofHeight: Height; +} /** * 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; /** list of packet sequences */ - packetCommitmentSequences: Long[]; -} + packetCommitmentSequences?: Long[]; +} /** * QueryPacketAcknowledgemetsResponse is the request type for the * Query/QueryPacketAcknowledgements RPC method */ + export interface QueryPacketAcknowledgementsResponse { acknowledgements: PacketState[]; /** pagination response */ + pagination?: PageResponse; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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: Long[]; } - /** * QueryUnreceivedPacketsResponse is the response type for the * Query/UnreceivedPacketCommitments RPC method */ + export interface QueryUnreceivedPacketsResponse { /** list of unreceived packet sequences */ sequences: Long[]; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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: Long[]; } - /** * QueryUnreceivedAcksResponse is the response type for the * Query/UnreceivedAcks RPC method */ + export interface QueryUnreceivedAcksResponse { /** list of unreceived acknowledgement sequences */ sequences: Long[]; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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: Long; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; + + proofHeight: Height; } function createBaseQueryChannelRequest(): QueryChannelRequest { - return { portId: "", channelId: "" }; + return { + portId: "", + channelId: "", + }; } export const QueryChannelRequest = { @@ -338,9 +386,11 @@ export const QueryChannelRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + return writer; }, @@ -348,20 +398,25 @@ export const QueryChannelRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelRequest(); + 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; }, @@ -388,7 +443,11 @@ export const QueryChannelRequest = { }; function createBaseQueryChannelResponse(): QueryChannelResponse { - return { channel: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + channel: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryChannelResponse = { @@ -396,12 +455,15 @@ export const QueryChannelResponse = { 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; }, @@ -409,23 +471,29 @@ export const QueryChannelResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelResponse(); + 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; }, @@ -464,7 +532,9 @@ export const QueryChannelResponse = { }; function createBaseQueryChannelsRequest(): QueryChannelsRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryChannelsRequest = { @@ -472,6 +542,7 @@ export const QueryChannelsRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -479,22 +550,28 @@ export const QueryChannelsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelsRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryChannelsRequest): unknown { @@ -515,7 +592,11 @@ export const QueryChannelsRequest = { }; function createBaseQueryChannelsResponse(): QueryChannelsResponse { - return { channels: [], pagination: undefined, height: undefined }; + return { + channels: [], + pagination: undefined, + height: undefined, + }; } export const QueryChannelsResponse = { @@ -523,12 +604,15 @@ export const QueryChannelsResponse = { 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; }, @@ -536,23 +620,29 @@ export const QueryChannelsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelsResponse(); + 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; }, @@ -568,11 +658,13 @@ export const QueryChannelsResponse = { 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); @@ -593,7 +685,10 @@ export const QueryChannelsResponse = { }; function createBaseQueryConnectionChannelsRequest(): QueryConnectionChannelsRequest { - return { connection: "", pagination: undefined }; + return { + connection: "", + pagination: undefined, + }; } export const QueryConnectionChannelsRequest = { @@ -601,9 +696,11 @@ export const QueryConnectionChannelsRequest = { if (message.connection !== "") { writer.uint32(10).string(message.connection); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -611,20 +708,25 @@ export const QueryConnectionChannelsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionChannelsRequest(); + 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; }, @@ -657,7 +759,11 @@ export const QueryConnectionChannelsRequest = { }; function createBaseQueryConnectionChannelsResponse(): QueryConnectionChannelsResponse { - return { channels: [], pagination: undefined, height: undefined }; + return { + channels: [], + pagination: undefined, + height: undefined, + }; } export const QueryConnectionChannelsResponse = { @@ -665,12 +771,15 @@ export const QueryConnectionChannelsResponse = { 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; }, @@ -678,23 +787,29 @@ export const QueryConnectionChannelsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionChannelsResponse(); + 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; }, @@ -710,11 +825,13 @@ export const QueryConnectionChannelsResponse = { 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); @@ -737,7 +854,10 @@ export const QueryConnectionChannelsResponse = { }; function createBaseQueryChannelClientStateRequest(): QueryChannelClientStateRequest { - return { portId: "", channelId: "" }; + return { + portId: "", + channelId: "", + }; } export const QueryChannelClientStateRequest = { @@ -745,9 +865,11 @@ export const QueryChannelClientStateRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + return writer; }, @@ -755,20 +877,25 @@ export const QueryChannelClientStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelClientStateRequest(); + 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; }, @@ -797,7 +924,11 @@ export const QueryChannelClientStateRequest = { }; function createBaseQueryChannelClientStateResponse(): QueryChannelClientStateResponse { - return { identifiedClientState: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + identifiedClientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryChannelClientStateResponse = { @@ -805,12 +936,15 @@ export const QueryChannelClientStateResponse = { 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; }, @@ -818,23 +952,29 @@ export const QueryChannelClientStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelClientStateResponse(); + 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; }, @@ -879,7 +1019,12 @@ export const QueryChannelClientStateResponse = { }; function createBaseQueryChannelConsensusStateRequest(): QueryChannelConsensusStateRequest { - return { portId: "", channelId: "", revisionNumber: Long.UZERO, revisionHeight: Long.UZERO }; + return { + portId: "", + channelId: "", + revisionNumber: Long.UZERO, + revisionHeight: Long.UZERO, + }; } export const QueryChannelConsensusStateRequest = { @@ -887,15 +1032,19 @@ export const QueryChannelConsensusStateRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.revisionNumber.isZero()) { writer.uint32(24).uint64(message.revisionNumber); } + if (!message.revisionHeight.isZero()) { writer.uint32(32).uint64(message.revisionHeight); } + return writer; }, @@ -903,26 +1052,33 @@ export const QueryChannelConsensusStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelConsensusStateRequest(); + 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 = reader.uint64() as Long; break; + case 4: message.revisionHeight = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -930,8 +1086,8 @@ export const QueryChannelConsensusStateRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, }; }, @@ -965,7 +1121,12 @@ export const QueryChannelConsensusStateRequest = { }; function createBaseQueryChannelConsensusStateResponse(): QueryChannelConsensusStateResponse { - return { consensusState: undefined, clientId: "", proof: new Uint8Array(), proofHeight: undefined }; + return { + consensusState: undefined, + clientId: "", + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryChannelConsensusStateResponse = { @@ -973,15 +1134,19 @@ export const QueryChannelConsensusStateResponse = { 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; }, @@ -989,26 +1154,33 @@ export const QueryChannelConsensusStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryChannelConsensusStateResponse(); + 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; }, @@ -1052,7 +1224,11 @@ export const QueryChannelConsensusStateResponse = { }; function createBaseQueryPacketCommitmentRequest(): QueryPacketCommitmentRequest { - return { portId: "", channelId: "", sequence: Long.UZERO }; + return { + portId: "", + channelId: "", + sequence: Long.UZERO, + }; } export const QueryPacketCommitmentRequest = { @@ -1060,12 +1236,15 @@ export const QueryPacketCommitmentRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -1073,23 +1252,29 @@ export const QueryPacketCommitmentRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketCommitmentRequest(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1097,7 +1282,7 @@ export const QueryPacketCommitmentRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -1124,7 +1309,11 @@ export const QueryPacketCommitmentRequest = { }; function createBaseQueryPacketCommitmentResponse(): QueryPacketCommitmentResponse { - return { commitment: new Uint8Array(), proof: new Uint8Array(), proofHeight: undefined }; + return { + commitment: new Uint8Array(), + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryPacketCommitmentResponse = { @@ -1132,12 +1321,15 @@ export const QueryPacketCommitmentResponse = { 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; }, @@ -1145,23 +1337,29 @@ export const QueryPacketCommitmentResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketCommitmentResponse(); + 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; }, @@ -1201,7 +1399,11 @@ export const QueryPacketCommitmentResponse = { }; function createBaseQueryPacketCommitmentsRequest(): QueryPacketCommitmentsRequest { - return { portId: "", channelId: "", pagination: undefined }; + return { + portId: "", + channelId: "", + pagination: undefined, + }; } export const QueryPacketCommitmentsRequest = { @@ -1209,12 +1411,15 @@ export const QueryPacketCommitmentsRequest = { 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; }, @@ -1222,23 +1427,29 @@ export const QueryPacketCommitmentsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketCommitmentsRequest(); + 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; }, @@ -1274,7 +1485,11 @@ export const QueryPacketCommitmentsRequest = { }; function createBaseQueryPacketCommitmentsResponse(): QueryPacketCommitmentsResponse { - return { commitments: [], pagination: undefined, height: undefined }; + return { + commitments: [], + pagination: undefined, + height: undefined, + }; } export const QueryPacketCommitmentsResponse = { @@ -1282,12 +1497,15 @@ export const QueryPacketCommitmentsResponse = { 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; }, @@ -1295,23 +1513,29 @@ export const QueryPacketCommitmentsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketCommitmentsResponse(); + 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; }, @@ -1327,11 +1551,13 @@ export const QueryPacketCommitmentsResponse = { 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); @@ -1354,7 +1580,11 @@ export const QueryPacketCommitmentsResponse = { }; function createBaseQueryPacketReceiptRequest(): QueryPacketReceiptRequest { - return { portId: "", channelId: "", sequence: Long.UZERO }; + return { + portId: "", + channelId: "", + sequence: Long.UZERO, + }; } export const QueryPacketReceiptRequest = { @@ -1362,12 +1592,15 @@ export const QueryPacketReceiptRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -1375,23 +1608,29 @@ export const QueryPacketReceiptRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketReceiptRequest(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1399,7 +1638,7 @@ export const QueryPacketReceiptRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -1426,7 +1665,11 @@ export const QueryPacketReceiptRequest = { }; function createBaseQueryPacketReceiptResponse(): QueryPacketReceiptResponse { - return { received: false, proof: new Uint8Array(), proofHeight: undefined }; + return { + received: false, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryPacketReceiptResponse = { @@ -1434,12 +1677,15 @@ export const QueryPacketReceiptResponse = { 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; }, @@ -1447,23 +1693,29 @@ export const QueryPacketReceiptResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketReceiptResponse(); + 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; }, @@ -1500,7 +1752,11 @@ export const QueryPacketReceiptResponse = { }; function createBaseQueryPacketAcknowledgementRequest(): QueryPacketAcknowledgementRequest { - return { portId: "", channelId: "", sequence: Long.UZERO }; + return { + portId: "", + channelId: "", + sequence: Long.UZERO, + }; } export const QueryPacketAcknowledgementRequest = { @@ -1508,12 +1764,15 @@ export const QueryPacketAcknowledgementRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + if (!message.sequence.isZero()) { writer.uint32(24).uint64(message.sequence); } + return writer; }, @@ -1521,23 +1780,29 @@ export const QueryPacketAcknowledgementRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketAcknowledgementRequest(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1545,7 +1810,7 @@ export const QueryPacketAcknowledgementRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, }; }, @@ -1572,7 +1837,11 @@ export const QueryPacketAcknowledgementRequest = { }; function createBaseQueryPacketAcknowledgementResponse(): QueryPacketAcknowledgementResponse { - return { acknowledgement: new Uint8Array(), proof: new Uint8Array(), proofHeight: undefined }; + return { + acknowledgement: new Uint8Array(), + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryPacketAcknowledgementResponse = { @@ -1580,12 +1849,15 @@ export const QueryPacketAcknowledgementResponse = { 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; }, @@ -1593,23 +1865,29 @@ export const QueryPacketAcknowledgementResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketAcknowledgementResponse(); + 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; }, @@ -1651,7 +1929,12 @@ export const QueryPacketAcknowledgementResponse = { }; function createBaseQueryPacketAcknowledgementsRequest(): QueryPacketAcknowledgementsRequest { - return { portId: "", channelId: "", pagination: undefined, packetCommitmentSequences: [] }; + return { + portId: "", + channelId: "", + pagination: undefined, + packetCommitmentSequences: [], + }; } export const QueryPacketAcknowledgementsRequest = { @@ -1659,16 +1942,21 @@ export const QueryPacketAcknowledgementsRequest = { 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(); } + writer.uint32(34).fork(); + for (const v of message.packetCommitmentSequences) { writer.uint64(v); } + writer.ldelim(); return writer; }, @@ -1677,33 +1965,42 @@ export const QueryPacketAcknowledgementsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketAcknowledgementsRequest(); + 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; + case 4: if ((tag & 7) === 2) { const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { message.packetCommitmentSequences.push(reader.uint64() as Long); } } else { message.packetCommitmentSequences.push(reader.uint64() as Long); } + break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1713,7 +2010,7 @@ export const QueryPacketAcknowledgementsRequest = { channelId: isSet(object.channelId) ? String(object.channelId) : "", pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) - ? object.packetCommitmentSequences.map((e: any) => Long.fromValue(e)) + ? object.packetCommitmentSequences.map((e: any) => Long.fromString(e)) : [], }; }, @@ -1724,6 +2021,7 @@ export const QueryPacketAcknowledgementsRequest = { message.channelId !== undefined && (obj.channelId = message.channelId); message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + if (message.packetCommitmentSequences) { obj.packetCommitmentSequences = message.packetCommitmentSequences.map((e) => (e || Long.UZERO).toString(), @@ -1731,6 +2029,7 @@ export const QueryPacketAcknowledgementsRequest = { } else { obj.packetCommitmentSequences = []; } + return obj; }, @@ -1750,7 +2049,11 @@ export const QueryPacketAcknowledgementsRequest = { }; function createBaseQueryPacketAcknowledgementsResponse(): QueryPacketAcknowledgementsResponse { - return { acknowledgements: [], pagination: undefined, height: undefined }; + return { + acknowledgements: [], + pagination: undefined, + height: undefined, + }; } export const QueryPacketAcknowledgementsResponse = { @@ -1758,12 +2061,15 @@ export const QueryPacketAcknowledgementsResponse = { 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; }, @@ -1771,23 +2077,29 @@ export const QueryPacketAcknowledgementsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPacketAcknowledgementsResponse(); + 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; }, @@ -1803,11 +2115,13 @@ export const QueryPacketAcknowledgementsResponse = { 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); @@ -1830,7 +2144,11 @@ export const QueryPacketAcknowledgementsResponse = { }; function createBaseQueryUnreceivedPacketsRequest(): QueryUnreceivedPacketsRequest { - return { portId: "", channelId: "", packetCommitmentSequences: [] }; + return { + portId: "", + channelId: "", + packetCommitmentSequences: [], + }; } export const QueryUnreceivedPacketsRequest = { @@ -1838,13 +2156,17 @@ export const QueryUnreceivedPacketsRequest = { 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; }, @@ -1853,30 +2175,38 @@ export const QueryUnreceivedPacketsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnreceivedPacketsRequest(); + 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(reader.uint64() as Long); } } else { message.packetCommitmentSequences.push(reader.uint64() as Long); } + break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1885,7 +2215,7 @@ export const QueryUnreceivedPacketsRequest = { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) - ? object.packetCommitmentSequences.map((e: any) => Long.fromValue(e)) + ? object.packetCommitmentSequences.map((e: any) => Long.fromString(e)) : [], }; }, @@ -1894,6 +2224,7 @@ export const QueryUnreceivedPacketsRequest = { 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 || Long.UZERO).toString(), @@ -1901,6 +2232,7 @@ export const QueryUnreceivedPacketsRequest = { } else { obj.packetCommitmentSequences = []; } + return obj; }, @@ -1916,19 +2248,26 @@ export const QueryUnreceivedPacketsRequest = { }; function createBaseQueryUnreceivedPacketsResponse(): QueryUnreceivedPacketsResponse { - return { sequences: [], height: undefined }; + return { + sequences: [], + height: undefined, + }; } export const QueryUnreceivedPacketsResponse = { encode(message: QueryUnreceivedPacketsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.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; }, @@ -1936,44 +2275,53 @@ export const QueryUnreceivedPacketsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnreceivedPacketsResponse(); + 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(reader.uint64() as Long); } } else { message.sequences.push(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 { return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromValue(e)) : [], + sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromString(e)) : [], height: isSet(object.height) ? Height.fromJSON(object.height) : undefined, }; }, toJSON(message: QueryUnreceivedPacketsResponse): unknown { const obj: any = {}; + if (message.sequences) { obj.sequences = message.sequences.map((e) => (e || Long.UZERO).toString()); } else { obj.sequences = []; } + message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); return obj; }, @@ -1990,7 +2338,11 @@ export const QueryUnreceivedPacketsResponse = { }; function createBaseQueryUnreceivedAcksRequest(): QueryUnreceivedAcksRequest { - return { portId: "", channelId: "", packetAckSequences: [] }; + return { + portId: "", + channelId: "", + packetAckSequences: [], + }; } export const QueryUnreceivedAcksRequest = { @@ -1998,13 +2350,17 @@ export const QueryUnreceivedAcksRequest = { 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; }, @@ -2013,30 +2369,38 @@ export const QueryUnreceivedAcksRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnreceivedAcksRequest(); + 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(reader.uint64() as Long); } } else { message.packetAckSequences.push(reader.uint64() as Long); } + break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -2045,7 +2409,7 @@ export const QueryUnreceivedAcksRequest = { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", packetAckSequences: Array.isArray(object?.packetAckSequences) - ? object.packetAckSequences.map((e: any) => Long.fromValue(e)) + ? object.packetAckSequences.map((e: any) => Long.fromString(e)) : [], }; }, @@ -2054,11 +2418,13 @@ export const QueryUnreceivedAcksRequest = { 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 || Long.UZERO).toString()); } else { obj.packetAckSequences = []; } + return obj; }, @@ -2074,19 +2440,26 @@ export const QueryUnreceivedAcksRequest = { }; function createBaseQueryUnreceivedAcksResponse(): QueryUnreceivedAcksResponse { - return { sequences: [], height: undefined }; + return { + sequences: [], + height: undefined, + }; } export const QueryUnreceivedAcksResponse = { encode(message: QueryUnreceivedAcksResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.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; }, @@ -2094,44 +2467,53 @@ export const QueryUnreceivedAcksResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUnreceivedAcksResponse(); + 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(reader.uint64() as Long); } } else { message.sequences.push(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 { return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromValue(e)) : [], + sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromString(e)) : [], height: isSet(object.height) ? Height.fromJSON(object.height) : undefined, }; }, toJSON(message: QueryUnreceivedAcksResponse): unknown { const obj: any = {}; + if (message.sequences) { obj.sequences = message.sequences.map((e) => (e || Long.UZERO).toString()); } else { obj.sequences = []; } + message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined); return obj; }, @@ -2148,7 +2530,10 @@ export const QueryUnreceivedAcksResponse = { }; function createBaseQueryNextSequenceReceiveRequest(): QueryNextSequenceReceiveRequest { - return { portId: "", channelId: "" }; + return { + portId: "", + channelId: "", + }; } export const QueryNextSequenceReceiveRequest = { @@ -2156,9 +2541,11 @@ export const QueryNextSequenceReceiveRequest = { if (message.portId !== "") { writer.uint32(10).string(message.portId); } + if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } + return writer; }, @@ -2166,20 +2553,25 @@ export const QueryNextSequenceReceiveRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryNextSequenceReceiveRequest(); + 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; }, @@ -2208,7 +2600,11 @@ export const QueryNextSequenceReceiveRequest = { }; function createBaseQueryNextSequenceReceiveResponse(): QueryNextSequenceReceiveResponse { - return { nextSequenceReceive: Long.UZERO, proof: new Uint8Array(), proofHeight: undefined }; + return { + nextSequenceReceive: Long.UZERO, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryNextSequenceReceiveResponse = { @@ -2216,12 +2612,15 @@ export const QueryNextSequenceReceiveResponse = { if (!message.nextSequenceReceive.isZero()) { 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; }, @@ -2229,30 +2628,36 @@ export const QueryNextSequenceReceiveResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryNextSequenceReceiveResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.nextSequenceReceive = 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 { return { nextSequenceReceive: isSet(object.nextSequenceReceive) - ? Long.fromValue(object.nextSequenceReceive) + ? Long.fromString(object.nextSequenceReceive) : Long.UZERO, proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, @@ -2286,69 +2691,65 @@ export const QueryNextSequenceReceiveResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. - */ + /*Channel queries an IBC Channel.*/ + + Channels(request?: QueryChannelsRequest): Promise; + /*Channels queries all the IBC channels of a chain.*/ + ConnectionChannels(request: QueryConnectionChannelsRequest): Promise; - /** - * ChannelClientState queries for the client state for the channel associated - * with the provided channel identifiers. - */ + /*ConnectionChannels queries all the channels associated with a connection + end.*/ + ChannelClientState(request: QueryChannelClientStateRequest): Promise; - /** - * ChannelConsensusState queries for the consensus state for the channel - * associated with the provided channel identifiers. - */ + /*ChannelClientState queries for the client state for the channel associated + with the provided channel identifiers.*/ + ChannelConsensusState( request: QueryChannelConsensusStateRequest, ): Promise; - /** PacketCommitment queries a stored packet commitment hash. */ + /*ChannelConsensusState queries for the consensus state for the channel + associated with the provided channel identifiers.*/ + PacketCommitment(request: QueryPacketCommitmentRequest): Promise; - /** - * PacketCommitments returns all the packet commitments hashes associated - * with a channel. - */ + /*PacketCommitment queries a stored packet commitment hash.*/ + PacketCommitments(request: QueryPacketCommitmentsRequest): Promise; - /** - * PacketReceipt queries if a given packet sequence has been received on the - * queried chain - */ + /*PacketCommitments returns all the packet commitments hashes associated + with a channel.*/ + PacketReceipt(request: QueryPacketReceiptRequest): Promise; - /** PacketAcknowledgement queries a stored packet acknowledgement hash. */ + /*PacketReceipt queries if a given packet sequence has been received on the + queried chain*/ + PacketAcknowledgement( request: QueryPacketAcknowledgementRequest, ): Promise; - /** - * PacketAcknowledgements returns all the packet acknowledgements associated - * with a channel. - */ + /*PacketAcknowledgement queries a stored packet acknowledgement hash.*/ + PacketAcknowledgements( request: QueryPacketAcknowledgementsRequest, ): Promise; - /** - * UnreceivedPackets returns all the unreceived IBC packets associated with a - * channel and sequences. - */ + /*PacketAcknowledgements returns all the packet acknowledgements associated + with a channel.*/ + UnreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; - /** - * UnreceivedAcks returns all the unreceived IBC acknowledgements associated - * with a channel and sequences. - */ + /*UnreceivedPackets returns all the unreceived IBC packets associated with a + channel and sequences.*/ + UnreceivedAcks(request: QueryUnreceivedAcksRequest): Promise; - /** NextSequenceReceive returns the next receive sequence for a given channel. */ + /*UnreceivedAcks returns all the unreceived IBC acknowledgements associated + with a channel and sequences.*/ + NextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; + /*NextSequenceReceive returns the next receive sequence for a given channel.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Channel = this.Channel.bind(this); @@ -2365,13 +2766,18 @@ export class QueryClientImpl implements Query { this.UnreceivedAcks = this.UnreceivedAcks.bind(this); this.NextSequenceReceive = this.NextSequenceReceive.bind(this); } + 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 _m0.Reader(data))); } - Channels(request: QueryChannelsRequest): Promise { + Channels( + request: QueryChannelsRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); @@ -2449,79 +2855,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryNextSequenceReceiveResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index da16ba46..6310750c 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,161 +1,164 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Height } from "../../client/v1/client"; import { Channel, Packet } from "./channel"; - +import { Height } from "../../client/v1/client"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; 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; + channel: Channel; signer: string; } - /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -export interface MsgChannelOpenInitResponse {} +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; + channel: Channel; counterpartyVersion: string; proofInit: Uint8Array; - proofHeight?: Height; + proofHeight: Height; signer: string; } - /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ -export interface MsgChannelOpenTryResponse {} +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; + proofHeight: Height; signer: string; } - /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ -export interface MsgChannelOpenAckResponse {} +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; + proofHeight: Height; signer: string; } - /** * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response * type. */ -export interface MsgChannelOpenConfirmResponse {} +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 {} +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; + proofHeight: Height; signer: string; } - /** * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response * type. */ -export interface MsgChannelCloseConfirmResponse {} +export interface MsgChannelCloseConfirmResponse {} /** MsgRecvPacket receives incoming IBC packet */ + export interface MsgRecvPacket { - packet?: Packet; + packet: Packet; proofCommitment: Uint8Array; - proofHeight?: Height; + proofHeight: Height; signer: string; } - /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -export interface MsgRecvPacketResponse {} +export interface MsgRecvPacketResponse {} /** MsgTimeout receives timed-out packet */ + export interface MsgTimeout { - packet?: Packet; + packet: Packet; proofUnreceived: Uint8Array; - proofHeight?: Height; + proofHeight: Height; nextSequenceRecv: Long; signer: string; } - /** MsgTimeoutResponse defines the Msg/Timeout response type. */ -export interface MsgTimeoutResponse {} +export interface MsgTimeoutResponse {} /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ + export interface MsgTimeoutOnClose { - packet?: Packet; + packet: Packet; proofUnreceived: Uint8Array; proofClose: Uint8Array; - proofHeight?: Height; + proofHeight: Height; nextSequenceRecv: Long; signer: string; } - /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -export interface MsgTimeoutOnCloseResponse {} +export interface MsgTimeoutOnCloseResponse {} /** MsgAcknowledgement receives incoming IBC acknowledgement */ + export interface MsgAcknowledgement { - packet?: Packet; + packet: Packet; acknowledgement: Uint8Array; proofAcked: Uint8Array; - proofHeight?: Height; + proofHeight: Height; signer: string; } - /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ + export interface MsgAcknowledgementResponse {} function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { - return { portId: "", channel: undefined, signer: "" }; + return { + portId: "", + channel: undefined, + signer: "", + }; } export const MsgChannelOpenInit = { @@ -163,12 +166,15 @@ export const MsgChannelOpenInit = { 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; }, @@ -176,23 +182,29 @@ export const MsgChannelOpenInit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenInit(); + 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; }, @@ -238,14 +250,17 @@ export const MsgChannelOpenInitResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenInitResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -281,24 +296,31 @@ export const MsgChannelOpenTry = { 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; }, @@ -306,35 +328,45 @@ export const MsgChannelOpenTry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenTry(); + 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; }, @@ -399,14 +431,17 @@ export const MsgChannelOpenTryResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenTryResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -442,24 +477,31 @@ export const MsgChannelOpenAck = { 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; }, @@ -467,35 +509,45 @@ export const MsgChannelOpenAck = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenAck(); + 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; }, @@ -555,14 +607,17 @@ export const MsgChannelOpenAckResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenAckResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -582,7 +637,13 @@ export const MsgChannelOpenAckResponse = { }; function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { - return { portId: "", channelId: "", proofAck: new Uint8Array(), proofHeight: undefined, signer: "" }; + return { + portId: "", + channelId: "", + proofAck: new Uint8Array(), + proofHeight: undefined, + signer: "", + }; } export const MsgChannelOpenConfirm = { @@ -590,18 +651,23 @@ export const MsgChannelOpenConfirm = { 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; }, @@ -609,29 +675,37 @@ export const MsgChannelOpenConfirm = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenConfirm(); + 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; }, @@ -684,14 +758,17 @@ export const MsgChannelOpenConfirmResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenConfirmResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -713,7 +790,11 @@ export const MsgChannelOpenConfirmResponse = { }; function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { - return { portId: "", channelId: "", signer: "" }; + return { + portId: "", + channelId: "", + signer: "", + }; } export const MsgChannelCloseInit = { @@ -721,12 +802,15 @@ export const MsgChannelCloseInit = { 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; }, @@ -734,23 +818,29 @@ export const MsgChannelCloseInit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseInit(); + 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; }, @@ -792,14 +882,17 @@ export const MsgChannelCloseInitResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseInitResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -821,7 +914,13 @@ export const MsgChannelCloseInitResponse = { }; function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { - return { portId: "", channelId: "", proofInit: new Uint8Array(), proofHeight: undefined, signer: "" }; + return { + portId: "", + channelId: "", + proofInit: new Uint8Array(), + proofHeight: undefined, + signer: "", + }; } export const MsgChannelCloseConfirm = { @@ -829,18 +928,23 @@ export const MsgChannelCloseConfirm = { 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; }, @@ -848,29 +952,37 @@ export const MsgChannelCloseConfirm = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseConfirm(); + 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; }, @@ -925,14 +1037,17 @@ export const MsgChannelCloseConfirmResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseConfirmResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -954,7 +1069,12 @@ export const MsgChannelCloseConfirmResponse = { }; function createBaseMsgRecvPacket(): MsgRecvPacket { - return { packet: undefined, proofCommitment: new Uint8Array(), proofHeight: undefined, signer: "" }; + return { + packet: undefined, + proofCommitment: new Uint8Array(), + proofHeight: undefined, + signer: "", + }; } export const MsgRecvPacket = { @@ -962,15 +1082,19 @@ export const MsgRecvPacket = { 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; }, @@ -978,26 +1102,33 @@ export const MsgRecvPacket = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRecvPacket(); + 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; }, @@ -1052,14 +1183,17 @@ export const MsgRecvPacketResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRecvPacketResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1093,18 +1227,23 @@ export const MsgTimeout = { 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.isZero()) { writer.uint32(32).uint64(message.nextSequenceRecv); } + if (message.signer !== "") { writer.uint32(42).string(message.signer); } + return writer; }, @@ -1112,29 +1251,37 @@ export const MsgTimeout = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeout(); + 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 = reader.uint64() as Long; break; + case 5: message.signer = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1145,7 +1292,9 @@ export const MsgTimeout = { ? bytesFromBase64(object.proofUnreceived) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) ? Long.fromValue(object.nextSequenceRecv) : Long.UZERO, + nextSequenceRecv: isSet(object.nextSequenceRecv) + ? Long.fromString(object.nextSequenceRecv) + : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, @@ -1196,14 +1345,17 @@ export const MsgTimeoutResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1238,21 +1390,27 @@ export const MsgTimeoutOnClose = { 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.isZero()) { writer.uint32(40).uint64(message.nextSequenceRecv); } + if (message.signer !== "") { writer.uint32(50).string(message.signer); } + return writer; }, @@ -1260,32 +1418,41 @@ export const MsgTimeoutOnClose = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutOnClose(); + 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 = reader.uint64() as Long; break; + case 6: message.signer = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1297,7 +1464,9 @@ export const MsgTimeoutOnClose = { : new Uint8Array(), proofClose: isSet(object.proofClose) ? bytesFromBase64(object.proofClose) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) ? Long.fromValue(object.nextSequenceRecv) : Long.UZERO, + nextSequenceRecv: isSet(object.nextSequenceRecv) + ? Long.fromString(object.nextSequenceRecv) + : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, @@ -1353,14 +1522,17 @@ export const MsgTimeoutOnCloseResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutOnCloseResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1394,18 +1566,23 @@ export const MsgAcknowledgement = { 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; }, @@ -1413,29 +1590,37 @@ export const MsgAcknowledgement = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAcknowledgement(); + 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; }, @@ -1496,14 +1681,17 @@ export const MsgAcknowledgementResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAcknowledgementResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1521,36 +1709,43 @@ export const MsgAcknowledgementResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit.*/ + ChannelOpenTry(request: MsgChannelOpenTry): Promise; - /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ + /*ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry.*/ + ChannelOpenAck(request: MsgChannelOpenAck): Promise; - /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ + /*ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck.*/ + ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; - /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ + /*ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm.*/ + ChannelCloseInit(request: MsgChannelCloseInit): Promise; - /** - * ChannelCloseConfirm defines a rpc handler method for - * MsgChannelCloseConfirm. - */ + /*ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit.*/ + ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; - /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ + /*ChannelCloseConfirm defines a rpc handler method for + MsgChannelCloseConfirm.*/ + RecvPacket(request: MsgRecvPacket): Promise; - /** Timeout defines a rpc handler method for MsgTimeout. */ + /*RecvPacket defines a rpc handler method for MsgRecvPacket.*/ + Timeout(request: MsgTimeout): Promise; - /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ + /*Timeout defines a rpc handler method for MsgTimeout.*/ + TimeoutOnClose(request: MsgTimeoutOnClose): Promise; - /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ + /*TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose.*/ + Acknowledgement(request: MsgAcknowledgement): Promise; + /*Acknowledgement defines a rpc handler method for MsgAcknowledgement.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.ChannelOpenInit = this.ChannelOpenInit.bind(this); @@ -1564,6 +1759,7 @@ export class MsgClientImpl implements Msg { this.TimeoutOnClose = this.TimeoutOnClose.bind(this); this.Acknowledgement = this.Acknowledgement.bind(this); } + ChannelOpenInit(request: MsgChannelOpenInit): Promise { const data = MsgChannelOpenInit.encode(request).finish(); const promise = this.rpc.request("ibc.core.channel.v1.Msg", "ChannelOpenInit", data); @@ -1624,79 +1820,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgAcknowledgementResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 2b6d197c..35f0de27 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,72 +1,76 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import { Any } from "../../../../google/protobuf/any"; - +import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../../../helpers"; 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; -} + clientState: Any; +} /** * ConsensusStateWithHeight defines a consensus state with an additional height * field. */ + export interface ConsensusStateWithHeight { /** consensus state height */ - height?: Height; + height: Height; /** consensus state */ - consensusState?: Any; -} + consensusState: Any; +} /** * 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 substitute * client's latest consensus state is copied over to the subject client. The proposal * handler may fail if the subject and the substitute do not match in client and * chain parameters (with exception to latest height, frozen height, and chain-id). */ + 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 */ + subjectClientId: string; /** * the substitute client identifier for the client standing in for the subject * client */ + substituteClientId: string; } - /** * UpgradeProposal is a gov Content type for initiating an IBC breaking * upgrade. */ + export interface UpgradeProposal { title: string; description: string; - plan?: Plan; + plan: Plan; /** * An UpgradedClientState must be provided to perform an IBC breaking upgrade. * This will make the chain commit to the correct upgraded (self) client state @@ -75,9 +79,9 @@ export interface UpgradeProposal { * of the chain. This will allow IBC connections to persist smoothly across * planned chain upgrades */ - upgradedClientState?: Any; -} + upgradedClientState: Any; +} /** * Height is a monotonically increasing data type * that can be compared against another Height for the purposes of updating and @@ -90,21 +94,26 @@ export interface UpgradeProposal { * height continues to be monitonically increasing even as the RevisionHeight * gets reset */ + export interface Height { /** the revision that the client is currently on */ revisionNumber: Long; /** the height within the given revision */ + revisionHeight: Long; } - /** Params defines the set of IBC light client parameters. */ + export interface Params { /** allowed_clients defines the list of allowed client state types. */ allowedClients: string[]; } function createBaseIdentifiedClientState(): IdentifiedClientState { - return { clientId: "", clientState: undefined }; + return { + clientId: "", + clientState: undefined, + }; } export const IdentifiedClientState = { @@ -112,9 +121,11 @@ export const IdentifiedClientState = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + if (message.clientState !== undefined) { Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -122,20 +133,25 @@ export const IdentifiedClientState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIdentifiedClientState(); + 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; }, @@ -166,7 +182,10 @@ export const IdentifiedClientState = { }; function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight { - return { height: undefined, consensusState: undefined }; + return { + height: undefined, + consensusState: undefined, + }; } export const ConsensusStateWithHeight = { @@ -174,9 +193,11 @@ export const ConsensusStateWithHeight = { 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; }, @@ -184,20 +205,25 @@ export const ConsensusStateWithHeight = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusStateWithHeight(); + 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; }, @@ -231,7 +257,10 @@ export const ConsensusStateWithHeight = { }; function createBaseClientConsensusStates(): ClientConsensusStates { - return { clientId: "", consensusStates: [] }; + return { + clientId: "", + consensusStates: [], + }; } export const ClientConsensusStates = { @@ -239,9 +268,11 @@ export const ClientConsensusStates = { 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; }, @@ -249,20 +280,25 @@ export const ClientConsensusStates = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientConsensusStates(); + 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; }, @@ -278,6 +314,7 @@ export const ClientConsensusStates = { 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, @@ -285,6 +322,7 @@ export const ClientConsensusStates = { } else { obj.consensusStates = []; } + return obj; }, @@ -298,7 +336,12 @@ export const ClientConsensusStates = { }; function createBaseClientUpdateProposal(): ClientUpdateProposal { - return { title: "", description: "", subjectClientId: "", substituteClientId: "" }; + return { + title: "", + description: "", + subjectClientId: "", + substituteClientId: "", + }; } export const ClientUpdateProposal = { @@ -306,15 +349,19 @@ export const ClientUpdateProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.subjectClientId !== "") { writer.uint32(26).string(message.subjectClientId); } + if (message.substituteClientId !== "") { writer.uint32(34).string(message.substituteClientId); } + return writer; }, @@ -322,26 +369,33 @@ export const ClientUpdateProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientUpdateProposal(); + 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.subjectClientId = reader.string(); break; + case 4: message.substituteClientId = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -374,7 +428,12 @@ export const ClientUpdateProposal = { }; function createBaseUpgradeProposal(): UpgradeProposal { - return { title: "", description: "", plan: undefined, upgradedClientState: undefined }; + return { + title: "", + description: "", + plan: undefined, + upgradedClientState: undefined, + }; } export const UpgradeProposal = { @@ -382,15 +441,19 @@ export const UpgradeProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + if (message.plan !== undefined) { Plan.encode(message.plan, writer.uint32(26).fork()).ldelim(); } + if (message.upgradedClientState !== undefined) { Any.encode(message.upgradedClientState, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -398,26 +461,33 @@ export const UpgradeProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpgradeProposal(); + 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.plan = Plan.decode(reader, reader.uint32()); break; + case 4: message.upgradedClientState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -459,7 +529,10 @@ export const UpgradeProposal = { }; function createBaseHeight(): Height { - return { revisionNumber: Long.UZERO, revisionHeight: Long.UZERO }; + return { + revisionNumber: Long.UZERO, + revisionHeight: Long.UZERO, + }; } export const Height = { @@ -467,9 +540,11 @@ export const Height = { if (!message.revisionNumber.isZero()) { writer.uint32(8).uint64(message.revisionNumber); } + if (!message.revisionHeight.isZero()) { writer.uint32(16).uint64(message.revisionHeight); } + return writer; }, @@ -477,27 +552,32 @@ export const Height = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHeight(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.revisionNumber = reader.uint64() as Long; break; + case 2: message.revisionHeight = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Height { return { - revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, }; }, @@ -525,7 +605,9 @@ export const Height = { }; function createBaseParams(): Params { - return { allowedClients: [] }; + return { + allowedClients: [], + }; } export const Params = { @@ -533,6 +615,7 @@ export const Params = { for (const v of message.allowedClients) { writer.uint32(10).string(v!); } + return writer; }, @@ -540,17 +623,21 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + 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; }, @@ -564,11 +651,13 @@ export const Params = { toJSON(message: Params): unknown { const obj: any = {}; + if (message.allowedClients) { obj.allowedClients = message.allowedClients.map((e) => e); } else { obj.allowedClients = []; } + return obj; }, @@ -578,31 +667,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index ee4e4a1c..f97541e1 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,40 +1,43 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ClientConsensusStates, IdentifiedClientState, Params } from "./client"; - +import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; 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; + params: Params; /** create localhost on initialization */ + createLocalhost: boolean; /** the sequence for the next generated client identifier */ + nextClientSequence: Long; } - /** * 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[]; @@ -56,21 +59,27 @@ export const GenesisState = { 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.isZero()) { writer.uint32(48).uint64(message.nextClientSequence); } + return writer; }, @@ -78,32 +87,41 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -121,18 +139,20 @@ export const GenesisState = { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, createLocalhost: isSet(object.createLocalhost) ? Boolean(object.createLocalhost) : false, nextClientSequence: isSet(object.nextClientSequence) - ? Long.fromValue(object.nextClientSequence) + ? Long.fromString(object.nextClientSequence) : Long.UZERO, }; }, 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, @@ -140,6 +160,7 @@ export const GenesisState = { } else { obj.clientsConsensus = []; } + if (message.clientsMetadata) { obj.clientsMetadata = message.clientsMetadata.map((e) => e ? IdentifiedGenesisMetadata.toJSON(e) : undefined, @@ -147,6 +168,7 @@ export const GenesisState = { } 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 && @@ -173,7 +195,10 @@ export const GenesisState = { }; function createBaseGenesisMetadata(): GenesisMetadata { - return { key: new Uint8Array(), value: new Uint8Array() }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + }; } export const GenesisMetadata = { @@ -181,9 +206,11 @@ export const GenesisMetadata = { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } + if (message.value.length !== 0) { writer.uint32(18).bytes(message.value); } + return writer; }, @@ -191,20 +218,25 @@ export const GenesisMetadata = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisMetadata(); + 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; }, @@ -233,7 +265,10 @@ export const GenesisMetadata = { }; function createBaseIdentifiedGenesisMetadata(): IdentifiedGenesisMetadata { - return { clientId: "", clientMetadata: [] }; + return { + clientId: "", + clientMetadata: [], + }; } export const IdentifiedGenesisMetadata = { @@ -241,9 +276,11 @@ export const IdentifiedGenesisMetadata = { 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; }, @@ -251,20 +288,25 @@ export const IdentifiedGenesisMetadata = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIdentifiedGenesisMetadata(); + 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; }, @@ -280,11 +322,13 @@ export const IdentifiedGenesisMetadata = { 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; }, @@ -297,75 +341,3 @@ export const IdentifiedGenesisMetadata = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index 4a235396..1b9fbd19 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,173 +1,183 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; -import { ConsensusStateWithHeight, Height, IdentifiedClientState, Params } from "./client"; - +import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "./client"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; 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; + clientState: Any; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * QueryClientStatesRequest is the request type for the Query/ClientStates RPC * method */ + export interface QueryClientStatesRequest { /** pagination request */ pagination?: PageRequest; } - /** * 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; } - /** * 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: Long; /** consensus state revision height */ + revisionHeight: Long; /** * latest_height overrrides the height field and queries the latest stored * ConsensusState */ - latestHeight: boolean; -} + 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; + consensusState: Any; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates * RPC method. */ + export interface QueryConsensusStatesRequest { /** client identifier */ clientId: string; /** pagination request */ + pagination?: PageRequest; } - /** * 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; } - /** * QueryClientStatusRequest is the request type for the Query/ClientStatus RPC * method */ + export interface QueryClientStatusRequest { /** client unique identifier */ clientId: string; } - /** * QueryClientStatusResponse is the response type for the Query/ClientStatus RPC * method. It returns the current status of the IBC client. */ + export interface QueryClientStatusResponse { status: string; } - /** * QueryClientParamsRequest is the request type for the Query/ClientParams RPC * method. */ -export interface QueryClientParamsRequest {} +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; + params: Params; } - /** * QueryUpgradedClientStateRequest is the request type for the * Query/UpgradedClientState RPC method */ -export interface QueryUpgradedClientStateRequest {} +export interface QueryUpgradedClientStateRequest {} /** * QueryUpgradedClientStateResponse is the response type for the * Query/UpgradedClientState RPC method. */ + export interface QueryUpgradedClientStateResponse { /** client state associated with the request identifier */ - upgradedClientState?: Any; + upgradedClientState: Any; } - /** * QueryUpgradedConsensusStateRequest is the request type for the * Query/UpgradedConsensusState RPC method */ -export interface QueryUpgradedConsensusStateRequest {} +export interface QueryUpgradedConsensusStateRequest {} /** * QueryUpgradedConsensusStateResponse is the response type for the * Query/UpgradedConsensusState RPC method. */ + export interface QueryUpgradedConsensusStateResponse { /** Consensus state associated with the request identifier */ - upgradedConsensusState?: Any; + upgradedConsensusState: Any; } function createBaseQueryClientStateRequest(): QueryClientStateRequest { - return { clientId: "" }; + return { + clientId: "", + }; } export const QueryClientStateRequest = { @@ -175,6 +185,7 @@ export const QueryClientStateRequest = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + return writer; }, @@ -182,22 +193,28 @@ export const QueryClientStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStateRequest(); + 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 { - return { clientId: isSet(object.clientId) ? String(object.clientId) : "" }; + return { + clientId: isSet(object.clientId) ? String(object.clientId) : "", + }; }, toJSON(message: QueryClientStateRequest): unknown { @@ -214,7 +231,11 @@ export const QueryClientStateRequest = { }; function createBaseQueryClientStateResponse(): QueryClientStateResponse { - return { clientState: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + clientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryClientStateResponse = { @@ -222,12 +243,15 @@ export const QueryClientStateResponse = { 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; }, @@ -235,23 +259,29 @@ export const QueryClientStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStateResponse(); + 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; }, @@ -292,7 +322,9 @@ export const QueryClientStateResponse = { }; function createBaseQueryClientStatesRequest(): QueryClientStatesRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryClientStatesRequest = { @@ -300,6 +332,7 @@ export const QueryClientStatesRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -307,22 +340,28 @@ export const QueryClientStatesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStatesRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryClientStatesRequest): unknown { @@ -345,7 +384,10 @@ export const QueryClientStatesRequest = { }; function createBaseQueryClientStatesResponse(): QueryClientStatesResponse { - return { clientStates: [], pagination: undefined }; + return { + clientStates: [], + pagination: undefined, + }; } export const QueryClientStatesResponse = { @@ -353,9 +395,11 @@ export const QueryClientStatesResponse = { 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; }, @@ -363,20 +407,25 @@ export const QueryClientStatesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStatesResponse(); + 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; }, @@ -391,11 +440,13 @@ export const QueryClientStatesResponse = { 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; @@ -415,7 +466,12 @@ export const QueryClientStatesResponse = { }; function createBaseQueryConsensusStateRequest(): QueryConsensusStateRequest { - return { clientId: "", revisionNumber: Long.UZERO, revisionHeight: Long.UZERO, latestHeight: false }; + return { + clientId: "", + revisionNumber: Long.UZERO, + revisionHeight: Long.UZERO, + latestHeight: false, + }; } export const QueryConsensusStateRequest = { @@ -423,15 +479,19 @@ export const QueryConsensusStateRequest = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + if (!message.revisionNumber.isZero()) { writer.uint32(16).uint64(message.revisionNumber); } + if (!message.revisionHeight.isZero()) { writer.uint32(24).uint64(message.revisionHeight); } + if (message.latestHeight === true) { writer.uint32(32).bool(message.latestHeight); } + return writer; }, @@ -439,34 +499,41 @@ export const QueryConsensusStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConsensusStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.clientId = reader.string(); break; + case 2: message.revisionNumber = reader.uint64() as Long; break; + case 3: message.revisionHeight = reader.uint64() as Long; break; + case 4: message.latestHeight = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryConsensusStateRequest { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, latestHeight: isSet(object.latestHeight) ? Boolean(object.latestHeight) : false, }; }, @@ -501,7 +568,11 @@ export const QueryConsensusStateRequest = { }; function createBaseQueryConsensusStateResponse(): QueryConsensusStateResponse { - return { consensusState: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + consensusState: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryConsensusStateResponse = { @@ -509,12 +580,15 @@ export const QueryConsensusStateResponse = { 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; }, @@ -522,23 +596,29 @@ export const QueryConsensusStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConsensusStateResponse(); + 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; }, @@ -579,7 +659,10 @@ export const QueryConsensusStateResponse = { }; function createBaseQueryConsensusStatesRequest(): QueryConsensusStatesRequest { - return { clientId: "", pagination: undefined }; + return { + clientId: "", + pagination: undefined, + }; } export const QueryConsensusStatesRequest = { @@ -587,9 +670,11 @@ export const QueryConsensusStatesRequest = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -597,20 +682,25 @@ export const QueryConsensusStatesRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConsensusStatesRequest(); + 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; }, @@ -643,7 +733,10 @@ export const QueryConsensusStatesRequest = { }; function createBaseQueryConsensusStatesResponse(): QueryConsensusStatesResponse { - return { consensusStates: [], pagination: undefined }; + return { + consensusStates: [], + pagination: undefined, + }; } export const QueryConsensusStatesResponse = { @@ -651,9 +744,11 @@ export const QueryConsensusStatesResponse = { 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; }, @@ -661,20 +756,25 @@ export const QueryConsensusStatesResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConsensusStatesResponse(); + 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; }, @@ -689,6 +789,7 @@ export const QueryConsensusStatesResponse = { toJSON(message: QueryConsensusStatesResponse): unknown { const obj: any = {}; + if (message.consensusStates) { obj.consensusStates = message.consensusStates.map((e) => e ? ConsensusStateWithHeight.toJSON(e) : undefined, @@ -696,6 +797,7 @@ export const QueryConsensusStatesResponse = { } else { obj.consensusStates = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -716,7 +818,9 @@ export const QueryConsensusStatesResponse = { }; function createBaseQueryClientStatusRequest(): QueryClientStatusRequest { - return { clientId: "" }; + return { + clientId: "", + }; } export const QueryClientStatusRequest = { @@ -724,6 +828,7 @@ export const QueryClientStatusRequest = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + return writer; }, @@ -731,22 +836,28 @@ export const QueryClientStatusRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStatusRequest(); + 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): QueryClientStatusRequest { - return { clientId: isSet(object.clientId) ? String(object.clientId) : "" }; + return { + clientId: isSet(object.clientId) ? String(object.clientId) : "", + }; }, toJSON(message: QueryClientStatusRequest): unknown { @@ -765,7 +876,9 @@ export const QueryClientStatusRequest = { }; function createBaseQueryClientStatusResponse(): QueryClientStatusResponse { - return { status: "" }; + return { + status: "", + }; } export const QueryClientStatusResponse = { @@ -773,6 +886,7 @@ export const QueryClientStatusResponse = { if (message.status !== "") { writer.uint32(10).string(message.status); } + return writer; }, @@ -780,22 +894,28 @@ export const QueryClientStatusResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientStatusResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.status = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryClientStatusResponse { - return { status: isSet(object.status) ? String(object.status) : "" }; + return { + status: isSet(object.status) ? String(object.status) : "", + }; }, toJSON(message: QueryClientStatusResponse): unknown { @@ -826,14 +946,17 @@ export const QueryClientParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -853,7 +976,9 @@ export const QueryClientParamsRequest = { }; function createBaseQueryClientParamsResponse(): QueryClientParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryClientParamsResponse = { @@ -861,6 +986,7 @@ export const QueryClientParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -868,22 +994,28 @@ export const QueryClientParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryClientParamsResponse): unknown { @@ -915,14 +1047,17 @@ export const QueryUpgradedClientStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedClientStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -944,7 +1079,9 @@ export const QueryUpgradedClientStateRequest = { }; function createBaseQueryUpgradedClientStateResponse(): QueryUpgradedClientStateResponse { - return { upgradedClientState: undefined }; + return { + upgradedClientState: undefined, + }; } export const QueryUpgradedClientStateResponse = { @@ -952,6 +1089,7 @@ export const QueryUpgradedClientStateResponse = { if (message.upgradedClientState !== undefined) { Any.encode(message.upgradedClientState, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -959,17 +1097,21 @@ export const QueryUpgradedClientStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedClientStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.upgradedClientState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1015,14 +1157,17 @@ export const QueryUpgradedConsensusStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedConsensusStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1044,7 +1189,9 @@ export const QueryUpgradedConsensusStateRequest = { }; function createBaseQueryUpgradedConsensusStateResponse(): QueryUpgradedConsensusStateResponse { - return { upgradedConsensusState: undefined }; + return { + upgradedConsensusState: undefined, + }; } export const QueryUpgradedConsensusStateResponse = { @@ -1052,6 +1199,7 @@ export const QueryUpgradedConsensusStateResponse = { if (message.upgradedConsensusState !== undefined) { Any.encode(message.upgradedConsensusState, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -1059,17 +1207,21 @@ export const QueryUpgradedConsensusStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUpgradedConsensusStateResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.upgradedConsensusState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1101,37 +1253,40 @@ export const QueryUpgradedConsensusStateResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. - */ + /*ClientState queries an IBC light client.*/ + + ClientStates(request?: QueryClientStatesRequest): Promise; + /*ClientStates queries all the IBC light clients of a chain.*/ + ConsensusState(request: QueryConsensusStateRequest): Promise; - /** - * ConsensusStates queries all the consensus state associated with a given - * client. - */ + /*ConsensusState queries a consensus state associated with a client state at + a given height.*/ + ConsensusStates(request: QueryConsensusStatesRequest): Promise; - /** Status queries the status of an IBC client. */ + /*ConsensusStates queries all the consensus state associated with a given + client.*/ + ClientStatus(request: QueryClientStatusRequest): Promise; - /** ClientParams queries all parameters of the ibc client. */ - ClientParams(request: QueryClientParamsRequest): Promise; - /** UpgradedClientState queries an Upgraded IBC light client. */ - UpgradedClientState(request: QueryUpgradedClientStateRequest): Promise; - /** UpgradedConsensusState queries an Upgraded IBC consensus state. */ + /*Status queries the status of an IBC client.*/ + + ClientParams(request?: QueryClientParamsRequest): Promise; + /*ClientParams queries all parameters of the ibc client.*/ + + UpgradedClientState(request?: QueryUpgradedClientStateRequest): Promise; + /*UpgradedClientState queries an Upgraded IBC light client.*/ + UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest, + request?: QueryUpgradedConsensusStateRequest, ): Promise; + /*UpgradedConsensusState queries an Upgraded IBC consensus state.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.ClientState = this.ClientState.bind(this); @@ -1143,13 +1298,18 @@ export class QueryClientImpl implements Query { this.UpgradedClientState = this.UpgradedClientState.bind(this); this.UpgradedConsensusState = this.UpgradedConsensusState.bind(this); } + 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 _m0.Reader(data))); } - ClientStates(request: QueryClientStatesRequest): Promise { + ClientStates( + request: QueryClientStatesRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); @@ -1173,99 +1333,25 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryClientStatusResponse.decode(new _m0.Reader(data))); } - ClientParams(request: QueryClientParamsRequest): Promise { + 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 _m0.Reader(data))); } - UpgradedClientState(request: QueryUpgradedClientStateRequest): Promise { + UpgradedClientState( + request: QueryUpgradedClientStateRequest = {}, + ): Promise { const data = QueryUpgradedClientStateRequest.encode(request).finish(); const promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedClientState", data); return promise.then((data) => QueryUpgradedClientStateResponse.decode(new _m0.Reader(data))); } UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest, + request: QueryUpgradedConsensusStateRequest = {}, ): Promise { const data = QueryUpgradedConsensusStateRequest.encode(request).finish(); const promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedConsensusState", data); return promise.then((data) => QueryUpgradedConsensusStateResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 064150ab..9927bd12 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,88 +1,101 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; - /** MsgCreateClient defines a message to create an IBC client */ + export interface MsgCreateClient { /** light client state */ - clientState?: Any; + clientState: Any; /** * consensus state associated with the client that corresponds to a given * height. */ - consensusState?: Any; + + consensusState: Any; /** signer address */ + signer: string; } - /** MsgCreateClientResponse defines the Msg/CreateClient response type. */ -export interface MsgCreateClientResponse {} +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; + + header: Any; /** signer address */ + signer: string; } - /** MsgUpdateClientResponse defines the Msg/UpdateClient response type. */ -export interface MsgUpdateClientResponse {} +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; + + clientState: Any; /** * upgraded consensus state, only contains enough information to serve as a * basis of trust in update logic */ - consensusState?: Any; + + consensusState: Any; /** 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 {} +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; + + misbehaviour: Any; /** signer address */ + signer: string; } - /** * MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response * type. */ + export interface MsgSubmitMisbehaviourResponse {} function createBaseMsgCreateClient(): MsgCreateClient { - return { clientState: undefined, consensusState: undefined, signer: "" }; + return { + clientState: undefined, + consensusState: undefined, + signer: "", + }; } export const MsgCreateClient = { @@ -90,12 +103,15 @@ export const MsgCreateClient = { 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; }, @@ -103,23 +119,29 @@ export const MsgCreateClient = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateClient(); + 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; }, @@ -169,14 +191,17 @@ export const MsgCreateClientResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateClientResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -196,7 +221,11 @@ export const MsgCreateClientResponse = { }; function createBaseMsgUpdateClient(): MsgUpdateClient { - return { clientId: "", header: undefined, signer: "" }; + return { + clientId: "", + header: undefined, + signer: "", + }; } export const MsgUpdateClient = { @@ -204,12 +233,15 @@ export const MsgUpdateClient = { 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; }, @@ -217,23 +249,29 @@ export const MsgUpdateClient = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateClient(); + 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; }, @@ -276,14 +314,17 @@ export const MsgUpdateClientResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateClientResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -318,21 +359,27 @@ export const MsgUpgradeClient = { 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; }, @@ -340,32 +387,41 @@ export const MsgUpgradeClient = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpgradeClient(); + 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; }, @@ -436,14 +492,17 @@ export const MsgUpgradeClientResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpgradeClientResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -463,7 +522,11 @@ export const MsgUpgradeClientResponse = { }; function createBaseMsgSubmitMisbehaviour(): MsgSubmitMisbehaviour { - return { clientId: "", misbehaviour: undefined, signer: "" }; + return { + clientId: "", + misbehaviour: undefined, + signer: "", + }; } export const MsgSubmitMisbehaviour = { @@ -471,12 +534,15 @@ export const MsgSubmitMisbehaviour = { 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; }, @@ -484,23 +550,29 @@ export const MsgSubmitMisbehaviour = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitMisbehaviour(); + 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; }, @@ -546,14 +618,17 @@ export const MsgSubmitMisbehaviourResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSubmitMisbehaviourResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -573,21 +648,24 @@ export const MsgSubmitMisbehaviourResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*CreateClient defines a rpc handler method for MsgCreateClient.*/ + UpdateClient(request: MsgUpdateClient): Promise; - /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ + /*UpdateClient defines a rpc handler method for MsgUpdateClient.*/ + UpgradeClient(request: MsgUpgradeClient): Promise; - /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ + /*UpgradeClient defines a rpc handler method for MsgUpgradeClient.*/ + SubmitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; + /*SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.CreateClient = this.CreateClient.bind(this); @@ -595,6 +673,7 @@ export class MsgClientImpl implements Msg { this.UpgradeClient = this.UpgradeClient.bind(this); this.SubmitMisbehaviour = this.SubmitMisbehaviour.bind(this); } + CreateClient(request: MsgCreateClient): Promise { const data = MsgCreateClient.encode(request).finish(); const promise = this.rpc.request("ibc.core.client.v1.Msg", "CreateClient", data); @@ -619,79 +698,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgSubmitMisbehaviourResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index 9d7e7fa1..8ec96f8b 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,36 +1,33 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { CommitmentProof } from "../../../../confio/proofs"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; 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 @@ -38,12 +35,15 @@ export interface MerklePath { * should be succinct. * MerkleProofs are ordered from leaf-to-root */ + export interface MerkleProof { proofs: CommitmentProof[]; } function createBaseMerkleRoot(): MerkleRoot { - return { hash: new Uint8Array() }; + return { + hash: new Uint8Array(), + }; } export const MerkleRoot = { @@ -51,6 +51,7 @@ export const MerkleRoot = { if (message.hash.length !== 0) { writer.uint32(10).bytes(message.hash); } + return writer; }, @@ -58,22 +59,28 @@ export const MerkleRoot = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMerkleRoot(); + 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 { - return { hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array() }; + return { + hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), + }; }, toJSON(message: MerkleRoot): unknown { @@ -91,7 +98,9 @@ export const MerkleRoot = { }; function createBaseMerklePrefix(): MerklePrefix { - return { keyPrefix: new Uint8Array() }; + return { + keyPrefix: new Uint8Array(), + }; } export const MerklePrefix = { @@ -99,6 +108,7 @@ export const MerklePrefix = { if (message.keyPrefix.length !== 0) { writer.uint32(10).bytes(message.keyPrefix); } + return writer; }, @@ -106,22 +116,28 @@ export const MerklePrefix = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMerklePrefix(); + 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 { - return { keyPrefix: isSet(object.keyPrefix) ? bytesFromBase64(object.keyPrefix) : new Uint8Array() }; + return { + keyPrefix: isSet(object.keyPrefix) ? bytesFromBase64(object.keyPrefix) : new Uint8Array(), + }; }, toJSON(message: MerklePrefix): unknown { @@ -141,7 +157,9 @@ export const MerklePrefix = { }; function createBaseMerklePath(): MerklePath { - return { keyPath: [] }; + return { + keyPath: [], + }; } export const MerklePath = { @@ -149,6 +167,7 @@ export const MerklePath = { for (const v of message.keyPath) { writer.uint32(10).string(v!); } + return writer; }, @@ -156,31 +175,39 @@ export const MerklePath = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMerklePath(); + 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 { - return { keyPath: Array.isArray(object?.keyPath) ? object.keyPath.map((e: any) => String(e)) : [] }; + return { + keyPath: Array.isArray(object?.keyPath) ? object.keyPath.map((e: any) => String(e)) : [], + }; }, toJSON(message: MerklePath): unknown { const obj: any = {}; + if (message.keyPath) { obj.keyPath = message.keyPath.map((e) => e); } else { obj.keyPath = []; } + return obj; }, @@ -192,7 +219,9 @@ export const MerklePath = { }; function createBaseMerkleProof(): MerkleProof { - return { proofs: [] }; + return { + proofs: [], + }; } export const MerkleProof = { @@ -200,6 +229,7 @@ export const MerkleProof = { for (const v of message.proofs) { CommitmentProof.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -207,17 +237,21 @@ export const MerkleProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMerkleProof(); + 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; }, @@ -229,11 +263,13 @@ export const MerkleProof = { 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; }, @@ -243,75 +279,3 @@ export const MerkleProof = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index baae1738..8288671a 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,72 +1,78 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { MerklePrefix } from "../../commitment/v1/commitment"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; 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. + * 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"; - case State.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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; @@ -74,42 +80,51 @@ export interface ConnectionEnd { * 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; + + counterparty: Counterparty; /** * 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: Long; } - /** * 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; + + counterparty: Counterparty; /** delay period associated with this connection. */ + delayPeriod: Long; } - /** Counterparty defines the counterparty chain associated with a connection end. */ + export interface Counterparty { /** * identifies the client on the counterparty chain associated with a given @@ -120,37 +135,41 @@ export interface Counterparty { * identifies the connection end on the counterparty chain associated with a * given connection. */ + connectionId: string; /** commitment merkle prefix of the counterparty chain. */ - prefix?: MerklePrefix; -} + prefix: MerklePrefix; +} /** 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[]; } - /** Params defines the set of Connection parameters. */ + export interface Params { /** * maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the @@ -161,7 +180,13 @@ export interface Params { } function createBaseConnectionEnd(): ConnectionEnd { - return { clientId: "", versions: [], state: 0, counterparty: undefined, delayPeriod: Long.UZERO }; + return { + clientId: "", + versions: [], + state: 0, + counterparty: undefined, + delayPeriod: Long.UZERO, + }; } export const ConnectionEnd = { @@ -169,18 +194,23 @@ export const ConnectionEnd = { 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.isZero()) { writer.uint32(40).uint64(message.delayPeriod); } + return writer; }, @@ -188,29 +218,37 @@ export const ConnectionEnd = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConnectionEnd(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -220,18 +258,20 @@ export const ConnectionEnd = { versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], state: isSet(object.state) ? stateFromJSON(object.state) : 0, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, }; }, 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); @@ -257,7 +297,14 @@ export const ConnectionEnd = { }; function createBaseIdentifiedConnection(): IdentifiedConnection { - return { id: "", clientId: "", versions: [], state: 0, counterparty: undefined, delayPeriod: Long.UZERO }; + return { + id: "", + clientId: "", + versions: [], + state: 0, + counterparty: undefined, + delayPeriod: Long.UZERO, + }; } export const IdentifiedConnection = { @@ -265,21 +312,27 @@ export const IdentifiedConnection = { 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.isZero()) { writer.uint32(48).uint64(message.delayPeriod); } + return writer; }, @@ -287,32 +340,41 @@ export const IdentifiedConnection = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseIdentifiedConnection(); + 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 = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -323,7 +385,7 @@ export const IdentifiedConnection = { versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], state: isSet(object.state) ? stateFromJSON(object.state) : 0, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, }; }, @@ -331,11 +393,13 @@ export const IdentifiedConnection = { 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); @@ -362,7 +426,11 @@ export const IdentifiedConnection = { }; function createBaseCounterparty(): Counterparty { - return { clientId: "", connectionId: "", prefix: undefined }; + return { + clientId: "", + connectionId: "", + prefix: undefined, + }; } export const Counterparty = { @@ -370,12 +438,15 @@ export const Counterparty = { 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; }, @@ -383,23 +454,29 @@ export const Counterparty = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCounterparty(); + 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; }, @@ -433,7 +510,9 @@ export const Counterparty = { }; function createBaseClientPaths(): ClientPaths { - return { paths: [] }; + return { + paths: [], + }; } export const ClientPaths = { @@ -441,6 +520,7 @@ export const ClientPaths = { for (const v of message.paths) { writer.uint32(10).string(v!); } + return writer; }, @@ -448,31 +528,39 @@ export const ClientPaths = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientPaths(); + 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 { - return { paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => String(e)) : [] }; + return { + paths: Array.isArray(object?.paths) ? object.paths.map((e: any) => String(e)) : [], + }; }, toJSON(message: ClientPaths): unknown { const obj: any = {}; + if (message.paths) { obj.paths = message.paths.map((e) => e); } else { obj.paths = []; } + return obj; }, @@ -484,7 +572,10 @@ export const ClientPaths = { }; function createBaseConnectionPaths(): ConnectionPaths { - return { clientId: "", paths: [] }; + return { + clientId: "", + paths: [], + }; } export const ConnectionPaths = { @@ -492,9 +583,11 @@ export const ConnectionPaths = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + for (const v of message.paths) { writer.uint32(18).string(v!); } + return writer; }, @@ -502,20 +595,25 @@ export const ConnectionPaths = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConnectionPaths(); + 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; }, @@ -529,11 +627,13 @@ export const ConnectionPaths = { 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; }, @@ -546,7 +646,10 @@ export const ConnectionPaths = { }; function createBaseVersion(): Version { - return { identifier: "", features: [] }; + return { + identifier: "", + features: [], + }; } export const Version = { @@ -554,9 +657,11 @@ export const Version = { if (message.identifier !== "") { writer.uint32(10).string(message.identifier); } + for (const v of message.features) { writer.uint32(18).string(v!); } + return writer; }, @@ -564,20 +669,25 @@ export const Version = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVersion(); + 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; }, @@ -591,11 +701,13 @@ export const Version = { 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; }, @@ -608,7 +720,9 @@ export const Version = { }; function createBaseParams(): Params { - return { maxExpectedTimePerBlock: Long.UZERO }; + return { + maxExpectedTimePerBlock: Long.UZERO, + }; } export const Params = { @@ -616,6 +730,7 @@ export const Params = { if (!message.maxExpectedTimePerBlock.isZero()) { writer.uint32(8).uint64(message.maxExpectedTimePerBlock); } + return writer; }, @@ -623,24 +738,28 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxExpectedTimePerBlock = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Params { return { maxExpectedTimePerBlock: isSet(object.maxExpectedTimePerBlock) - ? Long.fromValue(object.maxExpectedTimePerBlock) + ? Long.fromString(object.maxExpectedTimePerBlock) : Long.UZERO, }; }, @@ -661,31 +780,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 53fa20d4..02df6280 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,17 +1,16 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ConnectionPaths, IdentifiedConnection, Params } from "./connection"; - +import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; 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: Long; - params?: Params; + params: Params; } function createBaseGenesisState(): GenesisState { @@ -28,15 +27,19 @@ export const GenesisState = { 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.isZero()) { writer.uint32(24).uint64(message.nextConnectionSequence); } + if (message.params !== undefined) { Params.encode(message.params, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -44,26 +47,33 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.connections.push(IdentifiedConnection.decode(reader, reader.uint32())); break; + case 2: message.clientConnectionPaths.push(ConnectionPaths.decode(reader, reader.uint32())); break; + case 3: message.nextConnectionSequence = reader.uint64() as Long; break; + case 4: message.params = Params.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -76,7 +86,7 @@ export const GenesisState = { ? object.clientConnectionPaths.map((e: any) => ConnectionPaths.fromJSON(e)) : [], nextConnectionSequence: isSet(object.nextConnectionSequence) - ? Long.fromValue(object.nextConnectionSequence) + ? Long.fromString(object.nextConnectionSequence) : Long.UZERO, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, }; @@ -84,11 +94,13 @@ export const GenesisState = { 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, @@ -96,6 +108,7 @@ export const GenesisState = { } else { obj.clientConnectionPaths = []; } + message.nextConnectionSequence !== undefined && (obj.nextConnectionSequence = (message.nextConnectionSequence || Long.UZERO).toString()); message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); @@ -116,31 +129,3 @@ export const GenesisState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index f2518951..6a6a1851 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,129 +1,140 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; -import { Any } from "../../../../google/protobuf/any"; -import { Height, IdentifiedClientState } from "../../client/v1/client"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; - +import { Height, IdentifiedClientState } from "../../client/v1/client"; +import { Any } from "../../../../google/protobuf/any"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; 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; + connection: ConnectionEnd; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * QueryConnectionsRequest is the request type for the Query/Connections RPC * method */ + export interface QueryConnectionsRequest { pagination?: PageRequest; } - /** * 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; /** query block height */ - height?: Height; -} + height: Height; +} /** * 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; -} + proofHeight: Height; +} /** * 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; + identifiedClientState: IdentifiedClientState; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; -} + proofHeight: Height; +} /** * QueryConnectionConsensusStateRequest is the request type for the * Query/ConnectionConsensusState RPC method */ + export interface QueryConnectionConsensusStateRequest { /** connection identifier */ connectionId: string; revisionNumber: Long; revisionHeight: Long; } - /** * QueryConnectionConsensusStateResponse is the response type for the * Query/ConnectionConsensusState RPC method */ + export interface QueryConnectionConsensusStateResponse { /** consensus state associated with the channel */ - consensusState?: Any; + consensusState: Any; /** client ID associated with the consensus state */ + clientId: string; /** merkle proof of existence */ + proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight?: Height; + + proofHeight: Height; } function createBaseQueryConnectionRequest(): QueryConnectionRequest { - return { connectionId: "" }; + return { + connectionId: "", + }; } export const QueryConnectionRequest = { @@ -131,6 +142,7 @@ export const QueryConnectionRequest = { if (message.connectionId !== "") { writer.uint32(10).string(message.connectionId); } + return writer; }, @@ -138,22 +150,28 @@ export const QueryConnectionRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionRequest(); + 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 { - return { connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" }; + return { + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + }; }, toJSON(message: QueryConnectionRequest): unknown { @@ -170,7 +188,11 @@ export const QueryConnectionRequest = { }; function createBaseQueryConnectionResponse(): QueryConnectionResponse { - return { connection: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + connection: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryConnectionResponse = { @@ -178,12 +200,15 @@ export const QueryConnectionResponse = { 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; }, @@ -191,23 +216,29 @@ export const QueryConnectionResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionResponse(); + 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; }, @@ -246,7 +277,9 @@ export const QueryConnectionResponse = { }; function createBaseQueryConnectionsRequest(): QueryConnectionsRequest { - return { pagination: undefined }; + return { + pagination: undefined, + }; } export const QueryConnectionsRequest = { @@ -254,6 +287,7 @@ export const QueryConnectionsRequest = { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -261,22 +295,28 @@ export const QueryConnectionsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionsRequest(); + 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 { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + return { + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; }, toJSON(message: QueryConnectionsRequest): unknown { @@ -297,7 +337,11 @@ export const QueryConnectionsRequest = { }; function createBaseQueryConnectionsResponse(): QueryConnectionsResponse { - return { connections: [], pagination: undefined, height: undefined }; + return { + connections: [], + pagination: undefined, + height: undefined, + }; } export const QueryConnectionsResponse = { @@ -305,12 +349,15 @@ export const QueryConnectionsResponse = { 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; }, @@ -318,23 +365,29 @@ export const QueryConnectionsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionsResponse(); + 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; }, @@ -350,11 +403,13 @@ export const QueryConnectionsResponse = { 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); @@ -377,7 +432,9 @@ export const QueryConnectionsResponse = { }; function createBaseQueryClientConnectionsRequest(): QueryClientConnectionsRequest { - return { clientId: "" }; + return { + clientId: "", + }; } export const QueryClientConnectionsRequest = { @@ -385,6 +442,7 @@ export const QueryClientConnectionsRequest = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + return writer; }, @@ -392,22 +450,28 @@ export const QueryClientConnectionsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientConnectionsRequest(); + 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 { - return { clientId: isSet(object.clientId) ? String(object.clientId) : "" }; + return { + clientId: isSet(object.clientId) ? String(object.clientId) : "", + }; }, toJSON(message: QueryClientConnectionsRequest): unknown { @@ -426,7 +490,11 @@ export const QueryClientConnectionsRequest = { }; function createBaseQueryClientConnectionsResponse(): QueryClientConnectionsResponse { - return { connectionPaths: [], proof: new Uint8Array(), proofHeight: undefined }; + return { + connectionPaths: [], + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryClientConnectionsResponse = { @@ -434,12 +502,15 @@ export const QueryClientConnectionsResponse = { 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; }, @@ -447,23 +518,29 @@ export const QueryClientConnectionsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryClientConnectionsResponse(); + 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; }, @@ -479,11 +556,13 @@ export const QueryClientConnectionsResponse = { 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 && @@ -506,7 +585,9 @@ export const QueryClientConnectionsResponse = { }; function createBaseQueryConnectionClientStateRequest(): QueryConnectionClientStateRequest { - return { connectionId: "" }; + return { + connectionId: "", + }; } export const QueryConnectionClientStateRequest = { @@ -514,6 +595,7 @@ export const QueryConnectionClientStateRequest = { if (message.connectionId !== "") { writer.uint32(10).string(message.connectionId); } + return writer; }, @@ -521,22 +603,28 @@ export const QueryConnectionClientStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionClientStateRequest(); + 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 { - return { connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" }; + return { + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + }; }, toJSON(message: QueryConnectionClientStateRequest): unknown { @@ -555,7 +643,11 @@ export const QueryConnectionClientStateRequest = { }; function createBaseQueryConnectionClientStateResponse(): QueryConnectionClientStateResponse { - return { identifiedClientState: undefined, proof: new Uint8Array(), proofHeight: undefined }; + return { + identifiedClientState: undefined, + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryConnectionClientStateResponse = { @@ -563,12 +655,15 @@ export const QueryConnectionClientStateResponse = { 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; }, @@ -576,23 +671,29 @@ export const QueryConnectionClientStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionClientStateResponse(); + 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; }, @@ -637,7 +738,11 @@ export const QueryConnectionClientStateResponse = { }; function createBaseQueryConnectionConsensusStateRequest(): QueryConnectionConsensusStateRequest { - return { connectionId: "", revisionNumber: Long.UZERO, revisionHeight: Long.UZERO }; + return { + connectionId: "", + revisionNumber: Long.UZERO, + revisionHeight: Long.UZERO, + }; } export const QueryConnectionConsensusStateRequest = { @@ -648,12 +753,15 @@ export const QueryConnectionConsensusStateRequest = { if (message.connectionId !== "") { writer.uint32(10).string(message.connectionId); } + if (!message.revisionNumber.isZero()) { writer.uint32(16).uint64(message.revisionNumber); } + if (!message.revisionHeight.isZero()) { writer.uint32(24).uint64(message.revisionHeight); } + return writer; }, @@ -661,31 +769,37 @@ export const QueryConnectionConsensusStateRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionConsensusStateRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.connectionId = reader.string(); break; + case 2: message.revisionNumber = reader.uint64() as Long; break; + case 3: message.revisionHeight = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryConnectionConsensusStateRequest { return { connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, }; }, @@ -717,7 +831,12 @@ export const QueryConnectionConsensusStateRequest = { }; function createBaseQueryConnectionConsensusStateResponse(): QueryConnectionConsensusStateResponse { - return { consensusState: undefined, clientId: "", proof: new Uint8Array(), proofHeight: undefined }; + return { + consensusState: undefined, + clientId: "", + proof: new Uint8Array(), + proofHeight: undefined, + }; } export const QueryConnectionConsensusStateResponse = { @@ -728,15 +847,19 @@ export const QueryConnectionConsensusStateResponse = { 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; }, @@ -744,26 +867,33 @@ export const QueryConnectionConsensusStateResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConnectionConsensusStateResponse(); + 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; }, @@ -805,36 +935,34 @@ export const QueryConnectionConsensusStateResponse = { return message; }, }; +/** Query defines the RPC service */ -/** 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. - */ + /*Connection queries an IBC connection end.*/ + + Connections(request?: QueryConnectionsRequest): Promise; + /*Connections queries all the IBC connections of a chain.*/ + ClientConnections(request: QueryClientConnectionsRequest): Promise; - /** - * ConnectionClientState queries the client state associated with the - * connection. - */ + /*ClientConnections queries the connection paths associated with a client + state.*/ + ConnectionClientState( request: QueryConnectionClientStateRequest, ): Promise; - /** - * ConnectionConsensusState queries the consensus state associated with the - * connection. - */ + /*ConnectionClientState queries the client state associated with the + connection.*/ + ConnectionConsensusState( request: QueryConnectionConsensusStateRequest, ): Promise; + /*ConnectionConsensusState queries the consensus state associated with the + connection.*/ } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Connection = this.Connection.bind(this); @@ -843,13 +971,18 @@ export class QueryClientImpl implements Query { this.ConnectionClientState = this.ConnectionClientState.bind(this); this.ConnectionConsensusState = this.ConnectionConsensusState.bind(this); } + 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 _m0.Reader(data))); } - Connections(request: QueryConnectionsRequest): Promise { + Connections( + request: QueryConnectionsRequest = { + pagination: undefined, + }, + ): 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 _m0.Reader(data))); @@ -877,79 +1010,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryConnectionConsensusStateResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 47354f27..1a61f9d9 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,108 +1,120 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; import { Height } from "../../client/v1/client"; -import { Counterparty, Version } from "./connection"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; 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; - version?: Version; + counterparty: Counterparty; + version: Version; delayPeriod: Long; signer: string; } - /** * MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response * type. */ -export interface MsgConnectionOpenInitResponse {} +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; - counterparty?: Counterparty; + clientState: Any; + counterparty: Counterparty; delayPeriod: Long; counterpartyVersions: Version[]; - proofHeight?: Height; + proofHeight: Height; /** * 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; + consensusHeight: Height; signer: string; } - /** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ -export interface MsgConnectionOpenTryResponse {} +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; - clientState?: Any; - proofHeight?: Height; + version: Version; + clientState: Any; + proofHeight: Height; /** * 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; + consensusHeight: Height; signer: string; } - /** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ -export interface MsgConnectionOpenAckResponse {} +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; + proofHeight: Height; signer: string; } - /** * MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm * response type. */ + export interface MsgConnectionOpenConfirmResponse {} function createBaseMsgConnectionOpenInit(): MsgConnectionOpenInit { - return { clientId: "", counterparty: undefined, version: undefined, delayPeriod: Long.UZERO, signer: "" }; + return { + clientId: "", + counterparty: undefined, + version: undefined, + delayPeriod: Long.UZERO, + signer: "", + }; } export const MsgConnectionOpenInit = { @@ -110,18 +122,23 @@ export const MsgConnectionOpenInit = { 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.isZero()) { writer.uint32(32).uint64(message.delayPeriod); } + if (message.signer !== "") { writer.uint32(42).string(message.signer); } + return writer; }, @@ -129,29 +146,37 @@ export const MsgConnectionOpenInit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenInit(); + 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 = reader.uint64() as Long; break; + case 5: message.signer = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -160,7 +185,7 @@ export const MsgConnectionOpenInit = { clientId: isSet(object.clientId) ? String(object.clientId) : "", counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, version: isSet(object.version) ? Version.fromJSON(object.version) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, @@ -210,14 +235,17 @@ export const MsgConnectionOpenInitResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenInitResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -260,39 +288,51 @@ export const MsgConnectionOpenTry = { 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.isZero()) { 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; }, @@ -300,50 +340,65 @@ export const MsgConnectionOpenTry = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenTry(); + 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 = 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; }, @@ -353,7 +408,7 @@ export const MsgConnectionOpenTry = { previousConnectionId: isSet(object.previousConnectionId) ? String(object.previousConnectionId) : "", clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, counterpartyVersions: Array.isArray(object?.counterpartyVersions) ? object.counterpartyVersions.map((e: any) => Version.fromJSON(e)) : [], @@ -377,11 +432,13 @@ export const MsgConnectionOpenTry = { message.counterparty !== undefined && (obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined); message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || Long.UZERO).toString()); + 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 && @@ -448,14 +505,17 @@ export const MsgConnectionOpenTryResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenTryResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -496,33 +556,43 @@ export const MsgConnectionOpenAck = { 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; }, @@ -530,44 +600,57 @@ export const MsgConnectionOpenAck = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenAck(); + 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; }, @@ -658,14 +741,17 @@ export const MsgConnectionOpenAckResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenAckResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -687,7 +773,12 @@ export const MsgConnectionOpenAckResponse = { }; function createBaseMsgConnectionOpenConfirm(): MsgConnectionOpenConfirm { - return { connectionId: "", proofAck: new Uint8Array(), proofHeight: undefined, signer: "" }; + return { + connectionId: "", + proofAck: new Uint8Array(), + proofHeight: undefined, + signer: "", + }; } export const MsgConnectionOpenConfirm = { @@ -695,15 +786,19 @@ export const MsgConnectionOpenConfirm = { 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; }, @@ -711,26 +806,33 @@ export const MsgConnectionOpenConfirm = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenConfirm(); + 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; }, @@ -782,14 +884,17 @@ export const MsgConnectionOpenConfirmResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgConnectionOpenConfirmResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -809,24 +914,25 @@ export const MsgConnectionOpenConfirmResponse = { return message; }, }; +/** Msg defines the RPC service */ -/** 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. */ + /*ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit.*/ + ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; - /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ + /*ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry.*/ + ConnectionOpenAck(request: MsgConnectionOpenAck): Promise; - /** - * ConnectionOpenConfirm defines a rpc handler method for - * MsgConnectionOpenConfirm. - */ + /*ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck.*/ + ConnectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; + /*ConnectionOpenConfirm defines a rpc handler method for + MsgConnectionOpenConfirm.*/ } - export class MsgClientImpl implements Msg { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.ConnectionOpenInit = this.ConnectionOpenInit.bind(this); @@ -834,6 +940,7 @@ export class MsgClientImpl implements Msg { this.ConnectionOpenAck = this.ConnectionOpenAck.bind(this); this.ConnectionOpenConfirm = this.ConnectionOpenConfirm.bind(this); } + ConnectionOpenInit(request: MsgConnectionOpenInit): Promise { const data = MsgConnectionOpenInit.encode(request).finish(); const promise = this.rpc.request("ibc.core.connection.v1.Msg", "ConnectionOpenInit", data); @@ -858,79 +965,3 @@ export class MsgClientImpl implements Msg { return promise.then((data) => MsgConnectionOpenConfirmResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 7913a216..f62d9b6a 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,24 +1,28 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; - +import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.types.v1"; - /** GenesisState defines the ibc module's genesis state. */ + export interface GenesisState { /** ICS002 - Clients genesis state */ - clientGenesis?: GenesisState1; + clientGenesis: GenesisState1; /** ICS003 - Connections genesis state */ - connectionGenesis?: GenesisState2; + + connectionGenesis: GenesisState2; /** ICS004 - Channel genesis state */ - channelGenesis?: GenesisState3; + + channelGenesis: GenesisState3; } function createBaseGenesisState(): GenesisState { - return { clientGenesis: undefined, connectionGenesis: undefined, channelGenesis: undefined }; + return { + clientGenesis: undefined, + connectionGenesis: undefined, + channelGenesis: undefined, + }; } export const GenesisState = { @@ -26,12 +30,15 @@ export const GenesisState = { if (message.clientGenesis !== undefined) { GenesisState1.encode(message.clientGenesis, writer.uint32(10).fork()).ldelim(); } + if (message.connectionGenesis !== undefined) { GenesisState2.encode(message.connectionGenesis, writer.uint32(18).fork()).ldelim(); } + if (message.channelGenesis !== undefined) { GenesisState3.encode(message.channelGenesis, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -39,23 +46,29 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.clientGenesis = GenesisState1.decode(reader, reader.uint32()); break; + case 2: message.connectionGenesis = GenesisState2.decode(reader, reader.uint32()); break; + case 3: message.channelGenesis = GenesisState3.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -90,44 +103,16 @@ export const GenesisState = { const message = createBaseGenesisState(); message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null - ? GenesisState1.fromPartial(object.clientGenesis) + ? GenesisState.fromPartial(object.clientGenesis) : undefined; message.connectionGenesis = object.connectionGenesis !== undefined && object.connectionGenesis !== null - ? GenesisState2.fromPartial(object.connectionGenesis) + ? GenesisState.fromPartial(object.connectionGenesis) : undefined; message.channelGenesis = object.channelGenesis !== undefined && object.channelGenesis !== null - ? GenesisState3.fromPartial(object.channelGenesis) + ? GenesisState.fromPartial(object.channelGenesis) : undefined; return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index f5c1a1dd..e5b20607 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,23 +1,25 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Height } from "../../../core/client/v1/client"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.localhost.v1"; - /** * ClientState defines a loopback (localhost) client. It requires (read-only) * access to keys outside the client prefix. */ + export interface ClientState { /** self chain ID */ chainId: string; /** self latest block height */ - height?: Height; + + height: Height; } function createBaseClientState(): ClientState { - return { chainId: "", height: undefined }; + return { + chainId: "", + height: undefined, + }; } export const ClientState = { @@ -25,9 +27,11 @@ export const ClientState = { if (message.chainId !== "") { writer.uint32(10).string(message.chainId); } + if (message.height !== undefined) { Height.encode(message.height, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -35,20 +39,25 @@ export const ClientState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.chainId = reader.string(); break; + case 2: message.height = Height.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -74,31 +83,3 @@ export const ClientState = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 69cdfc29..d8157504 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,264 +1,294 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../../google/protobuf/any"; -import { Channel } from "../../../core/channel/v1/channel"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; - +import { Channel } from "../../../core/channel/v1/channel"; +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.solomachine.v1"; - /** * DataType defines the type of solo machine proof being created. This is done * to preserve uniqueness of different data sign byte encodings. */ + export enum DataType { /** DATA_TYPE_UNINITIALIZED_UNSPECIFIED - Default State */ DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0, + /** DATA_TYPE_CLIENT_STATE - Data type for client state verification */ DATA_TYPE_CLIENT_STATE = 1, + /** DATA_TYPE_CONSENSUS_STATE - Data type for consensus state verification */ DATA_TYPE_CONSENSUS_STATE = 2, + /** DATA_TYPE_CONNECTION_STATE - Data type for connection state verification */ DATA_TYPE_CONNECTION_STATE = 3, + /** DATA_TYPE_CHANNEL_STATE - Data type for channel state verification */ DATA_TYPE_CHANNEL_STATE = 4, + /** DATA_TYPE_PACKET_COMMITMENT - Data type for packet commitment verification */ DATA_TYPE_PACKET_COMMITMENT = 5, + /** DATA_TYPE_PACKET_ACKNOWLEDGEMENT - Data type for packet acknowledgement verification */ DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6, + /** DATA_TYPE_PACKET_RECEIPT_ABSENCE - Data type for packet receipt absence verification */ DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7, + /** DATA_TYPE_NEXT_SEQUENCE_RECV - Data type for next sequence recv verification */ DATA_TYPE_NEXT_SEQUENCE_RECV = 8, + /** DATA_TYPE_HEADER - Data type for header verification */ DATA_TYPE_HEADER = 9, UNRECOGNIZED = -1, } - export function dataTypeFromJSON(object: any): DataType { switch (object) { case 0: case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": return DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED; + case 1: case "DATA_TYPE_CLIENT_STATE": return DataType.DATA_TYPE_CLIENT_STATE; + case 2: case "DATA_TYPE_CONSENSUS_STATE": return DataType.DATA_TYPE_CONSENSUS_STATE; + case 3: case "DATA_TYPE_CONNECTION_STATE": return DataType.DATA_TYPE_CONNECTION_STATE; + case 4: case "DATA_TYPE_CHANNEL_STATE": return DataType.DATA_TYPE_CHANNEL_STATE; + case 5: case "DATA_TYPE_PACKET_COMMITMENT": return DataType.DATA_TYPE_PACKET_COMMITMENT; + case 6: case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": return DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT; + case 7: case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": return DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE; + case 8: case "DATA_TYPE_NEXT_SEQUENCE_RECV": return DataType.DATA_TYPE_NEXT_SEQUENCE_RECV; + case 9: case "DATA_TYPE_HEADER": return DataType.DATA_TYPE_HEADER; + case -1: case "UNRECOGNIZED": default: return DataType.UNRECOGNIZED; } } - export function dataTypeToJSON(object: DataType): string { switch (object) { case DataType.DATA_TYPE_UNINITIALIZED_UNSPECIFIED: return "DATA_TYPE_UNINITIALIZED_UNSPECIFIED"; + case DataType.DATA_TYPE_CLIENT_STATE: return "DATA_TYPE_CLIENT_STATE"; + case DataType.DATA_TYPE_CONSENSUS_STATE: return "DATA_TYPE_CONSENSUS_STATE"; + case DataType.DATA_TYPE_CONNECTION_STATE: return "DATA_TYPE_CONNECTION_STATE"; + case DataType.DATA_TYPE_CHANNEL_STATE: return "DATA_TYPE_CHANNEL_STATE"; + case DataType.DATA_TYPE_PACKET_COMMITMENT: return "DATA_TYPE_PACKET_COMMITMENT"; + case DataType.DATA_TYPE_PACKET_ACKNOWLEDGEMENT: return "DATA_TYPE_PACKET_ACKNOWLEDGEMENT"; + case DataType.DATA_TYPE_PACKET_RECEIPT_ABSENCE: return "DATA_TYPE_PACKET_RECEIPT_ABSENCE"; + case DataType.DATA_TYPE_NEXT_SEQUENCE_RECV: return "DATA_TYPE_NEXT_SEQUENCE_RECV"; + case DataType.DATA_TYPE_HEADER: return "DATA_TYPE_HEADER"; - case DataType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** * ClientState defines a solo machine client that tracks the current consensus * state and if the client is frozen. */ + export interface ClientState { /** latest sequence of the client state */ sequence: Long; /** frozen sequence of the solo machine */ + frozenSequence: Long; - consensusState?: ConsensusState; + consensusState: ConsensusState; /** * when set to true, will allow governance to update a solo machine client. * The client will be unfrozen if it is frozen. */ + allowUpdateAfterProposal: boolean; } - /** * ConsensusState defines a solo machine consensus state. The sequence of a * consensus state is contained in the "height" key used in storing the * consensus state. */ + export interface ConsensusState { /** public key of the solo machine */ - publicKey?: Any; + publicKey: Any; /** * diversifier allows the same public key to be re-used across different solo * machine clients (potentially on different chains) without being considered * misbehaviour. */ + diversifier: string; timestamp: Long; } - /** Header defines a solo machine consensus header */ + export interface Header { /** sequence to update solo machine public key at */ sequence: Long; timestamp: Long; signature: Uint8Array; - newPublicKey?: Any; + newPublicKey: Any; newDiversifier: string; } - /** * Misbehaviour defines misbehaviour for a solo machine which consists * of a sequence and two signatures over different messages at that sequence. */ + export interface Misbehaviour { clientId: string; sequence: Long; - signatureOne?: SignatureAndData; - signatureTwo?: SignatureAndData; + signatureOne: SignatureAndData; + signatureTwo: SignatureAndData; } - /** * SignatureAndData contains a signature and the data signed over to create that * signature. */ + export interface SignatureAndData { signature: Uint8Array; dataType: DataType; data: Uint8Array; timestamp: Long; } - /** * TimestampedSignatureData contains the signature data and the timestamp of the * signature. */ + export interface TimestampedSignatureData { signatureData: Uint8Array; timestamp: Long; } - /** SignBytes defines the signed bytes used for signature verification. */ + export interface SignBytes { sequence: Long; timestamp: Long; diversifier: string; /** type of the data used */ + dataType: DataType; /** marshaled data */ + data: Uint8Array; } - /** HeaderData returns the SignBytes data for update verification. */ + export interface HeaderData { /** header public key */ - newPubKey?: Any; + newPubKey: Any; /** header diversifier */ + newDiversifier: string; } - /** ClientStateData returns the SignBytes data for client state verification. */ + export interface ClientStateData { path: Uint8Array; - clientState?: Any; + clientState: Any; } - /** * ConsensusStateData returns the SignBytes data for consensus state * verification. */ + export interface ConsensusStateData { path: Uint8Array; - consensusState?: Any; + consensusState: Any; } - /** * ConnectionStateData returns the SignBytes data for connection state * verification. */ + export interface ConnectionStateData { path: Uint8Array; - connection?: ConnectionEnd; + connection: ConnectionEnd; } - /** * ChannelStateData returns the SignBytes data for channel state * verification. */ + export interface ChannelStateData { path: Uint8Array; - channel?: Channel; + channel: Channel; } - /** * PacketCommitmentData returns the SignBytes data for packet commitment * verification. */ + export interface PacketCommitmentData { path: Uint8Array; commitment: Uint8Array; } - /** * PacketAcknowledgementData returns the SignBytes data for acknowledgement * verification. */ + export interface PacketAcknowledgementData { path: Uint8Array; acknowledgement: Uint8Array; } - /** * PacketReceiptAbsenceData returns the SignBytes data for * packet receipt absence verification. */ + export interface PacketReceiptAbsenceData { path: Uint8Array; } - /** * NextSequenceRecvData returns the SignBytes data for verification of the next * sequence to be received. */ + export interface NextSequenceRecvData { path: Uint8Array; nextSeqRecv: Long; @@ -278,15 +308,19 @@ export const ClientState = { if (!message.sequence.isZero()) { writer.uint32(8).uint64(message.sequence); } + if (!message.frozenSequence.isZero()) { writer.uint32(16).uint64(message.frozenSequence); } + if (message.consensusState !== undefined) { ConsensusState.encode(message.consensusState, writer.uint32(26).fork()).ldelim(); } + if (message.allowUpdateAfterProposal === true) { writer.uint32(32).bool(message.allowUpdateAfterProposal); } + return writer; }, @@ -294,33 +328,40 @@ export const ClientState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sequence = reader.uint64() as Long; break; + case 2: message.frozenSequence = reader.uint64() as Long; break; + case 3: message.consensusState = ConsensusState.decode(reader, reader.uint32()); break; + case 4: message.allowUpdateAfterProposal = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ClientState { return { - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, - frozenSequence: isSet(object.frozenSequence) ? Long.fromValue(object.frozenSequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + frozenSequence: isSet(object.frozenSequence) ? Long.fromString(object.frozenSequence) : Long.UZERO, consensusState: isSet(object.consensusState) ? ConsensusState.fromJSON(object.consensusState) : undefined, @@ -364,7 +405,11 @@ export const ClientState = { }; function createBaseConsensusState(): ConsensusState { - return { publicKey: undefined, diversifier: "", timestamp: Long.UZERO }; + return { + publicKey: undefined, + diversifier: "", + timestamp: Long.UZERO, + }; } export const ConsensusState = { @@ -372,12 +417,15 @@ export const ConsensusState = { if (message.publicKey !== undefined) { Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim(); } + if (message.diversifier !== "") { writer.uint32(18).string(message.diversifier); } + if (!message.timestamp.isZero()) { writer.uint32(24).uint64(message.timestamp); } + return writer; }, @@ -385,23 +433,29 @@ export const ConsensusState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.publicKey = Any.decode(reader, reader.uint32()); break; + case 2: message.diversifier = reader.string(); break; + case 3: message.timestamp = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -409,7 +463,7 @@ export const ConsensusState = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, }; }, @@ -452,18 +506,23 @@ export const Header = { if (!message.sequence.isZero()) { writer.uint32(8).uint64(message.sequence); } + if (!message.timestamp.isZero()) { writer.uint32(16).uint64(message.timestamp); } + if (message.signature.length !== 0) { writer.uint32(26).bytes(message.signature); } + if (message.newPublicKey !== undefined) { Any.encode(message.newPublicKey, writer.uint32(34).fork()).ldelim(); } + if (message.newDiversifier !== "") { writer.uint32(42).string(message.newDiversifier); } + return writer; }, @@ -471,36 +530,44 @@ export const Header = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHeader(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sequence = reader.uint64() as Long; break; + case 2: message.timestamp = reader.uint64() as Long; break; + case 3: message.signature = reader.bytes(); break; + case 4: message.newPublicKey = Any.decode(reader, reader.uint32()); break; + case 5: message.newDiversifier = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Header { return { - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, - timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), newPublicKey: isSet(object.newPublicKey) ? Any.fromJSON(object.newPublicKey) : undefined, newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "", @@ -542,7 +609,12 @@ export const Header = { }; function createBaseMisbehaviour(): Misbehaviour { - return { clientId: "", sequence: Long.UZERO, signatureOne: undefined, signatureTwo: undefined }; + return { + clientId: "", + sequence: Long.UZERO, + signatureOne: undefined, + signatureTwo: undefined, + }; } export const Misbehaviour = { @@ -550,15 +622,19 @@ export const Misbehaviour = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } + if (!message.sequence.isZero()) { writer.uint32(16).uint64(message.sequence); } + if (message.signatureOne !== undefined) { SignatureAndData.encode(message.signatureOne, writer.uint32(26).fork()).ldelim(); } + if (message.signatureTwo !== undefined) { SignatureAndData.encode(message.signatureTwo, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -566,33 +642,40 @@ export const Misbehaviour = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMisbehaviour(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.clientId = reader.string(); break; + case 2: message.sequence = reader.uint64() as Long; break; + case 3: message.signatureOne = SignatureAndData.decode(reader, reader.uint32()); break; + case 4: message.signatureTwo = SignatureAndData.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Misbehaviour { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, signatureOne: isSet(object.signatureOne) ? SignatureAndData.fromJSON(object.signatureOne) : undefined, signatureTwo: isSet(object.signatureTwo) ? SignatureAndData.fromJSON(object.signatureTwo) : undefined, }; @@ -629,7 +712,12 @@ export const Misbehaviour = { }; function createBaseSignatureAndData(): SignatureAndData { - return { signature: new Uint8Array(), dataType: 0, data: new Uint8Array(), timestamp: Long.UZERO }; + return { + signature: new Uint8Array(), + dataType: 0, + data: new Uint8Array(), + timestamp: Long.UZERO, + }; } export const SignatureAndData = { @@ -637,15 +725,19 @@ export const SignatureAndData = { if (message.signature.length !== 0) { writer.uint32(10).bytes(message.signature); } + if (message.dataType !== 0) { writer.uint32(16).int32(message.dataType); } + if (message.data.length !== 0) { writer.uint32(26).bytes(message.data); } + if (!message.timestamp.isZero()) { writer.uint32(32).uint64(message.timestamp); } + return writer; }, @@ -653,26 +745,33 @@ export const SignatureAndData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignatureAndData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signature = reader.bytes(); break; + case 2: message.dataType = reader.int32() as any; break; + case 3: message.data = reader.bytes(); break; + case 4: message.timestamp = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -681,7 +780,7 @@ export const SignatureAndData = { signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : 0, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, }; }, @@ -712,7 +811,10 @@ export const SignatureAndData = { }; function createBaseTimestampedSignatureData(): TimestampedSignatureData { - return { signatureData: new Uint8Array(), timestamp: Long.UZERO }; + return { + signatureData: new Uint8Array(), + timestamp: Long.UZERO, + }; } export const TimestampedSignatureData = { @@ -720,9 +822,11 @@ export const TimestampedSignatureData = { if (message.signatureData.length !== 0) { writer.uint32(10).bytes(message.signatureData); } + if (!message.timestamp.isZero()) { writer.uint32(16).uint64(message.timestamp); } + return writer; }, @@ -730,27 +834,32 @@ export const TimestampedSignatureData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTimestampedSignatureData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.signatureData = reader.bytes(); break; + case 2: message.timestamp = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): TimestampedSignatureData { return { signatureData: isSet(object.signatureData) ? bytesFromBase64(object.signatureData) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, }; }, @@ -792,18 +901,23 @@ export const SignBytes = { if (!message.sequence.isZero()) { writer.uint32(8).uint64(message.sequence); } + if (!message.timestamp.isZero()) { writer.uint32(16).uint64(message.timestamp); } + if (message.diversifier !== "") { writer.uint32(26).string(message.diversifier); } + if (message.dataType !== 0) { writer.uint32(32).int32(message.dataType); } + if (message.data.length !== 0) { writer.uint32(42).bytes(message.data); } + return writer; }, @@ -811,36 +925,44 @@ export const SignBytes = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignBytes(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.sequence = reader.uint64() as Long; break; + case 2: message.timestamp = reader.uint64() as Long; break; + case 3: message.diversifier = reader.string(); break; + case 4: message.dataType = reader.int32() as any; break; + case 5: message.data = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): SignBytes { return { - sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, - timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : 0, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), @@ -876,7 +998,10 @@ export const SignBytes = { }; function createBaseHeaderData(): HeaderData { - return { newPubKey: undefined, newDiversifier: "" }; + return { + newPubKey: undefined, + newDiversifier: "", + }; } export const HeaderData = { @@ -884,9 +1009,11 @@ export const HeaderData = { if (message.newPubKey !== undefined) { Any.encode(message.newPubKey, writer.uint32(10).fork()).ldelim(); } + if (message.newDiversifier !== "") { writer.uint32(18).string(message.newDiversifier); } + return writer; }, @@ -894,20 +1021,25 @@ export const HeaderData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHeaderData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.newPubKey = Any.decode(reader, reader.uint32()); break; + case 2: message.newDiversifier = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -938,7 +1070,10 @@ export const HeaderData = { }; function createBaseClientStateData(): ClientStateData { - return { path: new Uint8Array(), clientState: undefined }; + return { + path: new Uint8Array(), + clientState: undefined, + }; } export const ClientStateData = { @@ -946,9 +1081,11 @@ export const ClientStateData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.clientState !== undefined) { Any.encode(message.clientState, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -956,20 +1093,25 @@ export const ClientStateData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientStateData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.clientState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1001,7 +1143,10 @@ export const ClientStateData = { }; function createBaseConsensusStateData(): ConsensusStateData { - return { path: new Uint8Array(), consensusState: undefined }; + return { + path: new Uint8Array(), + consensusState: undefined, + }; } export const ConsensusStateData = { @@ -1009,9 +1154,11 @@ export const ConsensusStateData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.consensusState !== undefined) { Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1019,20 +1166,25 @@ export const ConsensusStateData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusStateData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.consensusState = Any.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1064,7 +1216,10 @@ export const ConsensusStateData = { }; function createBaseConnectionStateData(): ConnectionStateData { - return { path: new Uint8Array(), connection: undefined }; + return { + path: new Uint8Array(), + connection: undefined, + }; } export const ConnectionStateData = { @@ -1072,9 +1227,11 @@ export const ConnectionStateData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.connection !== undefined) { ConnectionEnd.encode(message.connection, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1082,20 +1239,25 @@ export const ConnectionStateData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConnectionStateData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.connection = ConnectionEnd.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1127,7 +1289,10 @@ export const ConnectionStateData = { }; function createBaseChannelStateData(): ChannelStateData { - return { path: new Uint8Array(), channel: undefined }; + return { + path: new Uint8Array(), + channel: undefined, + }; } export const ChannelStateData = { @@ -1135,9 +1300,11 @@ export const ChannelStateData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.channel !== undefined) { Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1145,20 +1312,25 @@ export const ChannelStateData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseChannelStateData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.channel = Channel.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1190,7 +1362,10 @@ export const ChannelStateData = { }; function createBasePacketCommitmentData(): PacketCommitmentData { - return { path: new Uint8Array(), commitment: new Uint8Array() }; + return { + path: new Uint8Array(), + commitment: new Uint8Array(), + }; } export const PacketCommitmentData = { @@ -1198,9 +1373,11 @@ export const PacketCommitmentData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.commitment.length !== 0) { writer.uint32(18).bytes(message.commitment); } + return writer; }, @@ -1208,20 +1385,25 @@ export const PacketCommitmentData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacketCommitmentData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.commitment = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1252,7 +1434,10 @@ export const PacketCommitmentData = { }; function createBasePacketAcknowledgementData(): PacketAcknowledgementData { - return { path: new Uint8Array(), acknowledgement: new Uint8Array() }; + return { + path: new Uint8Array(), + acknowledgement: new Uint8Array(), + }; } export const PacketAcknowledgementData = { @@ -1260,9 +1445,11 @@ export const PacketAcknowledgementData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (message.acknowledgement.length !== 0) { writer.uint32(18).bytes(message.acknowledgement); } + return writer; }, @@ -1270,20 +1457,25 @@ export const PacketAcknowledgementData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacketAcknowledgementData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.acknowledgement = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1318,7 +1510,9 @@ export const PacketAcknowledgementData = { }; function createBasePacketReceiptAbsenceData(): PacketReceiptAbsenceData { - return { path: new Uint8Array() }; + return { + path: new Uint8Array(), + }; } export const PacketReceiptAbsenceData = { @@ -1326,6 +1520,7 @@ export const PacketReceiptAbsenceData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + return writer; }, @@ -1333,22 +1528,28 @@ export const PacketReceiptAbsenceData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePacketReceiptAbsenceData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): PacketReceiptAbsenceData { - return { path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array() }; + return { + path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), + }; }, toJSON(message: PacketReceiptAbsenceData): unknown { @@ -1368,7 +1569,10 @@ export const PacketReceiptAbsenceData = { }; function createBaseNextSequenceRecvData(): NextSequenceRecvData { - return { path: new Uint8Array(), nextSeqRecv: Long.UZERO }; + return { + path: new Uint8Array(), + nextSeqRecv: Long.UZERO, + }; } export const NextSequenceRecvData = { @@ -1376,9 +1580,11 @@ export const NextSequenceRecvData = { if (message.path.length !== 0) { writer.uint32(10).bytes(message.path); } + if (!message.nextSeqRecv.isZero()) { writer.uint32(16).uint64(message.nextSeqRecv); } + return writer; }, @@ -1386,27 +1592,32 @@ export const NextSequenceRecvData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNextSequenceRecvData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.path = reader.bytes(); break; + case 2: message.nextSeqRecv = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): NextSequenceRecvData { return { path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - nextSeqRecv: isSet(object.nextSeqRecv) ? Long.fromValue(object.nextSeqRecv) : Long.UZERO, + nextSeqRecv: isSet(object.nextSeqRecv) ? Long.fromString(object.nextSeqRecv) : Long.UZERO, }; }, @@ -1428,75 +1639,3 @@ export const NextSequenceRecvData = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 0721c43d..d8bfb8ec 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,37 +1,50 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { ProofSpec } from "../../../../confio/proofs"; import { Duration } from "../../../../google/protobuf/duration"; +import { Height } from "../../../core/client/v1/client"; +import { ProofSpec } from "../../../../confio/proofs"; import { Timestamp } from "../../../../google/protobuf/timestamp"; +import { MerkleRoot } from "../../../core/commitment/v1/commitment"; import { SignedHeader } from "../../../../tendermint/types/types"; import { ValidatorSet } from "../../../../tendermint/types/validator"; -import { Height } from "../../../core/client/v1/client"; -import { MerkleRoot } from "../../../core/commitment/v1/commitment"; - +import * as _m0 from "protobufjs/minimal"; +import { + isSet, + DeepPartial, + Exact, + fromJsonTimestamp, + bytesFromBase64, + fromTimestamp, + base64FromBytes, + Long, +} from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.tendermint.v1"; - /** * ClientState from Tendermint tracks the current validator set, latest height, * and a possible frozen height. */ + export interface ClientState { chainId: string; - trustLevel?: Fraction; + trustLevel: Fraction; /** * duration of the period since the LastestTimestamp during which the * submitted headers are valid for upgrade */ - trustingPeriod?: Duration; + + trustingPeriod: Duration; /** duration of the staking unbonding period */ - unbondingPeriod?: Duration; + + unbondingPeriod: Duration; /** defines how much new (untrusted) header's Time can drift into the future. */ - maxClockDrift?: Duration; + + maxClockDrift: Duration; /** Block height when the client was frozen due to a misbehaviour */ - frozenHeight?: Height; + + frozenHeight: Height; /** Latest height the client was updated to */ - latestHeight?: Height; + + latestHeight: Height; /** Proof specifications used in verifying counterparty state */ + proofSpecs: ProofSpec[]; /** * Path at which next upgraded client will be committed. @@ -42,41 +55,44 @@ export interface ClientState { * the default upgrade module, upgrade_path should be []string{"upgrade", * "upgradedIBCState"}` */ + upgradePath: string[]; /** * This flag, when set to true, will allow governance to recover a client * which has expired */ + allowUpdateAfterExpiry: boolean; /** * This flag, when set to true, will allow governance to unfreeze a client * whose chain has experienced a misbehaviour event */ + allowUpdateAfterMisbehaviour: boolean; } - /** ConsensusState defines the consensus state from Tendermint. */ + export interface ConsensusState { /** * timestamp that corresponds to the block height in which the ConsensusState * was stored. */ - timestamp?: Timestamp; + timestamp: Timestamp; /** commitment root (i.e app hash) */ - root?: MerkleRoot; + + root: MerkleRoot; nextValidatorsHash: Uint8Array; } - /** * Misbehaviour is a wrapper over two conflicting Headers * that implements Misbehaviour interface expected by ICS-02 */ + export interface Misbehaviour { clientId: string; - header1?: Header; - header2?: Header; + header_1: Header; + header_2: Header; } - /** * Header defines the Tendermint client consensus Header. * It encapsulates all the information necessary to update from a trusted @@ -91,17 +107,18 @@ export interface Misbehaviour { * hash to TrustedConsensusState.NextValidatorsHash since that is the last * trusted validator set at the TrustedHeight. */ + export interface Header { - signedHeader?: SignedHeader; - validatorSet?: ValidatorSet; - trustedHeight?: Height; - trustedValidators?: ValidatorSet; + signedHeader: SignedHeader; + validatorSet: ValidatorSet; + trustedHeight: Height; + trustedValidators: ValidatorSet; } - /** * Fraction defines the protobuf message type for tmmath.Fraction that only * supports positive values. */ + export interface Fraction { numerator: Long; denominator: Long; @@ -128,36 +145,47 @@ export const ClientState = { if (message.chainId !== "") { writer.uint32(10).string(message.chainId); } + if (message.trustLevel !== undefined) { Fraction.encode(message.trustLevel, writer.uint32(18).fork()).ldelim(); } + if (message.trustingPeriod !== undefined) { Duration.encode(message.trustingPeriod, writer.uint32(26).fork()).ldelim(); } + if (message.unbondingPeriod !== undefined) { Duration.encode(message.unbondingPeriod, writer.uint32(34).fork()).ldelim(); } + if (message.maxClockDrift !== undefined) { Duration.encode(message.maxClockDrift, writer.uint32(42).fork()).ldelim(); } + if (message.frozenHeight !== undefined) { Height.encode(message.frozenHeight, writer.uint32(50).fork()).ldelim(); } + if (message.latestHeight !== undefined) { Height.encode(message.latestHeight, writer.uint32(58).fork()).ldelim(); } + for (const v of message.proofSpecs) { ProofSpec.encode(v!, writer.uint32(66).fork()).ldelim(); } + for (const v of message.upgradePath) { writer.uint32(74).string(v!); } + if (message.allowUpdateAfterExpiry === true) { writer.uint32(80).bool(message.allowUpdateAfterExpiry); } + if (message.allowUpdateAfterMisbehaviour === true) { writer.uint32(88).bool(message.allowUpdateAfterMisbehaviour); } + return writer; }, @@ -165,47 +193,61 @@ export const ClientState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.chainId = reader.string(); break; + case 2: message.trustLevel = Fraction.decode(reader, reader.uint32()); break; + case 3: message.trustingPeriod = Duration.decode(reader, reader.uint32()); break; + case 4: message.unbondingPeriod = Duration.decode(reader, reader.uint32()); break; + case 5: message.maxClockDrift = Duration.decode(reader, reader.uint32()); break; + case 6: message.frozenHeight = Height.decode(reader, reader.uint32()); break; + case 7: message.latestHeight = Height.decode(reader, reader.uint32()); break; + case 8: message.proofSpecs.push(ProofSpec.decode(reader, reader.uint32())); break; + case 9: message.upgradePath.push(reader.string()); break; + case 10: message.allowUpdateAfterExpiry = reader.bool(); break; + case 11: message.allowUpdateAfterMisbehaviour = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -236,26 +278,26 @@ export const ClientState = { message.chainId !== undefined && (obj.chainId = message.chainId); message.trustLevel !== undefined && (obj.trustLevel = message.trustLevel ? Fraction.toJSON(message.trustLevel) : undefined); - message.trustingPeriod !== undefined && - (obj.trustingPeriod = message.trustingPeriod ? Duration.toJSON(message.trustingPeriod) : undefined); - message.unbondingPeriod !== undefined && - (obj.unbondingPeriod = message.unbondingPeriod ? Duration.toJSON(message.unbondingPeriod) : undefined); - message.maxClockDrift !== undefined && - (obj.maxClockDrift = message.maxClockDrift ? Duration.toJSON(message.maxClockDrift) : undefined); + message.trustingPeriod !== undefined && (obj.trustingPeriod = message.trustingPeriod); + message.unbondingPeriod !== undefined && (obj.unbondingPeriod = message.unbondingPeriod); + message.maxClockDrift !== undefined && (obj.maxClockDrift = message.maxClockDrift); message.frozenHeight !== undefined && (obj.frozenHeight = message.frozenHeight ? Height.toJSON(message.frozenHeight) : undefined); message.latestHeight !== undefined && (obj.latestHeight = message.latestHeight ? Height.toJSON(message.latestHeight) : undefined); + if (message.proofSpecs) { obj.proofSpecs = message.proofSpecs.map((e) => (e ? ProofSpec.toJSON(e) : undefined)); } else { obj.proofSpecs = []; } + if (message.upgradePath) { obj.upgradePath = message.upgradePath.map((e) => e); } else { obj.upgradePath = []; } + message.allowUpdateAfterExpiry !== undefined && (obj.allowUpdateAfterExpiry = message.allowUpdateAfterExpiry); message.allowUpdateAfterMisbehaviour !== undefined && @@ -270,18 +312,9 @@ export const ClientState = { object.trustLevel !== undefined && object.trustLevel !== null ? Fraction.fromPartial(object.trustLevel) : undefined; - message.trustingPeriod = - object.trustingPeriod !== undefined && object.trustingPeriod !== null - ? Duration.fromPartial(object.trustingPeriod) - : undefined; - message.unbondingPeriod = - object.unbondingPeriod !== undefined && object.unbondingPeriod !== null - ? Duration.fromPartial(object.unbondingPeriod) - : undefined; - message.maxClockDrift = - object.maxClockDrift !== undefined && object.maxClockDrift !== null - ? Duration.fromPartial(object.maxClockDrift) - : undefined; + message.trustingPeriod = object.trustingPeriod ?? undefined; + message.unbondingPeriod = object.unbondingPeriod ?? undefined; + message.maxClockDrift = object.maxClockDrift ?? undefined; message.frozenHeight = object.frozenHeight !== undefined && object.frozenHeight !== null ? Height.fromPartial(object.frozenHeight) @@ -299,7 +332,11 @@ export const ClientState = { }; function createBaseConsensusState(): ConsensusState { - return { timestamp: undefined, root: undefined, nextValidatorsHash: new Uint8Array() }; + return { + timestamp: undefined, + root: undefined, + nextValidatorsHash: new Uint8Array(), + }; } export const ConsensusState = { @@ -307,12 +344,15 @@ export const ConsensusState = { if (message.timestamp !== undefined) { Timestamp.encode(message.timestamp, writer.uint32(10).fork()).ldelim(); } + if (message.root !== undefined) { MerkleRoot.encode(message.root, writer.uint32(18).fork()).ldelim(); } + if (message.nextValidatorsHash.length !== 0) { writer.uint32(26).bytes(message.nextValidatorsHash); } + return writer; }, @@ -320,23 +360,29 @@ export const ConsensusState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.timestamp = Timestamp.decode(reader, reader.uint32()); break; + case 2: message.root = MerkleRoot.decode(reader, reader.uint32()); break; + case 3: message.nextValidatorsHash = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -375,7 +421,11 @@ export const ConsensusState = { }; function createBaseMisbehaviour(): Misbehaviour { - return { clientId: "", header1: undefined, header2: undefined }; + return { + clientId: "", + header_1: undefined, + header_2: undefined, + }; } export const Misbehaviour = { @@ -383,12 +433,15 @@ export const Misbehaviour = { if (message.clientId !== "") { writer.uint32(10).string(message.clientId); } - if (message.header1 !== undefined) { - Header.encode(message.header1, writer.uint32(18).fork()).ldelim(); + + if (message.header_1 !== undefined) { + Header.encode(message.header_1, writer.uint32(18).fork()).ldelim(); } - if (message.header2 !== undefined) { - Header.encode(message.header2, writer.uint32(26).fork()).ldelim(); + + if (message.header_2 !== undefined) { + Header.encode(message.header_2, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -396,54 +449,60 @@ export const Misbehaviour = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMisbehaviour(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.clientId = reader.string(); break; + case 2: - message.header1 = Header.decode(reader, reader.uint32()); + message.header_1 = Header.decode(reader, reader.uint32()); break; + case 3: - message.header2 = Header.decode(reader, reader.uint32()); + message.header_2 = Header.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Misbehaviour { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - header1: isSet(object.header1) ? Header.fromJSON(object.header1) : undefined, - header2: isSet(object.header2) ? Header.fromJSON(object.header2) : undefined, + header_1: isSet(object.header_1) ? Header.fromJSON(object.header_1) : undefined, + header_2: isSet(object.header_2) ? Header.fromJSON(object.header_2) : undefined, }; }, toJSON(message: Misbehaviour): unknown { const obj: any = {}; message.clientId !== undefined && (obj.clientId = message.clientId); - message.header1 !== undefined && - (obj.header1 = message.header1 ? Header.toJSON(message.header1) : undefined); - message.header2 !== undefined && - (obj.header2 = message.header2 ? Header.toJSON(message.header2) : undefined); + message.header_1 !== undefined && + (obj.header_1 = message.header_1 ? Header.toJSON(message.header_1) : undefined); + message.header_2 !== undefined && + (obj.header_2 = message.header_2 ? Header.toJSON(message.header_2) : undefined); return obj; }, fromPartial, I>>(object: I): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; - message.header1 = - object.header1 !== undefined && object.header1 !== null - ? Header.fromPartial(object.header1) + message.header_1 = + object.header_1 !== undefined && object.header_1 !== null + ? Header.fromPartial(object.header_1) : undefined; - message.header2 = - object.header2 !== undefined && object.header2 !== null - ? Header.fromPartial(object.header2) + message.header_2 = + object.header_2 !== undefined && object.header_2 !== null + ? Header.fromPartial(object.header_2) : undefined; return message; }, @@ -463,15 +522,19 @@ export const Header = { 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(); } + if (message.trustedHeight !== undefined) { Height.encode(message.trustedHeight, writer.uint32(26).fork()).ldelim(); } + if (message.trustedValidators !== undefined) { ValidatorSet.encode(message.trustedValidators, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -479,26 +542,33 @@ export const Header = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHeader(); + 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; + case 3: message.trustedHeight = Height.decode(reader, reader.uint32()); break; + case 4: message.trustedValidators = ValidatorSet.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -551,7 +621,10 @@ export const Header = { }; function createBaseFraction(): Fraction { - return { numerator: Long.UZERO, denominator: Long.UZERO }; + return { + numerator: Long.UZERO, + denominator: Long.UZERO, + }; } export const Fraction = { @@ -559,9 +632,11 @@ export const Fraction = { if (!message.numerator.isZero()) { writer.uint32(8).uint64(message.numerator); } + if (!message.denominator.isZero()) { writer.uint32(16).uint64(message.denominator); } + return writer; }, @@ -569,27 +644,32 @@ export const Fraction = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFraction(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.numerator = reader.uint64() as Long; break; + case 2: message.denominator = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Fraction { return { - numerator: isSet(object.numerator) ? Long.fromValue(object.numerator) : Long.UZERO, - denominator: isSet(object.denominator) ? Long.fromValue(object.denominator) : Long.UZERO, + numerator: isSet(object.numerator) ? Long.fromString(object.numerator) : Long.UZERO, + denominator: isSet(object.denominator) ? Long.fromString(object.denominator) : Long.UZERO, }; }, @@ -613,101 +693,3 @@ export const Fraction = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 79c382bc..f22d7d88 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,215 +1,362 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Timestamp } from "../../google/protobuf/timestamp"; -import { PublicKey } from "../crypto/keys"; +import { Header } from "../types/types"; import { ProofOps } from "../crypto/proof"; import { EvidenceParams, ValidatorParams, VersionParams } from "../types/params"; -import { Header } from "../types/types"; - +import { PublicKey } from "../crypto/keys"; +import * as _m0 from "protobufjs/minimal"; +import { + isSet, + DeepPartial, + Exact, + Long, + fromJsonTimestamp, + bytesFromBase64, + fromTimestamp, + base64FromBytes, +} from "../../helpers"; 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"; - case CheckTxType.UNRECOGNIZED: + + default: + return "UNKNOWN"; + } +} +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 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 "UNRECOGNIZED"; + 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"; + } +} 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"; - case EvidenceType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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; + echo?: RequestEcho; + flush?: RequestFlush; + info?: RequestInfo; + setOption?: RequestSetOption; + initChain?: RequestInitChain; + query?: RequestQuery; + beginBlock?: RequestBeginBlock; + checkTx?: RequestCheckTx; + deliverTx?: RequestDeliverTx; + endBlock?: RequestEndBlock; + commit?: RequestCommit; + listSnapshots?: RequestListSnapshots; + offerSnapshot?: RequestOfferSnapshot; + loadSnapshotChunk?: RequestLoadSnapshotChunk; + applySnapshotChunk?: RequestApplySnapshotChunk; } - export interface RequestEcho { message: string; } - export interface RequestFlush {} - export interface RequestInfo { version: string; blockVersion: Long; p2pVersion: Long; } - /** nondeterministic */ + export interface RequestSetOption { key: string; value: string; } - export interface RequestInitChain { - time?: Timestamp; + time: Timestamp; chainId: string; - consensusParams?: ConsensusParams; + consensusParams: ConsensusParams; validators: ValidatorUpdate[]; appStateBytes: Uint8Array; initialHeight: Long; } - export interface RequestQuery { data: Uint8Array; path: string; height: Long; prove: boolean; } - export interface RequestBeginBlock { hash: Uint8Array; - header?: Header; - lastCommitInfo?: LastCommitInfo; + header: Header; + lastCommitInfo: LastCommitInfo; byzantineValidators: Evidence[]; } - export interface RequestCheckTx { tx: Uint8Array; type: CheckTxType; } - export interface RequestDeliverTx { tx: Uint8Array; } - export interface RequestEndBlock { height: Long; } - export interface RequestCommit {} - /** lists available snapshots */ -export interface RequestListSnapshots {} +export interface RequestListSnapshots {} /** offers a snapshot to the application */ + export interface RequestOfferSnapshot { /** snapshot offered by peers */ - snapshot?: Snapshot; + snapshot: Snapshot; /** light client-verified app hash for snapshot height */ + appHash: Uint8Array; } - /** loads a snapshot chunk */ + export interface RequestLoadSnapshotChunk { height: Long; 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; + exception?: ResponseException; + echo?: ResponseEcho; + flush?: ResponseFlush; + info?: ResponseInfo; + setOption?: ResponseSetOption; + initChain?: ResponseInitChain; + query?: ResponseQuery; + beginBlock?: ResponseBeginBlock; + checkTx?: ResponseCheckTx; + deliverTx?: ResponseDeliverTx; + endBlock?: ResponseEndBlock; + commit?: ResponseCommit; + listSnapshots?: ResponseListSnapshots; + offerSnapshot?: ResponseOfferSnapshot; + loadSnapshotChunk?: ResponseLoadSnapshotChunk; + applySnapshotChunk?: ResponseApplySnapshotChunk; } - /** nondeterministic */ + export interface ResponseException { error: string; } - export interface ResponseEcho { message: string; } - export interface ResponseFlush {} - export interface ResponseInfo { data: string; version: string; @@ -217,323 +364,206 @@ export interface ResponseInfo { lastBlockHeight: Long; lastBlockAppHash: Uint8Array; } - /** nondeterministic */ + export interface ResponseSetOption { code: number; /** bytes data = 2; */ + log: string; info: string; } - export interface ResponseInitChain { - consensusParams?: ConsensusParams; + consensusParams: ConsensusParams; validators: ValidatorUpdate[]; appHash: Uint8Array; } - export interface ResponseQuery { code: number; /** bytes data = 2; // use "value" instead. */ + log: string; /** nondeterministic */ + info: string; index: Long; key: Uint8Array; value: Uint8Array; - proofOps?: ProofOps; + proofOps: ProofOps; height: Long; codespace: string; } - export interface ResponseBeginBlock { events: Event[]; } - export interface ResponseCheckTx { code: number; data: Uint8Array; /** nondeterministic */ + log: string; /** nondeterministic */ + info: string; gasWanted: Long; gasUsed: Long; events: Event[]; codespace: string; } - export interface ResponseDeliverTx { code: number; data: Uint8Array; /** nondeterministic */ + log: string; /** nondeterministic */ + info: string; gasWanted: Long; gasUsed: Long; events: Event[]; codespace: string; } - export interface ResponseEndBlock { validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates?: ConsensusParams; + consensusParamUpdates: ConsensusParams; events: Event[]; } - export interface ResponseCommit { /** reserve 1 */ data: Uint8Array; retainHeight: Long; } - 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"; - case ResponseOfferSnapshot_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - 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"; - case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } + rejectSenders: string[]; } - /** * ConsensusParams contains all consensus-relevant parameters * that can be adjusted by the abci app */ + export interface ConsensusParams { - block?: BlockParams; - evidence?: EvidenceParams; - validator?: ValidatorParams; - version?: VersionParams; + block: BlockParams; + evidence: EvidenceParams; + validator: ValidatorParams; + version: VersionParams; } - /** BlockParams contains limits on the block size. */ + export interface BlockParams { /** Note: must be greater than 0 */ maxBytes: Long; /** Note: must be greater or equal to -1 */ + maxGas: Long; } - 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: Long; index: number; tx: Uint8Array; - result?: ResponseDeliverTx; + result: ResponseDeliverTx; } - /** Validator */ + export interface Validator { - /** The first 20 bytes of SHA256(public key) */ + /** + * The first 20 bytes of SHA256(public key) + * PubKey pub_key = 2 [(gogoproto.nullable)=false]; + */ address: Uint8Array; - /** PubKey pub_key = 2 [(gogoproto.nullable)=false]; */ + /** The voting power */ + power: Long; } - /** ValidatorUpdate */ + export interface ValidatorUpdate { - pubKey?: PublicKey; + pubKey: PublicKey; power: Long; } - /** VoteInfo */ + export interface VoteInfo { - validator?: Validator; + validator: Validator; signedLastBlock: boolean; } - export interface Evidence { type: EvidenceType; /** The offending validator */ - validator?: Validator; + + validator: Validator; /** The height when the offense occurred */ + height: Long; /** The corresponding time where the offense occurred */ - time?: Timestamp; + + time: Timestamp; /** * 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: Long; } - export interface Snapshot { /** The height at which the snapshot was taken */ height: Long; /** 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; } @@ -562,48 +592,63 @@ export const Request = { 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; }, @@ -611,59 +656,77 @@ export const Request = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequest(); + 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; }, @@ -799,7 +862,9 @@ export const Request = { }; function createBaseRequestEcho(): RequestEcho { - return { message: "" }; + return { + message: "", + }; } export const RequestEcho = { @@ -807,6 +872,7 @@ export const RequestEcho = { if (message.message !== "") { writer.uint32(10).string(message.message); } + return writer; }, @@ -814,22 +880,28 @@ export const RequestEcho = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestEcho(); + 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 { - return { message: isSet(object.message) ? String(object.message) : "" }; + return { + message: isSet(object.message) ? String(object.message) : "", + }; }, toJSON(message: RequestEcho): unknown { @@ -858,14 +930,17 @@ export const RequestFlush = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestFlush(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -885,7 +960,11 @@ export const RequestFlush = { }; function createBaseRequestInfo(): RequestInfo { - return { version: "", blockVersion: Long.UZERO, p2pVersion: Long.UZERO }; + return { + version: "", + blockVersion: Long.UZERO, + p2pVersion: Long.UZERO, + }; } export const RequestInfo = { @@ -893,12 +972,15 @@ export const RequestInfo = { if (message.version !== "") { writer.uint32(10).string(message.version); } + if (!message.blockVersion.isZero()) { writer.uint32(16).uint64(message.blockVersion); } + if (!message.p2pVersion.isZero()) { writer.uint32(24).uint64(message.p2pVersion); } + return writer; }, @@ -906,31 +988,37 @@ export const RequestInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.version = reader.string(); break; + case 2: message.blockVersion = reader.uint64() as Long; break; + case 3: message.p2pVersion = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): RequestInfo { return { version: isSet(object.version) ? String(object.version) : "", - blockVersion: isSet(object.blockVersion) ? Long.fromValue(object.blockVersion) : Long.UZERO, - p2pVersion: isSet(object.p2pVersion) ? Long.fromValue(object.p2pVersion) : Long.UZERO, + blockVersion: isSet(object.blockVersion) ? Long.fromString(object.blockVersion) : Long.UZERO, + p2pVersion: isSet(object.p2pVersion) ? Long.fromString(object.p2pVersion) : Long.UZERO, }; }, @@ -959,7 +1047,10 @@ export const RequestInfo = { }; function createBaseRequestSetOption(): RequestSetOption { - return { key: "", value: "" }; + return { + key: "", + value: "", + }; } export const RequestSetOption = { @@ -967,9 +1058,11 @@ export const RequestSetOption = { if (message.key !== "") { writer.uint32(10).string(message.key); } + if (message.value !== "") { writer.uint32(18).string(message.value); } + return writer; }, @@ -977,20 +1070,25 @@ export const RequestSetOption = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestSetOption(); + 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; }, @@ -1032,21 +1130,27 @@ export const RequestInitChain = { if (message.time !== undefined) { Timestamp.encode(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.isZero()) { writer.uint32(48).int64(message.initialHeight); } + return writer; }, @@ -1054,32 +1158,41 @@ export const RequestInitChain = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestInitChain(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.time = 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1094,7 +1207,7 @@ export const RequestInitChain = { ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e)) : [], appStateBytes: isSet(object.appStateBytes) ? bytesFromBase64(object.appStateBytes) : new Uint8Array(), - initialHeight: isSet(object.initialHeight) ? Long.fromValue(object.initialHeight) : Long.ZERO, + initialHeight: isSet(object.initialHeight) ? Long.fromString(object.initialHeight) : Long.ZERO, }; }, @@ -1106,11 +1219,13 @@ export const RequestInitChain = { (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(), @@ -1140,7 +1255,12 @@ export const RequestInitChain = { }; function createBaseRequestQuery(): RequestQuery { - return { data: new Uint8Array(), path: "", height: Long.ZERO, prove: false }; + return { + data: new Uint8Array(), + path: "", + height: Long.ZERO, + prove: false, + }; } export const RequestQuery = { @@ -1148,15 +1268,19 @@ export const RequestQuery = { if (message.data.length !== 0) { writer.uint32(10).bytes(message.data); } + if (message.path !== "") { writer.uint32(18).string(message.path); } + if (!message.height.isZero()) { writer.uint32(24).int64(message.height); } + if (message.prove === true) { writer.uint32(32).bool(message.prove); } + return writer; }, @@ -1164,26 +1288,33 @@ export const RequestQuery = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestQuery(); + 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 = reader.int64() as Long; break; + case 4: message.prove = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1191,7 +1322,7 @@ export const RequestQuery = { return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), path: isSet(object.path) ? String(object.path) : "", - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, prove: isSet(object.prove) ? Boolean(object.prove) : false, }; }, @@ -1218,7 +1349,12 @@ export const RequestQuery = { }; function createBaseRequestBeginBlock(): RequestBeginBlock { - return { hash: new Uint8Array(), header: undefined, lastCommitInfo: undefined, byzantineValidators: [] }; + return { + hash: new Uint8Array(), + header: undefined, + lastCommitInfo: undefined, + byzantineValidators: [], + }; } export const RequestBeginBlock = { @@ -1226,15 +1362,19 @@ export const RequestBeginBlock = { 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; }, @@ -1242,26 +1382,33 @@ export const RequestBeginBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestBeginBlock(); + 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; }, @@ -1287,11 +1434,13 @@ export const RequestBeginBlock = { (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; }, @@ -1310,7 +1459,10 @@ export const RequestBeginBlock = { }; function createBaseRequestCheckTx(): RequestCheckTx { - return { tx: new Uint8Array(), type: 0 }; + return { + tx: new Uint8Array(), + type: 0, + }; } export const RequestCheckTx = { @@ -1318,9 +1470,11 @@ export const RequestCheckTx = { if (message.tx.length !== 0) { writer.uint32(10).bytes(message.tx); } + if (message.type !== 0) { writer.uint32(16).int32(message.type); } + return writer; }, @@ -1328,20 +1482,25 @@ export const RequestCheckTx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestCheckTx(); + 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; }, @@ -1369,7 +1528,9 @@ export const RequestCheckTx = { }; function createBaseRequestDeliverTx(): RequestDeliverTx { - return { tx: new Uint8Array() }; + return { + tx: new Uint8Array(), + }; } export const RequestDeliverTx = { @@ -1377,6 +1538,7 @@ export const RequestDeliverTx = { if (message.tx.length !== 0) { writer.uint32(10).bytes(message.tx); } + return writer; }, @@ -1384,22 +1546,28 @@ export const RequestDeliverTx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestDeliverTx(); + 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 { - return { tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array() }; + return { + tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(), + }; }, toJSON(message: RequestDeliverTx): unknown { @@ -1417,7 +1585,9 @@ export const RequestDeliverTx = { }; function createBaseRequestEndBlock(): RequestEndBlock { - return { height: Long.ZERO }; + return { + height: Long.ZERO, + }; } export const RequestEndBlock = { @@ -1425,6 +1595,7 @@ export const RequestEndBlock = { if (!message.height.isZero()) { writer.uint32(8).int64(message.height); } + return writer; }, @@ -1432,22 +1603,28 @@ export const RequestEndBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestEndBlock(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): RequestEndBlock { - return { height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO }; + return { + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + }; }, toJSON(message: RequestEndBlock): unknown { @@ -1477,14 +1654,17 @@ export const RequestCommit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestCommit(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1516,14 +1696,17 @@ export const RequestListSnapshots = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestListSnapshots(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1543,7 +1726,10 @@ export const RequestListSnapshots = { }; function createBaseRequestOfferSnapshot(): RequestOfferSnapshot { - return { snapshot: undefined, appHash: new Uint8Array() }; + return { + snapshot: undefined, + appHash: new Uint8Array(), + }; } export const RequestOfferSnapshot = { @@ -1551,9 +1737,11 @@ export const RequestOfferSnapshot = { 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; }, @@ -1561,20 +1749,25 @@ export const RequestOfferSnapshot = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestOfferSnapshot(); + 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; }, @@ -1606,7 +1799,11 @@ export const RequestOfferSnapshot = { }; function createBaseRequestLoadSnapshotChunk(): RequestLoadSnapshotChunk { - return { height: Long.UZERO, format: 0, chunk: 0 }; + return { + height: Long.UZERO, + format: 0, + chunk: 0, + }; } export const RequestLoadSnapshotChunk = { @@ -1614,12 +1811,15 @@ export const RequestLoadSnapshotChunk = { if (!message.height.isZero()) { 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; }, @@ -1627,29 +1827,35 @@ export const RequestLoadSnapshotChunk = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestLoadSnapshotChunk(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunk: isSet(object.chunk) ? Number(object.chunk) : 0, }; @@ -1676,7 +1882,11 @@ export const RequestLoadSnapshotChunk = { }; function createBaseRequestApplySnapshotChunk(): RequestApplySnapshotChunk { - return { index: 0, chunk: new Uint8Array(), sender: "" }; + return { + index: 0, + chunk: new Uint8Array(), + sender: "", + }; } export const RequestApplySnapshotChunk = { @@ -1684,12 +1894,15 @@ export const RequestApplySnapshotChunk = { 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; }, @@ -1697,23 +1910,29 @@ export const RequestApplySnapshotChunk = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRequestApplySnapshotChunk(); + 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; }, @@ -1771,51 +1990,67 @@ export const Response = { 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; }, @@ -1823,62 +2058,81 @@ export const Response = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponse(); + 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; }, @@ -2021,7 +2275,9 @@ export const Response = { }; function createBaseResponseException(): ResponseException { - return { error: "" }; + return { + error: "", + }; } export const ResponseException = { @@ -2029,6 +2285,7 @@ export const ResponseException = { if (message.error !== "") { writer.uint32(10).string(message.error); } + return writer; }, @@ -2036,22 +2293,28 @@ export const ResponseException = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseException(); + 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 { - return { error: isSet(object.error) ? String(object.error) : "" }; + return { + error: isSet(object.error) ? String(object.error) : "", + }; }, toJSON(message: ResponseException): unknown { @@ -2068,7 +2331,9 @@ export const ResponseException = { }; function createBaseResponseEcho(): ResponseEcho { - return { message: "" }; + return { + message: "", + }; } export const ResponseEcho = { @@ -2076,6 +2341,7 @@ export const ResponseEcho = { if (message.message !== "") { writer.uint32(10).string(message.message); } + return writer; }, @@ -2083,22 +2349,28 @@ export const ResponseEcho = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseEcho(); + 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 { - return { message: isSet(object.message) ? String(object.message) : "" }; + return { + message: isSet(object.message) ? String(object.message) : "", + }; }, toJSON(message: ResponseEcho): unknown { @@ -2127,14 +2399,17 @@ export const ResponseFlush = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseFlush(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -2168,18 +2443,23 @@ export const ResponseInfo = { if (message.data !== "") { writer.uint32(10).string(message.data); } + if (message.version !== "") { writer.uint32(18).string(message.version); } + if (!message.appVersion.isZero()) { writer.uint32(24).uint64(message.appVersion); } + if (!message.lastBlockHeight.isZero()) { writer.uint32(32).int64(message.lastBlockHeight); } + if (message.lastBlockAppHash.length !== 0) { writer.uint32(42).bytes(message.lastBlockAppHash); } + return writer; }, @@ -2187,29 +2467,37 @@ export const ResponseInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseInfo(); + 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 = reader.uint64() as Long; break; + case 4: message.lastBlockHeight = reader.int64() as Long; break; + case 5: message.lastBlockAppHash = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -2217,8 +2505,8 @@ export const ResponseInfo = { return { data: isSet(object.data) ? String(object.data) : "", version: isSet(object.version) ? String(object.version) : "", - appVersion: isSet(object.appVersion) ? Long.fromValue(object.appVersion) : Long.UZERO, - lastBlockHeight: isSet(object.lastBlockHeight) ? Long.fromValue(object.lastBlockHeight) : Long.ZERO, + appVersion: isSet(object.appVersion) ? Long.fromString(object.appVersion) : Long.UZERO, + lastBlockHeight: isSet(object.lastBlockHeight) ? Long.fromString(object.lastBlockHeight) : Long.ZERO, lastBlockAppHash: isSet(object.lastBlockAppHash) ? bytesFromBase64(object.lastBlockAppHash) : new Uint8Array(), @@ -2257,7 +2545,11 @@ export const ResponseInfo = { }; function createBaseResponseSetOption(): ResponseSetOption { - return { code: 0, log: "", info: "" }; + return { + code: 0, + log: "", + info: "", + }; } export const ResponseSetOption = { @@ -2265,12 +2557,15 @@ export const ResponseSetOption = { 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; }, @@ -2278,23 +2573,29 @@ export const ResponseSetOption = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseSetOption(); + 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; }, @@ -2324,7 +2625,11 @@ export const ResponseSetOption = { }; function createBaseResponseInitChain(): ResponseInitChain { - return { consensusParams: undefined, validators: [], appHash: new Uint8Array() }; + return { + consensusParams: undefined, + validators: [], + appHash: new Uint8Array(), + }; } export const ResponseInitChain = { @@ -2332,12 +2637,15 @@ export const ResponseInitChain = { 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; }, @@ -2345,23 +2653,29 @@ export const ResponseInitChain = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseInitChain(); + 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; }, @@ -2383,11 +2697,13 @@ export const ResponseInitChain = { (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; @@ -2424,30 +2740,39 @@ export const ResponseQuery = { 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.isZero()) { 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.isZero()) { writer.uint32(72).int64(message.height); } + if (message.codespace !== "") { writer.uint32(82).string(message.codespace); } + return writer; }, @@ -2455,41 +2780,53 @@ export const ResponseQuery = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseQuery(); + 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 = 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 = reader.int64() as Long; break; + case 10: message.codespace = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -2498,11 +2835,11 @@ export const ResponseQuery = { code: isSet(object.code) ? Number(object.code) : 0, log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, + index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), proofOps: isSet(object.proofOps) ? ProofOps.fromJSON(object.proofOps) : undefined, - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, codespace: isSet(object.codespace) ? String(object.codespace) : "", }; }, @@ -2545,7 +2882,9 @@ export const ResponseQuery = { }; function createBaseResponseBeginBlock(): ResponseBeginBlock { - return { events: [] }; + return { + events: [], + }; } export const ResponseBeginBlock = { @@ -2553,6 +2892,7 @@ export const ResponseBeginBlock = { for (const v of message.events) { Event.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -2560,31 +2900,39 @@ export const ResponseBeginBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseBeginBlock(); + 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 { - return { events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [] }; + return { + events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], + }; }, 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; }, @@ -2613,27 +2961,35 @@ export const ResponseCheckTx = { 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.isZero()) { writer.uint32(40).int64(message.gasWanted); } + if (!message.gasUsed.isZero()) { 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; }, @@ -2641,38 +2997,49 @@ export const ResponseCheckTx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseCheckTx(); + 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 = reader.int64() as Long; break; + case 6: message.gasUsed = 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; }, @@ -2682,8 +3049,8 @@ export const ResponseCheckTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gas_wanted) ? Long.fromValue(object.gas_wanted) : Long.ZERO, - gasUsed: isSet(object.gas_used) ? Long.fromValue(object.gas_used) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -2696,13 +3063,15 @@ export const ResponseCheckTx = { (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.gas_wanted = (message.gasWanted || Long.ZERO).toString()); - message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || Long.ZERO).toString()); + message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.ZERO).toString()); + message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString()); + 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; }, @@ -2743,27 +3112,35 @@ export const ResponseDeliverTx = { 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.isZero()) { writer.uint32(40).int64(message.gasWanted); } + if (!message.gasUsed.isZero()) { 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; }, @@ -2771,38 +3148,49 @@ export const ResponseDeliverTx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseDeliverTx(); + 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 = reader.int64() as Long; break; + case 6: message.gasUsed = 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; }, @@ -2812,8 +3200,8 @@ export const ResponseDeliverTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gas_wanted) ? Long.fromValue(object.gas_wanted) : Long.ZERO, - gasUsed: isSet(object.gas_used) ? Long.fromValue(object.gas_used) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -2826,13 +3214,15 @@ export const ResponseDeliverTx = { (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.gas_wanted = (message.gasWanted || Long.ZERO).toString()); - message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || Long.ZERO).toString()); + message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.ZERO).toString()); + message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString()); + 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; }, @@ -2856,7 +3246,11 @@ export const ResponseDeliverTx = { }; function createBaseResponseEndBlock(): ResponseEndBlock { - return { validatorUpdates: [], consensusParamUpdates: undefined, events: [] }; + return { + validatorUpdates: [], + consensusParamUpdates: undefined, + events: [], + }; } export const ResponseEndBlock = { @@ -2864,12 +3258,15 @@ export const ResponseEndBlock = { 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; }, @@ -2877,23 +3274,29 @@ export const ResponseEndBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseEndBlock(); + 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; }, @@ -2911,20 +3314,24 @@ export const ResponseEndBlock = { 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; }, @@ -2941,7 +3348,10 @@ export const ResponseEndBlock = { }; function createBaseResponseCommit(): ResponseCommit { - return { data: new Uint8Array(), retainHeight: Long.ZERO }; + return { + data: new Uint8Array(), + retainHeight: Long.ZERO, + }; } export const ResponseCommit = { @@ -2949,9 +3359,11 @@ export const ResponseCommit = { if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } + if (!message.retainHeight.isZero()) { writer.uint32(24).int64(message.retainHeight); } + return writer; }, @@ -2959,27 +3371,32 @@ export const ResponseCommit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseCommit(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 2: message.data = reader.bytes(); break; + case 3: message.retainHeight = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ResponseCommit { return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - retainHeight: isSet(object.retainHeight) ? Long.fromValue(object.retainHeight) : Long.ZERO, + retainHeight: isSet(object.retainHeight) ? Long.fromString(object.retainHeight) : Long.ZERO, }; }, @@ -3003,7 +3420,9 @@ export const ResponseCommit = { }; function createBaseResponseListSnapshots(): ResponseListSnapshots { - return { snapshots: [] }; + return { + snapshots: [], + }; } export const ResponseListSnapshots = { @@ -3011,6 +3430,7 @@ export const ResponseListSnapshots = { for (const v of message.snapshots) { Snapshot.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -3018,17 +3438,21 @@ export const ResponseListSnapshots = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseListSnapshots(); + 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; }, @@ -3042,11 +3466,13 @@ export const ResponseListSnapshots = { 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; }, @@ -3058,7 +3484,9 @@ export const ResponseListSnapshots = { }; function createBaseResponseOfferSnapshot(): ResponseOfferSnapshot { - return { result: 0 }; + return { + result: 0, + }; } export const ResponseOfferSnapshot = { @@ -3066,6 +3494,7 @@ export const ResponseOfferSnapshot = { if (message.result !== 0) { writer.uint32(8).int32(message.result); } + return writer; }, @@ -3073,22 +3502,28 @@ export const ResponseOfferSnapshot = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseOfferSnapshot(); + 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 { - return { result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : 0 }; + return { + result: isSet(object.result) ? responseOfferSnapshot_ResultFromJSON(object.result) : 0, + }; }, toJSON(message: ResponseOfferSnapshot): unknown { @@ -3105,7 +3540,9 @@ export const ResponseOfferSnapshot = { }; function createBaseResponseLoadSnapshotChunk(): ResponseLoadSnapshotChunk { - return { chunk: new Uint8Array() }; + return { + chunk: new Uint8Array(), + }; } export const ResponseLoadSnapshotChunk = { @@ -3113,6 +3550,7 @@ export const ResponseLoadSnapshotChunk = { if (message.chunk.length !== 0) { writer.uint32(10).bytes(message.chunk); } + return writer; }, @@ -3120,22 +3558,28 @@ export const ResponseLoadSnapshotChunk = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseLoadSnapshotChunk(); + 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 { - return { chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array() }; + return { + chunk: isSet(object.chunk) ? bytesFromBase64(object.chunk) : new Uint8Array(), + }; }, toJSON(message: ResponseLoadSnapshotChunk): unknown { @@ -3155,7 +3599,11 @@ export const ResponseLoadSnapshotChunk = { }; function createBaseResponseApplySnapshotChunk(): ResponseApplySnapshotChunk { - return { result: 0, refetchChunks: [], rejectSenders: [] }; + return { + result: 0, + refetchChunks: [], + rejectSenders: [], + }; } export const ResponseApplySnapshotChunk = { @@ -3163,14 +3611,19 @@ export const ResponseApplySnapshotChunk = { 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; }, @@ -3178,30 +3631,38 @@ export const ResponseApplySnapshotChunk = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResponseApplySnapshotChunk(); + 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; }, @@ -3220,16 +3681,19 @@ export const ResponseApplySnapshotChunk = { 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) => Math.round(e)); } else { obj.refetchChunks = []; } + if (message.rejectSenders) { obj.rejectSenders = message.rejectSenders.map((e) => e); } else { obj.rejectSenders = []; } + return obj; }, @@ -3245,7 +3709,12 @@ export const ResponseApplySnapshotChunk = { }; function createBaseConsensusParams(): ConsensusParams { - return { block: undefined, evidence: undefined, validator: undefined, version: undefined }; + return { + block: undefined, + evidence: undefined, + validator: undefined, + version: undefined, + }; } export const ConsensusParams = { @@ -3253,15 +3722,19 @@ export const ConsensusParams = { 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; }, @@ -3269,26 +3742,33 @@ export const ConsensusParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusParams(); + 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; }, @@ -3335,7 +3815,10 @@ export const ConsensusParams = { }; function createBaseBlockParams(): BlockParams { - return { maxBytes: Long.ZERO, maxGas: Long.ZERO }; + return { + maxBytes: Long.ZERO, + maxGas: Long.ZERO, + }; } export const BlockParams = { @@ -3343,9 +3826,11 @@ export const BlockParams = { if (!message.maxBytes.isZero()) { writer.uint32(8).int64(message.maxBytes); } + if (!message.maxGas.isZero()) { writer.uint32(16).int64(message.maxGas); } + return writer; }, @@ -3353,27 +3838,32 @@ export const BlockParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxBytes = reader.int64() as Long; break; + case 2: message.maxGas = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): BlockParams { return { - maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, - maxGas: isSet(object.maxGas) ? Long.fromValue(object.maxGas) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, + maxGas: isSet(object.maxGas) ? Long.fromString(object.maxGas) : Long.ZERO, }; }, @@ -3395,7 +3885,10 @@ export const BlockParams = { }; function createBaseLastCommitInfo(): LastCommitInfo { - return { round: 0, votes: [] }; + return { + round: 0, + votes: [], + }; } export const LastCommitInfo = { @@ -3403,9 +3896,11 @@ export const LastCommitInfo = { 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; }, @@ -3413,20 +3908,25 @@ export const LastCommitInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLastCommitInfo(); + 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; }, @@ -3440,11 +3940,13 @@ export const LastCommitInfo = { toJSON(message: LastCommitInfo): unknown { const obj: any = {}; message.round !== undefined && (obj.round = Math.round(message.round)); + if (message.votes) { obj.votes = message.votes.map((e) => (e ? VoteInfo.toJSON(e) : undefined)); } else { obj.votes = []; } + return obj; }, @@ -3457,7 +3959,10 @@ export const LastCommitInfo = { }; function createBaseEvent(): Event { - return { type: "", attributes: [] }; + return { + type: "", + attributes: [], + }; } export const Event = { @@ -3465,9 +3970,11 @@ export const Event = { 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; }, @@ -3475,20 +3982,25 @@ export const Event = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvent(); + 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; }, @@ -3504,11 +4016,13 @@ export const Event = { 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; }, @@ -3521,7 +4035,11 @@ export const Event = { }; function createBaseEventAttribute(): EventAttribute { - return { key: new Uint8Array(), value: new Uint8Array(), index: false }; + return { + key: new Uint8Array(), + value: new Uint8Array(), + index: false, + }; } export const EventAttribute = { @@ -3529,12 +4047,15 @@ export const EventAttribute = { 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; }, @@ -3542,23 +4063,29 @@ export const EventAttribute = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEventAttribute(); + 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; }, @@ -3590,7 +4117,12 @@ export const EventAttribute = { }; function createBaseTxResult(): TxResult { - return { height: Long.ZERO, index: 0, tx: new Uint8Array(), result: undefined }; + return { + height: Long.ZERO, + index: 0, + tx: new Uint8Array(), + result: undefined, + }; } export const TxResult = { @@ -3598,15 +4130,19 @@ export const TxResult = { if (!message.height.isZero()) { 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; }, @@ -3614,32 +4150,39 @@ export const TxResult = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxResult(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, index: isSet(object.index) ? Number(object.index) : 0, tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(), result: isSet(object.result) ? ResponseDeliverTx.fromJSON(object.result) : undefined, @@ -3672,7 +4215,10 @@ export const TxResult = { }; function createBaseValidator(): Validator { - return { address: new Uint8Array(), power: Long.ZERO }; + return { + address: new Uint8Array(), + power: Long.ZERO, + }; } export const Validator = { @@ -3680,9 +4226,11 @@ export const Validator = { if (message.address.length !== 0) { writer.uint32(10).bytes(message.address); } + if (!message.power.isZero()) { writer.uint32(24).int64(message.power); } + return writer; }, @@ -3690,27 +4238,32 @@ export const Validator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidator(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.address = reader.bytes(); break; + case 3: message.power = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Validator { return { address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), - power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, }; }, @@ -3732,7 +4285,10 @@ export const Validator = { }; function createBaseValidatorUpdate(): ValidatorUpdate { - return { pubKey: undefined, power: Long.ZERO }; + return { + pubKey: undefined, + power: Long.ZERO, + }; } export const ValidatorUpdate = { @@ -3740,9 +4296,11 @@ export const ValidatorUpdate = { if (message.pubKey !== undefined) { PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); } + if (!message.power.isZero()) { writer.uint32(16).int64(message.power); } + return writer; }, @@ -3750,27 +4308,32 @@ export const ValidatorUpdate = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorUpdate(); + 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ValidatorUpdate { return { pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, }; }, @@ -3795,7 +4358,10 @@ export const ValidatorUpdate = { }; function createBaseVoteInfo(): VoteInfo { - return { validator: undefined, signedLastBlock: false }; + return { + validator: undefined, + signedLastBlock: false, + }; } export const VoteInfo = { @@ -3803,9 +4369,11 @@ export const VoteInfo = { 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; }, @@ -3813,20 +4381,25 @@ export const VoteInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVoteInfo(); + 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; }, @@ -3857,7 +4430,13 @@ export const VoteInfo = { }; function createBaseEvidence(): Evidence { - return { type: 0, validator: undefined, height: Long.ZERO, time: undefined, totalVotingPower: Long.ZERO }; + return { + type: 0, + validator: undefined, + height: Long.ZERO, + time: undefined, + totalVotingPower: Long.ZERO, + }; } export const Evidence = { @@ -3865,18 +4444,23 @@ export const Evidence = { 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.isZero()) { writer.uint32(24).int64(message.height); } + if (message.time !== undefined) { Timestamp.encode(message.time, writer.uint32(34).fork()).ldelim(); } + if (!message.totalVotingPower.isZero()) { writer.uint32(40).int64(message.totalVotingPower); } + return writer; }, @@ -3884,29 +4468,37 @@ export const Evidence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvidence(); + 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 = reader.int64() as Long; break; + case 4: message.time = Timestamp.decode(reader, reader.uint32()); break; + case 5: message.totalVotingPower = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -3914,9 +4506,9 @@ export const Evidence = { return { type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : 0, validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, }; }, @@ -3952,7 +4544,13 @@ export const Evidence = { }; function createBaseSnapshot(): Snapshot { - return { height: Long.UZERO, format: 0, chunks: 0, hash: new Uint8Array(), metadata: new Uint8Array() }; + return { + height: Long.UZERO, + format: 0, + chunks: 0, + hash: new Uint8Array(), + metadata: new Uint8Array(), + }; } export const Snapshot = { @@ -3960,18 +4558,23 @@ export const Snapshot = { if (!message.height.isZero()) { 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; }, @@ -3979,35 +4582,43 @@ export const Snapshot = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSnapshot(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunks: isSet(object.chunks) ? Number(object.chunks) : 0, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), @@ -4038,234 +4649,3 @@ export const Snapshot = { 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; - this.Echo = this.Echo.bind(this); - this.Flush = this.Flush.bind(this); - this.Info = this.Info.bind(this); - this.SetOption = this.SetOption.bind(this); - this.DeliverTx = this.DeliverTx.bind(this); - this.CheckTx = this.CheckTx.bind(this); - this.Query = this.Query.bind(this); - this.Commit = this.Commit.bind(this); - this.InitChain = this.InitChain.bind(this); - this.BeginBlock = this.BeginBlock.bind(this); - this.EndBlock = this.EndBlock.bind(this); - this.ListSnapshots = this.ListSnapshots.bind(this); - this.OfferSnapshot = this.OfferSnapshot.bind(this); - this.LoadSnapshotChunk = this.LoadSnapshotChunk.bind(this); - this.ApplySnapshotChunk = this.ApplySnapshotChunk.bind(this); - } - 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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.Reader(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index b0395021..5a5bce12 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,17 +1,18 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; - /** PublicKey defines the keys available for use with Tendermint Validators */ + export interface PublicKey { - ed25519: Uint8Array | undefined; - secp256k1: Uint8Array | undefined; + ed25519?: Uint8Array; + secp256k1?: Uint8Array; } function createBasePublicKey(): PublicKey { - return { ed25519: undefined, secp256k1: undefined }; + return { + ed25519: undefined, + secp256k1: undefined, + }; } export const PublicKey = { @@ -19,9 +20,11 @@ export const PublicKey = { if (message.ed25519 !== undefined) { writer.uint32(10).bytes(message.ed25519); } + if (message.secp256k1 !== undefined) { writer.uint32(18).bytes(message.secp256k1); } + return writer; }, @@ -29,20 +32,25 @@ export const PublicKey = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePublicKey(); + 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; }, @@ -69,75 +77,3 @@ export const PublicKey = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index f3846edb..113c3a58 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,47 +1,48 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; - export interface Proof { total: Long; index: Long; leafHash: Uint8Array; aunts: Uint8Array[]; } - export interface ValueOp { /** Encoded in ProofOp.Key. */ key: Uint8Array; /** To encode in ProofOp.Data */ - proof?: Proof; -} + proof: Proof; +} 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[]; } function createBaseProof(): Proof { - return { total: Long.ZERO, index: Long.ZERO, leafHash: new Uint8Array(), aunts: [] }; + return { + total: Long.ZERO, + index: Long.ZERO, + leafHash: new Uint8Array(), + aunts: [], + }; } export const Proof = { @@ -49,15 +50,19 @@ export const Proof = { if (!message.total.isZero()) { writer.uint32(8).int64(message.total); } + if (!message.index.isZero()) { 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; }, @@ -65,33 +70,40 @@ export const Proof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProof(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.total = reader.int64() as Long; break; + case 2: message.index = 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 { return { - total: isSet(object.total) ? Long.fromValue(object.total) : Long.ZERO, - index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, + total: isSet(object.total) ? Long.fromString(object.total) : Long.ZERO, + index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, leafHash: isSet(object.leafHash) ? bytesFromBase64(object.leafHash) : new Uint8Array(), aunts: Array.isArray(object?.aunts) ? object.aunts.map((e: any) => bytesFromBase64(e)) : [], }; @@ -103,11 +115,13 @@ export const Proof = { message.index !== undefined && (obj.index = (message.index || Long.ZERO).toString()); 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; }, @@ -124,7 +138,10 @@ export const Proof = { }; function createBaseValueOp(): ValueOp { - return { key: new Uint8Array(), proof: undefined }; + return { + key: new Uint8Array(), + proof: undefined, + }; } export const ValueOp = { @@ -132,9 +149,11 @@ export const ValueOp = { 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; }, @@ -142,20 +161,25 @@ export const ValueOp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValueOp(); + 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; }, @@ -184,7 +208,11 @@ export const ValueOp = { }; function createBaseDominoOp(): DominoOp { - return { key: "", input: "", output: "" }; + return { + key: "", + input: "", + output: "", + }; } export const DominoOp = { @@ -192,12 +220,15 @@ export const DominoOp = { 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; }, @@ -205,23 +236,29 @@ export const DominoOp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDominoOp(); + 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; }, @@ -251,7 +288,11 @@ export const DominoOp = { }; function createBaseProofOp(): ProofOp { - return { type: "", key: new Uint8Array(), data: new Uint8Array() }; + return { + type: "", + key: new Uint8Array(), + data: new Uint8Array(), + }; } export const ProofOp = { @@ -259,12 +300,15 @@ export const ProofOp = { 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; }, @@ -272,23 +316,29 @@ export const ProofOp = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProofOp(); + 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; }, @@ -320,7 +370,9 @@ export const ProofOp = { }; function createBaseProofOps(): ProofOps { - return { ops: [] }; + return { + ops: [], + }; } export const ProofOps = { @@ -328,6 +380,7 @@ export const ProofOps = { for (const v of message.ops) { ProofOp.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -335,31 +388,39 @@ export const ProofOps = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProofOps(); + 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 { - return { ops: Array.isArray(object?.ops) ? object.ops.map((e: any) => ProofOp.fromJSON(e)) : [] }; + return { + ops: Array.isArray(object?.ops) ? object.ops.map((e: any) => ProofOp.fromJSON(e)) : [], + }; }, 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; }, @@ -369,75 +430,3 @@ export const ProofOps = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index aa0a4929..8f18cb41 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,39 +1,37 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; - export interface NetAddress { id: string; ip: string; port: number; } - export interface ProtocolVersion { p2p: Long; block: Long; app: Long; } - export interface DefaultNodeInfo { - protocolVersion?: ProtocolVersion; + protocolVersion: ProtocolVersion; defaultNodeId: string; listenAddr: string; network: string; version: string; channels: Uint8Array; moniker: string; - other?: DefaultNodeInfoOther; + other: DefaultNodeInfoOther; } - export interface DefaultNodeInfoOther { txIndex: string; rpcAddress: string; } function createBaseNetAddress(): NetAddress { - return { id: "", ip: "", port: 0 }; + return { + id: "", + ip: "", + port: 0, + }; } export const NetAddress = { @@ -41,12 +39,15 @@ export const NetAddress = { if (message.id !== "") { writer.uint32(10).string(message.id); } + if (message.ip !== "") { writer.uint32(18).string(message.ip); } + if (message.port !== 0) { writer.uint32(24).uint32(message.port); } + return writer; }, @@ -54,23 +55,29 @@ export const NetAddress = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNetAddress(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.id = reader.string(); break; + case 2: message.ip = reader.string(); break; + case 3: message.port = reader.uint32(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -100,7 +107,11 @@ export const NetAddress = { }; function createBaseProtocolVersion(): ProtocolVersion { - return { p2p: Long.UZERO, block: Long.UZERO, app: Long.UZERO }; + return { + p2p: Long.UZERO, + block: Long.UZERO, + app: Long.UZERO, + }; } export const ProtocolVersion = { @@ -108,12 +119,15 @@ export const ProtocolVersion = { if (!message.p2p.isZero()) { writer.uint32(8).uint64(message.p2p); } + if (!message.block.isZero()) { writer.uint32(16).uint64(message.block); } + if (!message.app.isZero()) { writer.uint32(24).uint64(message.app); } + return writer; }, @@ -121,31 +135,37 @@ export const ProtocolVersion = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProtocolVersion(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.p2p = reader.uint64() as Long; break; + case 2: message.block = reader.uint64() as Long; break; + case 3: message.app = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): ProtocolVersion { return { - p2p: isSet(object.p2p) ? Long.fromValue(object.p2p) : Long.UZERO, - block: isSet(object.block) ? Long.fromValue(object.block) : Long.UZERO, - app: isSet(object.app) ? Long.fromValue(object.app) : Long.UZERO, + p2p: isSet(object.p2p) ? Long.fromString(object.p2p) : Long.UZERO, + block: isSet(object.block) ? Long.fromString(object.block) : Long.UZERO, + app: isSet(object.app) ? Long.fromString(object.app) : Long.UZERO, }; }, @@ -185,27 +205,35 @@ export const DefaultNodeInfo = { if (message.protocolVersion !== undefined) { ProtocolVersion.encode(message.protocolVersion, writer.uint32(10).fork()).ldelim(); } + if (message.defaultNodeId !== "") { writer.uint32(18).string(message.defaultNodeId); } + if (message.listenAddr !== "") { writer.uint32(26).string(message.listenAddr); } + if (message.network !== "") { writer.uint32(34).string(message.network); } + if (message.version !== "") { writer.uint32(42).string(message.version); } + if (message.channels.length !== 0) { writer.uint32(50).bytes(message.channels); } + if (message.moniker !== "") { writer.uint32(58).string(message.moniker); } + if (message.other !== undefined) { DefaultNodeInfoOther.encode(message.other, writer.uint32(66).fork()).ldelim(); } + return writer; }, @@ -213,38 +241,49 @@ export const DefaultNodeInfo = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDefaultNodeInfo(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.protocolVersion = ProtocolVersion.decode(reader, reader.uint32()); break; + case 2: message.defaultNodeId = reader.string(); break; + case 3: message.listenAddr = reader.string(); break; + case 4: message.network = reader.string(); break; + case 5: message.version = reader.string(); break; + case 6: message.channels = reader.bytes(); break; + case 7: message.moniker = reader.string(); break; + case 8: message.other = DefaultNodeInfoOther.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -302,7 +341,10 @@ export const DefaultNodeInfo = { }; function createBaseDefaultNodeInfoOther(): DefaultNodeInfoOther { - return { txIndex: "", rpcAddress: "" }; + return { + txIndex: "", + rpcAddress: "", + }; } export const DefaultNodeInfoOther = { @@ -310,9 +352,11 @@ export const DefaultNodeInfoOther = { if (message.txIndex !== "") { writer.uint32(10).string(message.txIndex); } + if (message.rpcAddress !== "") { writer.uint32(18).string(message.rpcAddress); } + return writer; }, @@ -320,20 +364,25 @@ export const DefaultNodeInfoOther = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDefaultNodeInfoOther(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.txIndex = reader.string(); break; + case 2: message.rpcAddress = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -358,75 +407,3 @@ export const DefaultNodeInfoOther = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 77c5240d..304abf27 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,20 +1,22 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; -import { Commit, Data, Header } from "./types"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.types"; - export interface Block { - header?: Header; - data?: Data; - evidence?: EvidenceList; - lastCommit?: Commit; + header: Header; + data: Data; + evidence: EvidenceList; + lastCommit: Commit; } function createBaseBlock(): Block { - return { header: undefined, data: undefined, evidence: undefined, lastCommit: undefined }; + return { + header: undefined, + data: undefined, + evidence: undefined, + lastCommit: undefined, + }; } export const Block = { @@ -22,15 +24,19 @@ export const Block = { if (message.header !== undefined) { Header.encode(message.header, writer.uint32(10).fork()).ldelim(); } + if (message.data !== undefined) { Data.encode(message.data, writer.uint32(18).fork()).ldelim(); } + if (message.evidence !== undefined) { EvidenceList.encode(message.evidence, writer.uint32(26).fork()).ldelim(); } + if (message.lastCommit !== undefined) { Commit.encode(message.lastCommit, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -38,26 +44,33 @@ export const Block = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlock(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.header = Header.decode(reader, reader.uint32()); break; + case 2: message.data = Data.decode(reader, reader.uint32()); break; + case 3: message.evidence = EvidenceList.decode(reader, reader.uint32()); break; + case 4: message.lastCommit = Commit.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -98,31 +111,3 @@ export const Block = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 8cda75df..ba3afd07 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,41 +1,40 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; -import { LightBlock, Vote } from "./types"; import { Validator } from "./validator"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; export const protobufPackage = "tendermint.types"; - export interface Evidence { - duplicateVoteEvidence?: DuplicateVoteEvidence | undefined; - lightClientAttackEvidence?: LightClientAttackEvidence | undefined; + duplicateVoteEvidence?: DuplicateVoteEvidence; + lightClientAttackEvidence?: LightClientAttackEvidence; } - /** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ + export interface DuplicateVoteEvidence { - voteA?: Vote; - voteB?: Vote; + voteA: Vote; + voteB: Vote; totalVotingPower: Long; validatorPower: Long; - timestamp?: Timestamp; + timestamp: Timestamp; } - /** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ + export interface LightClientAttackEvidence { - conflictingBlock?: LightBlock; + conflictingBlock: LightBlock; commonHeight: Long; byzantineValidators: Validator[]; totalVotingPower: Long; - timestamp?: Timestamp; + timestamp: Timestamp; } - export interface EvidenceList { evidence: Evidence[]; } function createBaseEvidence(): Evidence { - return { duplicateVoteEvidence: undefined, lightClientAttackEvidence: undefined }; + return { + duplicateVoteEvidence: undefined, + lightClientAttackEvidence: undefined, + }; } export const Evidence = { @@ -43,9 +42,11 @@ export const Evidence = { if (message.duplicateVoteEvidence !== undefined) { DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(10).fork()).ldelim(); } + if (message.lightClientAttackEvidence !== undefined) { LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -53,20 +54,25 @@ export const Evidence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvidence(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.duplicateVoteEvidence = DuplicateVoteEvidence.decode(reader, reader.uint32()); break; + case 2: message.lightClientAttackEvidence = LightClientAttackEvidence.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -123,18 +129,23 @@ export const DuplicateVoteEvidence = { if (message.voteA !== undefined) { Vote.encode(message.voteA, writer.uint32(10).fork()).ldelim(); } + if (message.voteB !== undefined) { Vote.encode(message.voteB, writer.uint32(18).fork()).ldelim(); } + if (!message.totalVotingPower.isZero()) { writer.uint32(24).int64(message.totalVotingPower); } + if (!message.validatorPower.isZero()) { writer.uint32(32).int64(message.validatorPower); } + if (message.timestamp !== undefined) { Timestamp.encode(message.timestamp, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -142,29 +153,37 @@ export const DuplicateVoteEvidence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDuplicateVoteEvidence(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.voteA = Vote.decode(reader, reader.uint32()); break; + case 2: message.voteB = Vote.decode(reader, reader.uint32()); break; + case 3: message.totalVotingPower = reader.int64() as Long; break; + case 4: message.validatorPower = reader.int64() as Long; break; + case 5: message.timestamp = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -172,8 +191,8 @@ export const DuplicateVoteEvidence = { return { voteA: isSet(object.voteA) ? Vote.fromJSON(object.voteA) : undefined, voteB: isSet(object.voteB) ? Vote.fromJSON(object.voteB) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, - validatorPower: isSet(object.validatorPower) ? Long.fromValue(object.validatorPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, + validatorPower: isSet(object.validatorPower) ? Long.fromString(object.validatorPower) : Long.ZERO, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, }; }, @@ -227,18 +246,23 @@ export const LightClientAttackEvidence = { if (message.conflictingBlock !== undefined) { LightBlock.encode(message.conflictingBlock, writer.uint32(10).fork()).ldelim(); } + if (!message.commonHeight.isZero()) { writer.uint32(16).int64(message.commonHeight); } + for (const v of message.byzantineValidators) { Validator.encode(v!, writer.uint32(26).fork()).ldelim(); } + if (!message.totalVotingPower.isZero()) { writer.uint32(32).int64(message.totalVotingPower); } + if (message.timestamp !== undefined) { Timestamp.encode(message.timestamp, writer.uint32(42).fork()).ldelim(); } + return writer; }, @@ -246,29 +270,37 @@ export const LightClientAttackEvidence = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLightClientAttackEvidence(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.conflictingBlock = LightBlock.decode(reader, reader.uint32()); break; + case 2: message.commonHeight = reader.int64() as Long; break; + case 3: message.byzantineValidators.push(Validator.decode(reader, reader.uint32())); break; + case 4: message.totalVotingPower = reader.int64() as Long; break; + case 5: message.timestamp = Timestamp.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -277,11 +309,11 @@ export const LightClientAttackEvidence = { conflictingBlock: isSet(object.conflictingBlock) ? LightBlock.fromJSON(object.conflictingBlock) : undefined, - commonHeight: isSet(object.commonHeight) ? Long.fromValue(object.commonHeight) : Long.ZERO, + commonHeight: isSet(object.commonHeight) ? Long.fromString(object.commonHeight) : Long.ZERO, byzantineValidators: Array.isArray(object?.byzantineValidators) ? object.byzantineValidators.map((e: any) => Validator.fromJSON(e)) : [], - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, }; }, @@ -293,11 +325,13 @@ export const LightClientAttackEvidence = { ? LightBlock.toJSON(message.conflictingBlock) : undefined); message.commonHeight !== undefined && (obj.commonHeight = (message.commonHeight || Long.ZERO).toString()); + if (message.byzantineValidators) { obj.byzantineValidators = message.byzantineValidators.map((e) => (e ? Validator.toJSON(e) : undefined)); } else { obj.byzantineValidators = []; } + message.totalVotingPower !== undefined && (obj.totalVotingPower = (message.totalVotingPower || Long.ZERO).toString()); message.timestamp !== undefined && (obj.timestamp = fromTimestamp(message.timestamp).toISOString()); @@ -330,7 +364,9 @@ export const LightClientAttackEvidence = { }; function createBaseEvidenceList(): EvidenceList { - return { evidence: [] }; + return { + evidence: [], + }; } export const EvidenceList = { @@ -338,6 +374,7 @@ export const EvidenceList = { for (const v of message.evidence) { Evidence.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -345,17 +382,21 @@ export const EvidenceList = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvidenceList(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.evidence.push(Evidence.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -367,11 +408,13 @@ export const EvidenceList = { toJSON(message: EvidenceList): unknown { const obj: any = {}; + if (message.evidence) { obj.evidence = message.evidence.map((e) => (e ? Evidence.toJSON(e) : undefined)); } else { obj.evidence = []; } + return obj; }, @@ -381,57 +424,3 @@ export const EvidenceList = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index e39dcfed..258d620d 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,22 +1,20 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Duration } from "../../google/protobuf/duration"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact, Long } from "../../helpers"; export const protobufPackage = "tendermint.types"; - /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. */ + export interface ConsensusParams { - block?: BlockParams; - evidence?: EvidenceParams; - validator?: ValidatorParams; - version?: VersionParams; + block: BlockParams; + evidence: EvidenceParams; + validator: ValidatorParams; + version: VersionParams; } - /** BlockParams contains limits on the block size. */ + export interface BlockParams { /** * Max block size, in bytes. @@ -27,6 +25,7 @@ export interface BlockParams { * Max gas per block. * Note: must be greater or equal to -1 */ + maxGas: Long; /** * Minimum time increment between consecutive blocks (in milliseconds) If the @@ -34,10 +33,11 @@ export interface BlockParams { * * Not exposed to the application. */ + timeIotaMs: Long; } - /** EvidenceParams determine how we handle evidence of malfeasance. */ + export interface EvidenceParams { /** * Max age of evidence, in blocks. @@ -53,40 +53,47 @@ export interface EvidenceParams { * 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; + + maxAgeDuration: Duration; /** * 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: Long; } - /** * 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: Long; } - /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. */ + export interface HashedParams { blockMaxBytes: Long; blockMaxGas: Long; } function createBaseConsensusParams(): ConsensusParams { - return { block: undefined, evidence: undefined, validator: undefined, version: undefined }; + return { + block: undefined, + evidence: undefined, + validator: undefined, + version: undefined, + }; } export const ConsensusParams = { @@ -94,15 +101,19 @@ export const ConsensusParams = { 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; }, @@ -110,26 +121,33 @@ export const ConsensusParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusParams(); + 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; }, @@ -176,7 +194,11 @@ export const ConsensusParams = { }; function createBaseBlockParams(): BlockParams { - return { maxBytes: Long.ZERO, maxGas: Long.ZERO, timeIotaMs: Long.ZERO }; + return { + maxBytes: Long.ZERO, + maxGas: Long.ZERO, + timeIotaMs: Long.ZERO, + }; } export const BlockParams = { @@ -184,12 +206,15 @@ export const BlockParams = { if (!message.maxBytes.isZero()) { writer.uint32(8).int64(message.maxBytes); } + if (!message.maxGas.isZero()) { writer.uint32(16).int64(message.maxGas); } + if (!message.timeIotaMs.isZero()) { writer.uint32(24).int64(message.timeIotaMs); } + return writer; }, @@ -197,31 +222,37 @@ export const BlockParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxBytes = reader.int64() as Long; break; + case 2: message.maxGas = reader.int64() as Long; break; + case 3: message.timeIotaMs = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): BlockParams { return { - maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, - maxGas: isSet(object.maxGas) ? Long.fromValue(object.maxGas) : Long.ZERO, - timeIotaMs: isSet(object.timeIotaMs) ? Long.fromValue(object.timeIotaMs) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, + maxGas: isSet(object.maxGas) ? Long.fromString(object.maxGas) : Long.ZERO, + timeIotaMs: isSet(object.timeIotaMs) ? Long.fromString(object.timeIotaMs) : Long.ZERO, }; }, @@ -248,7 +279,11 @@ export const BlockParams = { }; function createBaseEvidenceParams(): EvidenceParams { - return { maxAgeNumBlocks: Long.ZERO, maxAgeDuration: undefined, maxBytes: Long.ZERO }; + return { + maxAgeNumBlocks: Long.ZERO, + maxAgeDuration: undefined, + maxBytes: Long.ZERO, + }; } export const EvidenceParams = { @@ -256,12 +291,15 @@ export const EvidenceParams = { if (!message.maxAgeNumBlocks.isZero()) { writer.uint32(8).int64(message.maxAgeNumBlocks); } + if (message.maxAgeDuration !== undefined) { Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); } + if (!message.maxBytes.isZero()) { writer.uint32(24).int64(message.maxBytes); } + return writer; }, @@ -269,31 +307,37 @@ export const EvidenceParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvidenceParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.maxAgeNumBlocks = reader.int64() as Long; break; + case 2: message.maxAgeDuration = Duration.decode(reader, reader.uint32()); break; + case 3: message.maxBytes = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): EvidenceParams { return { - maxAgeNumBlocks: isSet(object.maxAgeNumBlocks) ? Long.fromValue(object.maxAgeNumBlocks) : Long.ZERO, + maxAgeNumBlocks: isSet(object.maxAgeNumBlocks) ? Long.fromString(object.maxAgeNumBlocks) : Long.ZERO, maxAgeDuration: isSet(object.maxAgeDuration) ? Duration.fromJSON(object.maxAgeDuration) : undefined, - maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, }; }, @@ -301,8 +345,7 @@ export const EvidenceParams = { const obj: any = {}; message.maxAgeNumBlocks !== undefined && (obj.maxAgeNumBlocks = (message.maxAgeNumBlocks || Long.ZERO).toString()); - message.maxAgeDuration !== undefined && - (obj.maxAgeDuration = message.maxAgeDuration ? Duration.toJSON(message.maxAgeDuration) : undefined); + message.maxAgeDuration !== undefined && (obj.maxAgeDuration = message.maxAgeDuration); message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString()); return obj; }, @@ -313,10 +356,7 @@ export const EvidenceParams = { object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null ? Long.fromValue(object.maxAgeNumBlocks) : Long.ZERO; - message.maxAgeDuration = - object.maxAgeDuration !== undefined && object.maxAgeDuration !== null - ? Duration.fromPartial(object.maxAgeDuration) - : undefined; + message.maxAgeDuration = object.maxAgeDuration ?? undefined; message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; return message; @@ -324,7 +364,9 @@ export const EvidenceParams = { }; function createBaseValidatorParams(): ValidatorParams { - return { pubKeyTypes: [] }; + return { + pubKeyTypes: [], + }; } export const ValidatorParams = { @@ -332,6 +374,7 @@ export const ValidatorParams = { for (const v of message.pubKeyTypes) { writer.uint32(10).string(v!); } + return writer; }, @@ -339,17 +382,21 @@ export const ValidatorParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorParams(); + 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; }, @@ -361,11 +408,13 @@ export const ValidatorParams = { toJSON(message: ValidatorParams): unknown { const obj: any = {}; + if (message.pubKeyTypes) { obj.pubKeyTypes = message.pubKeyTypes.map((e) => e); } else { obj.pubKeyTypes = []; } + return obj; }, @@ -377,7 +426,9 @@ export const ValidatorParams = { }; function createBaseVersionParams(): VersionParams { - return { appVersion: Long.UZERO }; + return { + appVersion: Long.UZERO, + }; } export const VersionParams = { @@ -385,6 +436,7 @@ export const VersionParams = { if (!message.appVersion.isZero()) { writer.uint32(8).uint64(message.appVersion); } + return writer; }, @@ -392,22 +444,28 @@ export const VersionParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVersionParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.appVersion = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): VersionParams { - return { appVersion: isSet(object.appVersion) ? Long.fromValue(object.appVersion) : Long.UZERO }; + return { + appVersion: isSet(object.appVersion) ? Long.fromString(object.appVersion) : Long.UZERO, + }; }, toJSON(message: VersionParams): unknown { @@ -427,7 +485,10 @@ export const VersionParams = { }; function createBaseHashedParams(): HashedParams { - return { blockMaxBytes: Long.ZERO, blockMaxGas: Long.ZERO }; + return { + blockMaxBytes: Long.ZERO, + blockMaxGas: Long.ZERO, + }; } export const HashedParams = { @@ -435,9 +496,11 @@ export const HashedParams = { if (!message.blockMaxBytes.isZero()) { writer.uint32(8).int64(message.blockMaxBytes); } + if (!message.blockMaxGas.isZero()) { writer.uint32(16).int64(message.blockMaxGas); } + return writer; }, @@ -445,27 +508,32 @@ export const HashedParams = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHashedParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.blockMaxBytes = reader.int64() as Long; break; + case 2: message.blockMaxGas = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): HashedParams { return { - blockMaxBytes: isSet(object.blockMaxBytes) ? Long.fromValue(object.blockMaxBytes) : Long.ZERO, - blockMaxGas: isSet(object.blockMaxGas) ? Long.fromValue(object.blockMaxGas) : Long.ZERO, + blockMaxBytes: isSet(object.blockMaxBytes) ? Long.fromString(object.blockMaxBytes) : Long.ZERO, + blockMaxGas: isSet(object.blockMaxGas) ? Long.fromString(object.blockMaxGas) : Long.ZERO, }; }, @@ -490,31 +558,3 @@ export const HashedParams = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index d7bc9a3d..aa4991a3 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,14 +1,21 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Timestamp } from "../../google/protobuf/timestamp"; import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; +import { Timestamp } from "../../google/protobuf/timestamp"; import { ValidatorSet } from "./validator"; - +import * as _m0 from "protobufjs/minimal"; +import { + isSet, + bytesFromBase64, + base64FromBytes, + DeepPartial, + Exact, + Long, + fromJsonTimestamp, + fromTimestamp, +} from "../../helpers"; 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, @@ -16,140 +23,157 @@ export enum BlockIDFlag { 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"; - case BlockIDFlag.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + 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"; - case SignedMsgType.UNRECOGNIZED: + default: - return "UNRECOGNIZED"; + return "UNKNOWN"; } } - /** PartsetHeader */ + export interface PartSetHeader { total: number; hash: Uint8Array; } - export interface Part { index: number; bytes: Uint8Array; - proof?: Proof; + proof: Proof; } - /** BlockID */ + export interface BlockID { hash: Uint8Array; - partSetHeader?: PartSetHeader; + partSetHeader: PartSetHeader; } - /** Header defines the structure of a Tendermint block header. */ + export interface Header { /** basic block info */ - version?: Consensus; + version: Consensus; chainId: string; height: Long; - time?: Timestamp; + time: Timestamp; /** prev block info */ - lastBlockId?: BlockID; + + lastBlockId: BlockID; /** 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. @@ -158,75 +182,73 @@ export interface Data { */ txs: Uint8Array[]; } - /** * Vote represents a prevote, precommit, or commit vote from validators for * consensus. */ + export interface Vote { type: SignedMsgType; height: Long; round: number; - /** zero if vote is nil. */ - blockId?: BlockID; - timestamp?: Timestamp; + blockId: BlockID; + timestamp: Timestamp; validatorAddress: Uint8Array; validatorIndex: number; signature: Uint8Array; } - /** Commit contains the evidence that a block was committed by a set of validators. */ + export interface Commit { height: Long; round: number; - blockId?: BlockID; + blockId: BlockID; signatures: CommitSig[]; } - /** CommitSig is a part of the Vote included in a Commit. */ + export interface CommitSig { blockIdFlag: BlockIDFlag; validatorAddress: Uint8Array; - timestamp?: Timestamp; + timestamp: Timestamp; signature: Uint8Array; } - export interface Proposal { type: SignedMsgType; height: Long; round: number; polRound: number; - blockId?: BlockID; - timestamp?: Timestamp; + blockId: BlockID; + timestamp: Timestamp; signature: Uint8Array; } - export interface SignedHeader { - header?: Header; - commit?: Commit; + header: Header; + commit: Commit; } - export interface LightBlock { - signedHeader?: SignedHeader; - validatorSet?: ValidatorSet; + signedHeader: SignedHeader; + validatorSet: ValidatorSet; } - export interface BlockMeta { - blockId?: BlockID; + blockId: BlockID; blockSize: Long; - header?: Header; + header: Header; numTxs: Long; } - /** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ + export interface TxProof { rootHash: Uint8Array; data: Uint8Array; - proof?: Proof; + proof: Proof; } function createBasePartSetHeader(): PartSetHeader { - return { total: 0, hash: new Uint8Array() }; + return { + total: 0, + hash: new Uint8Array(), + }; } export const PartSetHeader = { @@ -234,9 +256,11 @@ export const PartSetHeader = { if (message.total !== 0) { writer.uint32(8).uint32(message.total); } + if (message.hash.length !== 0) { writer.uint32(18).bytes(message.hash); } + return writer; }, @@ -244,20 +268,25 @@ export const PartSetHeader = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePartSetHeader(); + 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; }, @@ -285,7 +314,11 @@ export const PartSetHeader = { }; function createBasePart(): Part { - return { index: 0, bytes: new Uint8Array(), proof: undefined }; + return { + index: 0, + bytes: new Uint8Array(), + proof: undefined, + }; } export const Part = { @@ -293,12 +326,15 @@ export const Part = { 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; }, @@ -306,23 +342,29 @@ export const Part = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePart(); + 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; }, @@ -354,7 +396,10 @@ export const Part = { }; function createBaseBlockID(): BlockID { - return { hash: new Uint8Array(), partSetHeader: undefined }; + return { + hash: new Uint8Array(), + partSetHeader: undefined, + }; } export const BlockID = { @@ -362,9 +407,11 @@ export const BlockID = { 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; }, @@ -372,20 +419,25 @@ export const BlockID = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockID(); + 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; }, @@ -440,45 +492,59 @@ export const Header = { 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.isZero()) { writer.uint32(24).int64(message.height); } + if (message.time !== undefined) { Timestamp.encode(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; }, @@ -486,56 +552,73 @@ export const Header = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHeader(); + 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 = reader.int64() as Long; break; + case 4: message.time = 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; }, @@ -543,7 +626,7 @@ export const Header = { return { version: isSet(object.version) ? Consensus.fromJSON(object.version) : undefined, chainId: isSet(object.chainId) ? String(object.chainId) : "", - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, lastBlockId: isSet(object.lastBlockId) ? BlockID.fromJSON(object.lastBlockId) : undefined, lastCommitHash: isSet(object.lastCommitHash) @@ -641,7 +724,9 @@ export const Header = { }; function createBaseData(): Data { - return { txs: [] }; + return { + txs: [], + }; } export const Data = { @@ -649,6 +734,7 @@ export const Data = { for (const v of message.txs) { writer.uint32(10).bytes(v!); } + return writer; }, @@ -656,31 +742,39 @@ export const Data = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseData(); + 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 { - return { txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => bytesFromBase64(e)) : [] }; + return { + txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => bytesFromBase64(e)) : [], + }; }, 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; }, @@ -709,27 +803,35 @@ export const Vote = { if (message.type !== 0) { writer.uint32(8).int32(message.type); } + if (!message.height.isZero()) { 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(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; }, @@ -737,45 +839,56 @@ export const Vote = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVote(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.type = reader.int32() as any; break; + case 2: message.height = 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 = 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 { return { type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0, - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, @@ -829,7 +942,12 @@ export const Vote = { }; function createBaseCommit(): Commit { - return { height: Long.ZERO, round: 0, blockId: undefined, signatures: [] }; + return { + height: Long.ZERO, + round: 0, + blockId: undefined, + signatures: [], + }; } export const Commit = { @@ -837,15 +955,19 @@ export const Commit = { if (!message.height.isZero()) { 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; }, @@ -853,32 +975,39 @@ export const Commit = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommit(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.height = 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 { return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, signatures: Array.isArray(object?.signatures) @@ -893,11 +1022,13 @@ export const Commit = { message.round !== undefined && (obj.round = Math.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; }, @@ -929,15 +1060,19 @@ export const CommitSig = { 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(message.timestamp, writer.uint32(26).fork()).ldelim(); } + if (message.signature.length !== 0) { writer.uint32(34).bytes(message.signature); } + return writer; }, @@ -945,26 +1080,33 @@ export const CommitSig = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCommitSig(); + 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 = Timestamp.decode(reader, reader.uint32()); break; + case 4: message.signature = reader.bytes(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1024,24 +1166,31 @@ export const Proposal = { if (message.type !== 0) { writer.uint32(8).int32(message.type); } + if (!message.height.isZero()) { 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(message.timestamp, writer.uint32(50).fork()).ldelim(); } + if (message.signature.length !== 0) { writer.uint32(58).bytes(message.signature); } + return writer; }, @@ -1049,42 +1198,52 @@ export const Proposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProposal(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.type = reader.int32() as any; break; + case 2: message.height = 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 = 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 { return { type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0, - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, polRound: isSet(object.polRound) ? Number(object.polRound) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, @@ -1130,7 +1289,10 @@ export const Proposal = { }; function createBaseSignedHeader(): SignedHeader { - return { header: undefined, commit: undefined }; + return { + header: undefined, + commit: undefined, + }; } export const SignedHeader = { @@ -1138,9 +1300,11 @@ export const SignedHeader = { 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; }, @@ -1148,20 +1312,25 @@ export const SignedHeader = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignedHeader(); + 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; }, @@ -1190,7 +1359,10 @@ export const SignedHeader = { }; function createBaseLightBlock(): LightBlock { - return { signedHeader: undefined, validatorSet: undefined }; + return { + signedHeader: undefined, + validatorSet: undefined, + }; } export const LightBlock = { @@ -1198,9 +1370,11 @@ export const LightBlock = { 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; }, @@ -1208,20 +1382,25 @@ export const LightBlock = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLightBlock(); + 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; }, @@ -1256,7 +1435,12 @@ export const LightBlock = { }; function createBaseBlockMeta(): BlockMeta { - return { blockId: undefined, blockSize: Long.ZERO, header: undefined, numTxs: Long.ZERO }; + return { + blockId: undefined, + blockSize: Long.ZERO, + header: undefined, + numTxs: Long.ZERO, + }; } export const BlockMeta = { @@ -1264,15 +1448,19 @@ export const BlockMeta = { if (message.blockId !== undefined) { BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim(); } + if (!message.blockSize.isZero()) { writer.uint32(16).int64(message.blockSize); } + if (message.header !== undefined) { Header.encode(message.header, writer.uint32(26).fork()).ldelim(); } + if (!message.numTxs.isZero()) { writer.uint32(32).int64(message.numTxs); } + return writer; }, @@ -1280,35 +1468,42 @@ export const BlockMeta = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockMeta(); + 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 = reader.int64() as Long; break; + case 3: message.header = Header.decode(reader, reader.uint32()); break; + case 4: message.numTxs = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): BlockMeta { return { blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - blockSize: isSet(object.blockSize) ? Long.fromValue(object.blockSize) : Long.ZERO, + blockSize: isSet(object.blockSize) ? Long.fromString(object.blockSize) : Long.ZERO, header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - numTxs: isSet(object.numTxs) ? Long.fromValue(object.numTxs) : Long.ZERO, + numTxs: isSet(object.numTxs) ? Long.fromString(object.numTxs) : Long.ZERO, }; }, @@ -1341,7 +1536,11 @@ export const BlockMeta = { }; function createBaseTxProof(): TxProof { - return { rootHash: new Uint8Array(), data: new Uint8Array(), proof: undefined }; + return { + rootHash: new Uint8Array(), + data: new Uint8Array(), + proof: undefined, + }; } export const TxProof = { @@ -1349,12 +1548,15 @@ export const TxProof = { 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; }, @@ -1362,23 +1564,29 @@ export const TxProof = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTxProof(); + 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; }, @@ -1409,101 +1617,3 @@ export const TxProof = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = numberToLong(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.toNumber() * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function numberToLong(number: number) { - return Long.fromNumber(number); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 4cfb9d3a..0abca094 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,30 +1,29 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { PublicKey } from "../crypto/keys"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.types"; - export interface ValidatorSet { validators: Validator[]; - proposer?: Validator; + proposer: Validator; totalVotingPower: Long; } - export interface Validator { address: Uint8Array; - pubKey?: PublicKey; + pubKey: PublicKey; votingPower: Long; proposerPriority: Long; } - export interface SimpleValidator { - pubKey?: PublicKey; + pubKey: PublicKey; votingPower: Long; } function createBaseValidatorSet(): ValidatorSet { - return { validators: [], proposer: undefined, totalVotingPower: Long.ZERO }; + return { + validators: [], + proposer: undefined, + totalVotingPower: Long.ZERO, + }; } export const ValidatorSet = { @@ -32,12 +31,15 @@ export const ValidatorSet = { 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.isZero()) { writer.uint32(24).int64(message.totalVotingPower); } + return writer; }, @@ -45,23 +47,29 @@ export const ValidatorSet = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorSet(); + 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -71,17 +79,19 @@ export const ValidatorSet = { ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], proposer: isSet(object.proposer) ? Validator.fromJSON(object.proposer) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, }; }, 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 && @@ -118,15 +128,19 @@ export const Validator = { 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.isZero()) { writer.uint32(24).int64(message.votingPower); } + if (!message.proposerPriority.isZero()) { writer.uint32(32).int64(message.proposerPriority); } + return writer; }, @@ -134,26 +148,33 @@ export const Validator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidator(); + 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 = reader.int64() as Long; break; + case 4: message.proposerPriority = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -161,8 +182,8 @@ export const Validator = { return { address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, - proposerPriority: isSet(object.proposerPriority) ? Long.fromValue(object.proposerPriority) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, + proposerPriority: isSet(object.proposerPriority) ? Long.fromString(object.proposerPriority) : Long.ZERO, }; }, @@ -198,7 +219,10 @@ export const Validator = { }; function createBaseSimpleValidator(): SimpleValidator { - return { pubKey: undefined, votingPower: Long.ZERO }; + return { + pubKey: undefined, + votingPower: Long.ZERO, + }; } export const SimpleValidator = { @@ -206,9 +230,11 @@ export const SimpleValidator = { if (message.pubKey !== undefined) { PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim(); } + if (!message.votingPower.isZero()) { writer.uint32(16).int64(message.votingPower); } + return writer; }, @@ -216,27 +242,32 @@ export const SimpleValidator = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSimpleValidator(); + 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 = reader.int64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): SimpleValidator { return { pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, }; }, @@ -261,75 +292,3 @@ export const SimpleValidator = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index a18e57ae..18d11e86 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,31 +1,32 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { Long, isSet, DeepPartial, Exact } from "../../helpers"; 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: Long; 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: Long; app: Long; } function createBaseApp(): App { - return { protocol: Long.UZERO, software: "" }; + return { + protocol: Long.UZERO, + software: "", + }; } export const App = { @@ -33,9 +34,11 @@ export const App = { if (!message.protocol.isZero()) { writer.uint32(8).uint64(message.protocol); } + if (message.software !== "") { writer.uint32(18).string(message.software); } + return writer; }, @@ -43,26 +46,31 @@ export const App = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseApp(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.protocol = reader.uint64() as Long; break; + case 2: message.software = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): App { return { - protocol: isSet(object.protocol) ? Long.fromValue(object.protocol) : Long.UZERO, + protocol: isSet(object.protocol) ? Long.fromString(object.protocol) : Long.UZERO, software: isSet(object.software) ? String(object.software) : "", }; }, @@ -86,7 +94,10 @@ export const App = { }; function createBaseConsensus(): Consensus { - return { block: Long.UZERO, app: Long.UZERO }; + return { + block: Long.UZERO, + app: Long.UZERO, + }; } export const Consensus = { @@ -94,9 +105,11 @@ export const Consensus = { if (!message.block.isZero()) { writer.uint32(8).uint64(message.block); } + if (!message.app.isZero()) { writer.uint32(16).uint64(message.app); } + return writer; }, @@ -104,27 +117,32 @@ export const Consensus = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensus(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.block = reader.uint64() as Long; break; + case 2: message.app = reader.uint64() as Long; break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Consensus { return { - block: isSet(object.block) ? Long.fromValue(object.block) : Long.UZERO, - app: isSet(object.app) ? Long.fromValue(object.app) : Long.UZERO, + block: isSet(object.block) ? Long.fromString(object.block) : Long.UZERO, + app: isSet(object.app) ? Long.fromString(object.app) : Long.UZERO, }; }, @@ -143,31 +161,3 @@ export const Consensus = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} From 6010e21088df27aea892b65bcc1b832407ecb3fd Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 13:16:08 -0500 Subject: [PATCH 09/38] eslintDisable --- package-lock.json | 74 +++++++++++++++++++++++----------------------- package.json | 2 +- scripts/codegen.js | 3 ++ 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index f514e2c3..fdc2d056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.38.1", + "@osmonauts/telescope": "^0.39.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,28 +2408,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.1.tgz", - "integrity": "sha512-lgsCEDiIZS5sKHODtqMB8PTf8XefmGrr+cjujJAXFZQtmGMyWPZdoUrIpMvPRbdUQ9WRi2jP9tmNR770T+lwcQ==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.34.0.tgz", + "integrity": "sha512-jOHcdE5802YLgn8/507Pf7MT3rSPnRKzr/YsiBvrBjInftqu3LjhmEkLIGL4HRJfzG3E735EX24Dsq/bcbWN1Q==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.21.1", - "@osmonauts/types": "^0.16.0", + "@osmonauts/proto-parser": "^0.22.0", + "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.1.tgz", - "integrity": "sha512-bZq+iMFT0gSSn+j8aciNWhh8b335FhylV6rt8/NTkjH/FoAx5B2H5VipOXKlStf5zsa7Ri3MtsTjRBkKmN0syA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.22.0.tgz", + "integrity": "sha512-yXACe8sq6JRoz57KnoTMPHXZdAtu8pec1YiiDI3m7fZ8+YWoGa3kCnDn4E1CkJhe8e411M+gDbux3vK8yD66RQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.16.0", + "@osmonauts/types": "^0.17.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.38.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.1.tgz", - "integrity": "sha512-A9g1rYTF/jo/gaULHn95/HsloKplc7//yNft0iG+scXNy0L39sC61vJ2xRcEhaFGakHuGIxszv21byK1NlOUDQ==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.39.0.tgz", + "integrity": "sha512-2thWDNgvQkScDzSemPEVcZxn89okAewspzY6FyVr+otcsd/H90ll1bOmbcCgyhjwFFjB6LIJu1B2bDbuN+4F6w==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,9 +2455,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.33.1", - "@osmonauts/proto-parser": "^0.21.1", - "@osmonauts/types": "^0.16.0", + "@osmonauts/ast": "^0.34.0", + "@osmonauts/proto-parser": "^0.22.0", + "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2486,9 +2486,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.16.0.tgz", - "integrity": "sha512-7KnfomlOy7Xvd+9rD9SR1mApzq6WU27GJBxd1O18AgGaYeCu2fXQMobuysynDumNV/gTVAHiJ10NnW/OBXrN6A==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.17.0.tgz", + "integrity": "sha512-e1J4t/qEfGzfWTCmnhCh12DGJj7O5q4nxCJsqXNOvU/VJA14M48S8mT9UCWlouemht3rEN9CYfVMCKKw8VaPNg==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -6859,28 +6859,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.33.1.tgz", - "integrity": "sha512-lgsCEDiIZS5sKHODtqMB8PTf8XefmGrr+cjujJAXFZQtmGMyWPZdoUrIpMvPRbdUQ9WRi2jP9tmNR770T+lwcQ==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.34.0.tgz", + "integrity": "sha512-jOHcdE5802YLgn8/507Pf7MT3rSPnRKzr/YsiBvrBjInftqu3LjhmEkLIGL4HRJfzG3E735EX24Dsq/bcbWN1Q==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.21.1", - "@osmonauts/types": "^0.16.0", + "@osmonauts/proto-parser": "^0.22.0", + "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.21.1.tgz", - "integrity": "sha512-bZq+iMFT0gSSn+j8aciNWhh8b335FhylV6rt8/NTkjH/FoAx5B2H5VipOXKlStf5zsa7Ri3MtsTjRBkKmN0syA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.22.0.tgz", + "integrity": "sha512-yXACe8sq6JRoz57KnoTMPHXZdAtu8pec1YiiDI3m7fZ8+YWoGa3kCnDn4E1CkJhe8e411M+gDbux3vK8yD66RQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.16.0", + "@osmonauts/types": "^0.17.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.38.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.38.1.tgz", - "integrity": "sha512-A9g1rYTF/jo/gaULHn95/HsloKplc7//yNft0iG+scXNy0L39sC61vJ2xRcEhaFGakHuGIxszv21byK1NlOUDQ==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.39.0.tgz", + "integrity": "sha512-2thWDNgvQkScDzSemPEVcZxn89okAewspzY6FyVr+otcsd/H90ll1bOmbcCgyhjwFFjB6LIJu1B2bDbuN+4F6w==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,9 +6906,9 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.33.1", - "@osmonauts/proto-parser": "^0.21.1", - "@osmonauts/types": "^0.16.0", + "@osmonauts/ast": "^0.34.0", + "@osmonauts/proto-parser": "^0.22.0", + "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6936,9 +6936,9 @@ } }, "@osmonauts/types": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.16.0.tgz", - "integrity": "sha512-7KnfomlOy7Xvd+9rD9SR1mApzq6WU27GJBxd1O18AgGaYeCu2fXQMobuysynDumNV/gTVAHiJ10NnW/OBXrN6A==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.17.0.tgz", + "integrity": "sha512-e1J4t/qEfGzfWTCmnhCh12DGJj7O5q4nxCJsqXNOvU/VJA14M48S8mT9UCWlouemht3rEN9CYfVMCKKw8VaPNg==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", diff --git a/package.json b/package.json index b9168b21..ac693bbf 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.38.2", + "@osmonauts/telescope": "^0.39.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 592adb81..5b572d7f 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -13,6 +13,9 @@ telescope({ outPath: join(__dirname, '/../src'), options: { useSDKTypes: false, + eslintDisable: { + disableAll: true + }, bundle: { enabled: false }, From dd203fcac7ccc99ef8a83f8692c39380dc39ad48 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 13:16:56 -0500 Subject: [PATCH 10/38] eslint-disable --- src/confio/proofs.ts | 1 + src/cosmos/auth/v1beta1/auth.ts | 1 + src/cosmos/auth/v1beta1/genesis.ts | 1 + src/cosmos/auth/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/authz.ts | 1 + src/cosmos/authz/v1beta1/genesis.ts | 1 + src/cosmos/authz/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/tx.ts | 1 + src/cosmos/bank/v1beta1/authz.ts | 1 + src/cosmos/bank/v1beta1/bank.ts | 1 + src/cosmos/bank/v1beta1/genesis.ts | 1 + src/cosmos/bank/v1beta1/query.ts | 1 + src/cosmos/bank/v1beta1/tx.ts | 1 + src/cosmos/base/abci/v1beta1/abci.ts | 1 + src/cosmos/base/kv/v1beta1/kv.ts | 1 + src/cosmos/base/query/v1beta1/pagination.ts | 1 + src/cosmos/base/reflection/v1beta1/reflection.ts | 1 + src/cosmos/base/snapshots/v1beta1/snapshot.ts | 1 + src/cosmos/base/store/v1beta1/commit_info.ts | 1 + src/cosmos/base/store/v1beta1/listening.ts | 1 + src/cosmos/base/store/v1beta1/snapshot.ts | 1 + src/cosmos/base/tendermint/v1beta1/query.ts | 1 + src/cosmos/base/v1beta1/coin.ts | 1 + src/cosmos/capability/v1beta1/capability.ts | 1 + src/cosmos/capability/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/tx.ts | 1 + src/cosmos/crypto/ed25519/keys.ts | 1 + src/cosmos/crypto/multisig/keys.ts | 1 + src/cosmos/crypto/multisig/v1beta1/multisig.ts | 1 + src/cosmos/crypto/secp256k1/keys.ts | 1 + src/cosmos/distribution/v1beta1/distribution.ts | 1 + src/cosmos/distribution/v1beta1/genesis.ts | 1 + src/cosmos/distribution/v1beta1/query.ts | 1 + src/cosmos/distribution/v1beta1/tx.ts | 1 + src/cosmos/evidence/v1beta1/evidence.ts | 1 + src/cosmos/evidence/v1beta1/genesis.ts | 1 + src/cosmos/evidence/v1beta1/query.ts | 1 + src/cosmos/evidence/v1beta1/tx.ts | 1 + src/cosmos/feegrant/v1beta1/feegrant.ts | 1 + src/cosmos/feegrant/v1beta1/genesis.ts | 1 + src/cosmos/feegrant/v1beta1/query.ts | 1 + src/cosmos/feegrant/v1beta1/tx.ts | 1 + src/cosmos/genutil/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/gov.ts | 1 + src/cosmos/gov/v1beta1/query.ts | 1 + src/cosmos/gov/v1beta1/tx.ts | 1 + src/cosmos/mint/v1beta1/genesis.ts | 1 + src/cosmos/mint/v1beta1/mint.ts | 1 + src/cosmos/mint/v1beta1/query.ts | 1 + src/cosmos/params/v1beta1/params.ts | 1 + src/cosmos/params/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/genesis.ts | 1 + src/cosmos/slashing/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/slashing.ts | 1 + src/cosmos/slashing/v1beta1/tx.ts | 1 + src/cosmos/staking/v1beta1/authz.ts | 1 + src/cosmos/staking/v1beta1/genesis.ts | 1 + src/cosmos/staking/v1beta1/query.ts | 1 + src/cosmos/staking/v1beta1/staking.ts | 1 + src/cosmos/staking/v1beta1/tx.ts | 1 + src/cosmos/tx/signing/v1beta1/signing.ts | 1 + src/cosmos/tx/v1beta1/service.ts | 1 + src/cosmos/tx/v1beta1/tx.ts | 1 + src/cosmos/upgrade/v1beta1/query.ts | 1 + src/cosmos/upgrade/v1beta1/upgrade.ts | 1 + src/cosmos/vesting/v1beta1/tx.ts | 1 + src/cosmos/vesting/v1beta1/vesting.ts | 1 + src/cosmwasm/wasm/v1/genesis.ts | 1 + src/cosmwasm/wasm/v1/ibc.ts | 1 + src/cosmwasm/wasm/v1/proposal.ts | 1 + src/cosmwasm/wasm/v1/query.ts | 1 + src/cosmwasm/wasm/v1/tx.ts | 1 + src/cosmwasm/wasm/v1/types.ts | 1 + src/google/api/http.ts | 1 + src/google/protobuf/any.ts | 1 + src/google/protobuf/descriptor.ts | 1 + src/google/protobuf/duration.ts | 1 + src/google/protobuf/timestamp.ts | 1 + src/helpers.ts | 3 ++- src/ibc/applications/transfer/v1/genesis.ts | 1 + src/ibc/applications/transfer/v1/query.ts | 1 + src/ibc/applications/transfer/v1/transfer.ts | 1 + src/ibc/applications/transfer/v1/tx.ts | 1 + src/ibc/applications/transfer/v2/packet.ts | 1 + src/ibc/core/channel/v1/channel.ts | 1 + src/ibc/core/channel/v1/genesis.ts | 1 + src/ibc/core/channel/v1/query.ts | 1 + src/ibc/core/channel/v1/tx.ts | 1 + src/ibc/core/client/v1/client.ts | 1 + src/ibc/core/client/v1/genesis.ts | 1 + src/ibc/core/client/v1/query.ts | 1 + src/ibc/core/client/v1/tx.ts | 1 + src/ibc/core/commitment/v1/commitment.ts | 1 + src/ibc/core/connection/v1/connection.ts | 1 + src/ibc/core/connection/v1/genesis.ts | 1 + src/ibc/core/connection/v1/query.ts | 1 + src/ibc/core/connection/v1/tx.ts | 1 + src/ibc/core/types/v1/genesis.ts | 1 + src/ibc/lightclients/localhost/v1/localhost.ts | 1 + src/ibc/lightclients/solomachine/v1/solomachine.ts | 1 + src/ibc/lightclients/tendermint/v1/tendermint.ts | 1 + src/tendermint/abci/types.ts | 1 + src/tendermint/crypto/keys.ts | 1 + src/tendermint/crypto/proof.ts | 1 + src/tendermint/p2p/types.ts | 1 + src/tendermint/types/block.ts | 1 + src/tendermint/types/evidence.ts | 1 + src/tendermint/types/params.ts | 1 + src/tendermint/types/types.ts | 1 + src/tendermint/types/validator.ts | 1 + src/tendermint/version/types.ts | 1 + 113 files changed, 114 insertions(+), 1 deletion(-) diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 57770368..3ef74f6c 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; export const protobufPackage = "ics23"; diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index 6c198b4b..38f18786 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 6d284939..0dfbee2d 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 13ef63d6..0bd41291 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index f31d89ef..46ba74b8 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 9e050b83..72ac8771 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 0aedb41a..db3da3c9 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index fa691fec..33b34a0e 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index 503a188a..9eb22de7 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 09169757..24ee7489 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index 05637bba..9892e9fd 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index ff9c1a7e..67a4797c 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; import { Params, Metadata } from "./bank"; diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index d191874d..04789ea3 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 9fb4c1e1..c743e21a 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index 1d65e1f9..c6e9c045 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.kv.v1beta1"; diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 06957204..da4e8524 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.query.v1beta1"; diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 90a70cb3..74820ddb 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index c6021397..d321e89f 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.snapshots.v1beta1"; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 5c319b97..1f906bfe 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index 7760a5f5..245d4e26 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 80f7872d..2e61744e 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index fef8cf88..0587403a 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; import { BlockID } from "../../../../tendermint/types/types"; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index 2e597a27..25a1eaee 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.base.v1beta1"; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index 44976f31..8002ccce 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index bda819d3..9b8e2dad 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index d96c142b..75ead867 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index 81579806..a76310b1 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index 89694266..d3b3b7aa 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.ed25519"; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index 65bc9eb8..69404109 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 1eab6888..d8fea648 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index f28dc5dd..e15d3612 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.secp256k1"; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 48d2c542..3899d795 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 381ab18c..4dabcd29 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { DecCoin } from "../../base/v1beta1/coin"; import { ValidatorAccumulatedCommission, diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index d951b43f..bc4e7687 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index 0bbafe61..ff3c6d66 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index 2a83261e..6391a281 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index 50ea2933..d5e26fbc 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 64610ce4..4bb73045 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index dcddf256..0704fbb5 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index c044e796..4ffad3a3 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index d42e4975..35ab4b27 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 23ec5fbc..7f57a9bc 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index 54200059..c747a08a 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 481681e3..24e0b6ad 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.genutil.v1beta1"; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index afe27b83..4660bdb8 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 1af3e9a1..b8923329 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index b06c27e9..90e3a438 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { ProposalStatus, Proposal, diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index a2c3e7c3..20c8139f 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { VoteOption, WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON } from "./gov"; diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 91d140e7..9149d5f5 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index ac1fa160..14950e6e 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index 8e40864c..ad61ea11 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index 3148ecb9..d5f58d05 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 484eb577..b290298b 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index e6e0ac85..6ba42a45 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 8e4a4d6d..0c894902 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 5980318a..d5074984 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index cefd648f..1ef3807b 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 90765905..11e8a2c7 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 28050d44..df98dcae 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index 8ddf7930..ba292143 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Validator, diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index 5a73fe4f..e73d1196 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Header } from "../../../tendermint/types/types"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index b9ab05f8..3aaf6138 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index f5630d51..00d9faca 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index a1c20bc8..9fc36653 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 4efe2cf7..c837c0dd 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index ea898602..d1b44c2e 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index a8e9dd98..9cefc9ed 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index d26a32e5..abccbc54 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index f906b8d8..a846d011 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index 45d9ac88..af243792 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index 3b31ada7..878c5cea 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 73634370..49c00b94 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 96f41c1f..6fbac169 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model } from "./types"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index 4f652cab..52447558 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 8db22078..cb90c400 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; diff --git a/src/google/api/http.ts b/src/google/api/http.ts index 2084f522..a5c7bdf6 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "google.api"; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 8e78525a..429edd39 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "google.protobuf"; diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 31cb1529..642b660b 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "google.protobuf"; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 89299988..71fba511 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "google.protobuf"; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index 54d4d1a9..2d79b637 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "google.protobuf"; diff --git a/src/helpers.ts b/src/helpers.ts index c1561d56..3c7a428f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,5 +1,6 @@ +/* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.38.1 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.39.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index aba4fba7..af39dad6 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index 4d48a1c6..f1d559cb 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index a801cbe2..b6ef5e45 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index 6a0fdd08..f3bf96cb 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index 3fe5a5ea..7d27d7e2 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v2"; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index 3ecb70c8..9405b61a 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 9496dae6..4ea1b423 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 817382fe..0678c2f0 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; import { Height, IdentifiedClientState } from "../../client/v1/client"; diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index 6310750c..f593fa32 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 35f0de27..2a17bd50 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index f97541e1..47fdd17b 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index 1b9fbd19..8e9de6ac 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "./client"; diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 9927bd12..4f4f7283 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index 8ec96f8b..a62fc23a 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 8288671a..36457e94 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 02df6280..4974d171 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 6a6a1851..7598ec86 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; import { Height, IdentifiedClientState } from "../../client/v1/client"; diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 1a61f9d9..629454fa 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; import { Height } from "../../client/v1/client"; diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index f62d9b6a..652631a4 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index e5b20607..ec76ff20 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index d8157504..84dca2f6 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; import { Channel } from "../../../core/channel/v1/channel"; diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index d8bfb8ec..aa29646b 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Duration } from "../../../../google/protobuf/duration"; import { Height } from "../../../core/client/v1/client"; import { ProofSpec } from "../../../../confio/proofs"; diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index f22d7d88..bd41515a 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Timestamp } from "../../google/protobuf/timestamp"; import { Header } from "../types/types"; import { ProofOps } from "../crypto/proof"; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index 5a5bce12..a3c2806e 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 113c3a58..813c10da 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 8f18cb41..c9ac3a59 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 304abf27..86596dad 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index ba3afd07..16f32abd 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator } from "./validator"; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 258d620d..e014d0e8 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../helpers"; diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index aa4991a3..e22cc286 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; import { Timestamp } from "../../google/protobuf/timestamp"; diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 0abca094..2cf81a9c 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../helpers"; diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index 18d11e86..885bcfd4 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,3 +1,4 @@ +/* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.version"; From 21240429ff867ae70b8d42b1cccb77dc39549ee2 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 13:22:22 -0500 Subject: [PATCH 11/38] fromJSON --- package-lock.json | 30 ++++++------ package.json | 2 +- src/cosmos/auth/v1beta1/auth.ts | 14 +++--- src/cosmos/base/abci/v1beta1/abci.ts | 20 ++++---- src/cosmos/base/query/v1beta1/pagination.ts | 6 +-- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 4 +- src/cosmos/base/store/v1beta1/commit_info.ts | 4 +- src/cosmos/base/store/v1beta1/snapshot.ts | 2 +- src/cosmos/base/tendermint/v1beta1/query.ts | 12 ++--- src/cosmos/capability/v1beta1/capability.ts | 2 +- src/cosmos/capability/v1beta1/genesis.ts | 4 +- .../distribution/v1beta1/distribution.ts | 8 ++-- src/cosmos/distribution/v1beta1/genesis.ts | 6 +-- src/cosmos/distribution/v1beta1/query.ts | 4 +- src/cosmos/evidence/v1beta1/evidence.ts | 4 +- src/cosmos/gov/v1beta1/genesis.ts | 2 +- src/cosmos/gov/v1beta1/gov.ts | 6 +-- src/cosmos/gov/v1beta1/query.ts | 12 ++--- src/cosmos/gov/v1beta1/tx.ts | 8 ++-- src/cosmos/mint/v1beta1/mint.ts | 2 +- src/cosmos/slashing/v1beta1/genesis.ts | 2 +- src/cosmos/slashing/v1beta1/slashing.ts | 8 ++-- src/cosmos/staking/v1beta1/genesis.ts | 2 +- src/cosmos/staking/v1beta1/query.ts | 2 +- src/cosmos/staking/v1beta1/staking.ts | 6 +-- src/cosmos/tx/signing/v1beta1/signing.ts | 2 +- src/cosmos/tx/v1beta1/service.ts | 2 +- src/cosmos/tx/v1beta1/tx.ts | 8 ++-- src/cosmos/upgrade/v1beta1/query.ts | 4 +- src/cosmos/upgrade/v1beta1/upgrade.ts | 4 +- src/cosmos/vesting/v1beta1/tx.ts | 2 +- src/cosmos/vesting/v1beta1/vesting.ts | 8 ++-- src/cosmwasm/wasm/v1/genesis.ts | 4 +- src/cosmwasm/wasm/v1/ibc.ts | 6 +-- src/cosmwasm/wasm/v1/proposal.ts | 8 ++-- src/cosmwasm/wasm/v1/query.ts | 8 ++-- src/cosmwasm/wasm/v1/tx.ts | 6 +-- src/cosmwasm/wasm/v1/types.ts | 10 ++-- src/google/protobuf/descriptor.ts | 6 +-- src/google/protobuf/duration.ts | 2 +- src/google/protobuf/timestamp.ts | 2 +- src/helpers.ts | 2 +- src/ibc/applications/transfer/v1/tx.ts | 4 +- src/ibc/core/channel/v1/channel.ts | 8 ++-- src/ibc/core/channel/v1/genesis.ts | 4 +- src/ibc/core/channel/v1/query.ts | 22 ++++----- src/ibc/core/channel/v1/tx.ts | 8 +--- src/ibc/core/client/v1/client.ts | 4 +- src/ibc/core/client/v1/genesis.ts | 2 +- src/ibc/core/client/v1/query.ts | 4 +- src/ibc/core/connection/v1/connection.ts | 6 +-- src/ibc/core/connection/v1/genesis.ts | 2 +- src/ibc/core/connection/v1/query.ts | 4 +- src/ibc/core/connection/v1/tx.ts | 4 +- .../solomachine/v1/solomachine.ts | 22 ++++----- .../lightclients/tendermint/v1/tendermint.ts | 4 +- src/tendermint/abci/types.ts | 46 +++++++++---------- src/tendermint/crypto/proof.ts | 4 +- src/tendermint/p2p/types.ts | 6 +-- src/tendermint/types/evidence.ts | 8 ++-- src/tendermint/types/params.ts | 16 +++---- src/tendermint/types/types.ts | 12 ++--- src/tendermint/types/validator.ts | 8 ++-- src/tendermint/version/types.ts | 6 +-- 64 files changed, 224 insertions(+), 236 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdc2d056..2e089cdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.39.0", + "@osmonauts/telescope": "^0.40.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.34.0.tgz", - "integrity": "sha512-jOHcdE5802YLgn8/507Pf7MT3rSPnRKzr/YsiBvrBjInftqu3LjhmEkLIGL4HRJfzG3E735EX24Dsq/bcbWN1Q==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.35.0.tgz", + "integrity": "sha512-nSWiaTBj9CfSVUem9gP/h3u2Wjot+VVapJm23V45guHgDmbgYbHxV+hwE9z2GBHejgprbg71TiM2Qjw58CyhFw==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.39.0.tgz", - "integrity": "sha512-2thWDNgvQkScDzSemPEVcZxn89okAewspzY6FyVr+otcsd/H90ll1bOmbcCgyhjwFFjB6LIJu1B2bDbuN+4F6w==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.40.0.tgz", + "integrity": "sha512-Czi02GE2/bh2ZDJYaeMSXNwFWrTBXdPBHm3wy8xCfSW5/fz/qMFRJ6orF3XVvgHz78C1yRWpjqIdH6g/UuwEww==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.34.0", + "@osmonauts/ast": "^0.35.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.34.0.tgz", - "integrity": "sha512-jOHcdE5802YLgn8/507Pf7MT3rSPnRKzr/YsiBvrBjInftqu3LjhmEkLIGL4HRJfzG3E735EX24Dsq/bcbWN1Q==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.35.0.tgz", + "integrity": "sha512-nSWiaTBj9CfSVUem9gP/h3u2Wjot+VVapJm23V45guHgDmbgYbHxV+hwE9z2GBHejgprbg71TiM2Qjw58CyhFw==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.39.0.tgz", - "integrity": "sha512-2thWDNgvQkScDzSemPEVcZxn89okAewspzY6FyVr+otcsd/H90ll1bOmbcCgyhjwFFjB6LIJu1B2bDbuN+4F6w==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.40.0.tgz", + "integrity": "sha512-Czi02GE2/bh2ZDJYaeMSXNwFWrTBXdPBHm3wy8xCfSW5/fz/qMFRJ6orF3XVvgHz78C1yRWpjqIdH6g/UuwEww==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.34.0", + "@osmonauts/ast": "^0.35.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index ac693bbf..5c3b8dee 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.39.0", + "@osmonauts/telescope": "^0.40.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index 38f18786..a59fbd00 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -100,8 +100,8 @@ export const BaseAccount = { return { address: isSet(object.address) ? String(object.address) : "", pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - accountNumber: isSet(object.accountNumber) ? Long.fromString(object.accountNumber) : Long.UZERO, - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, @@ -298,17 +298,17 @@ export const Params = { fromJSON(object: any): Params { return { maxMemoCharacters: isSet(object.maxMemoCharacters) - ? Long.fromString(object.maxMemoCharacters) + ? Long.fromValue(object.maxMemoCharacters) : Long.UZERO, - txSigLimit: isSet(object.txSigLimit) ? Long.fromString(object.txSigLimit) : Long.UZERO, + txSigLimit: isSet(object.txSigLimit) ? Long.fromValue(object.txSigLimit) : Long.UZERO, txSizeCostPerByte: isSet(object.txSizeCostPerByte) - ? Long.fromString(object.txSizeCostPerByte) + ? Long.fromValue(object.txSizeCostPerByte) : Long.UZERO, sigVerifyCostEd25519: isSet(object.sigVerifyCostEd25519) - ? Long.fromString(object.sigVerifyCostEd25519) + ? Long.fromValue(object.sigVerifyCostEd25519) : Long.UZERO, sigVerifyCostSecp256k1: isSet(object.sigVerifyCostSecp256k1) - ? Long.fromString(object.sigVerifyCostSecp256k1) + ? Long.fromValue(object.sigVerifyCostSecp256k1) : Long.UZERO, }; }, diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index c743e21a..0f90b6a4 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -315,7 +315,7 @@ export const TxResponse = { fromJSON(object: any): TxResponse { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, txhash: isSet(object.txhash) ? String(object.txhash) : "", codespace: isSet(object.codespace) ? String(object.codespace) : "", code: isSet(object.code) ? Number(object.code) : 0, @@ -323,8 +323,8 @@ export const TxResponse = { rawLog: isSet(object.rawLog) ? String(object.rawLog) : "", logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => ABCIMessageLog.fromJSON(e)) : [], info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, tx: isSet(object.tx) ? Any.fromJSON(object.tx) : undefined, timestamp: isSet(object.timestamp) ? String(object.timestamp) : "", events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], @@ -663,8 +663,8 @@ export const GasInfo = { fromJSON(object: any): GasInfo { return { - gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.UZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.UZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.UZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.UZERO, }; }, @@ -1062,11 +1062,11 @@ export const SearchTxsResult = { fromJSON(object: any): SearchTxsResult { return { - totalCount: isSet(object.totalCount) ? Long.fromString(object.totalCount) : Long.UZERO, - count: isSet(object.count) ? Long.fromString(object.count) : Long.UZERO, - pageNumber: isSet(object.pageNumber) ? Long.fromString(object.pageNumber) : Long.UZERO, - pageTotal: isSet(object.pageTotal) ? Long.fromString(object.pageTotal) : Long.UZERO, - limit: isSet(object.limit) ? Long.fromString(object.limit) : Long.UZERO, + totalCount: isSet(object.totalCount) ? Long.fromValue(object.totalCount) : Long.UZERO, + count: isSet(object.count) ? Long.fromValue(object.count) : Long.UZERO, + pageNumber: isSet(object.pageNumber) ? Long.fromValue(object.pageNumber) : Long.UZERO, + pageTotal: isSet(object.pageTotal) ? Long.fromValue(object.pageTotal) : Long.UZERO, + limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => TxResponse.fromJSON(e)) : [], }; }, diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index da4e8524..93c14e80 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -148,8 +148,8 @@ export const PageRequest = { fromJSON(object: any): PageRequest { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - offset: isSet(object.offset) ? Long.fromString(object.offset) : Long.UZERO, - limit: isSet(object.limit) ? Long.fromString(object.limit) : Long.UZERO, + offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO, + limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false, reverse: isSet(object.reverse) ? Boolean(object.reverse) : false, }; @@ -228,7 +228,7 @@ export const PageResponse = { fromJSON(object: any): PageResponse { return { nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(), - total: isSet(object.total) ? Long.fromString(object.total) : Long.UZERO, + total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO, }; }, diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index d321e89f..a375fb6b 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -129,7 +129,7 @@ export const Snapshot = { fromJSON(object: any): Snapshot { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunks: isSet(object.chunks) ? Number(object.chunks) : 0, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), @@ -466,7 +466,7 @@ export const SnapshotIAVLItem = { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, height: isSet(object.height) ? Number(object.height) : 0, }; }, diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 1f906bfe..0eae5106 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -78,7 +78,7 @@ export const CommitInfo = { fromJSON(object: any): CommitInfo { return { - version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, storeInfos: Array.isArray(object?.storeInfos) ? object.storeInfos.map((e: any) => StoreInfo.fromJSON(e)) : [], @@ -227,7 +227,7 @@ export const CommitID = { fromJSON(object: any): CommitID { return { - version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), }; }, diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 2e61744e..d76843e6 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -222,7 +222,7 @@ export const SnapshotIAVLItem = { return { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? Long.fromString(object.version) : Long.ZERO, + version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, height: isSet(object.height) ? Number(object.height) : 0, }; }, diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 0587403a..c9086468 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -159,7 +159,7 @@ export const GetValidatorSetByHeightRequest = { fromJSON(object: any): GetValidatorSetByHeightRequest { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -243,7 +243,7 @@ export const GetValidatorSetByHeightResponse = { fromJSON(object: any): GetValidatorSetByHeightResponse { return { - blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.ZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.ZERO, validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], @@ -402,7 +402,7 @@ export const GetLatestValidatorSetResponse = { fromJSON(object: any): GetLatestValidatorSetResponse { return { - blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.ZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.ZERO, validators: Array.isArray(object?.validators) ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], @@ -510,8 +510,8 @@ export const Validator = { return { address: isSet(object.address) ? String(object.address) : "", pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, - proposerPriority: isSet(object.proposerPriority) ? Long.fromString(object.proposerPriority) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, + proposerPriority: isSet(object.proposerPriority) ? Long.fromValue(object.proposerPriority) : Long.ZERO, }; }, @@ -581,7 +581,7 @@ export const GetBlockByHeightRequest = { fromJSON(object: any): GetBlockByHeightRequest { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, }; }, diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index 8002ccce..87575e04 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -67,7 +67,7 @@ export const Capability = { fromJSON(object: any): Capability { return { - index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO, }; }, diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 9b8e2dad..b9719305 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -73,7 +73,7 @@ export const GenesisOwners = { fromJSON(object: any): GenesisOwners { return { - index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO, indexOwners: isSet(object.indexOwners) ? CapabilityOwners.fromJSON(object.indexOwners) : undefined, }; }, @@ -146,7 +146,7 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { - index: isSet(object.index) ? Long.fromString(object.index) : Long.UZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.UZERO, owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => GenesisOwners.fromJSON(e)) : [], }; }, diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 3899d795..07ee82f8 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -346,7 +346,7 @@ export const ValidatorCurrentRewards = { fromJSON(object: any): ValidatorCurrentRewards { return { rewards: Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [], - period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, + period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, }; }, @@ -550,7 +550,7 @@ export const ValidatorSlashEvent = { fromJSON(object: any): ValidatorSlashEvent { return { - validatorPeriod: isSet(object.validatorPeriod) ? Long.fromString(object.validatorPeriod) : Long.UZERO, + validatorPeriod: isSet(object.validatorPeriod) ? Long.fromValue(object.validatorPeriod) : Long.UZERO, fraction: isSet(object.fraction) ? String(object.fraction) : "", }; }, @@ -862,9 +862,9 @@ export const DelegatorStartingInfo = { fromJSON(object: any): DelegatorStartingInfo { return { - previousPeriod: isSet(object.previousPeriod) ? Long.fromString(object.previousPeriod) : Long.UZERO, + previousPeriod: isSet(object.previousPeriod) ? Long.fromValue(object.previousPeriod) : Long.UZERO, stake: isSet(object.stake) ? String(object.stake) : "", - height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, }; }, diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 4dabcd29..8daef586 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -416,7 +416,7 @@ export const ValidatorHistoricalRewardsRecord = { fromJSON(object: any): ValidatorHistoricalRewardsRecord { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, + period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, rewards: isSet(object.rewards) ? ValidatorHistoricalRewards.fromJSON(object.rewards) : undefined, }; }, @@ -676,8 +676,8 @@ export const ValidatorSlashEventRecord = { fromJSON(object: any): ValidatorSlashEventRecord { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, - period: isSet(object.period) ? Long.fromString(object.period) : Long.UZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, + period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO, validatorSlashEvent: isSet(object.validatorSlashEvent) ? ValidatorSlashEvent.fromJSON(object.validatorSlashEvent) : undefined, diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index bc4e7687..c073cafa 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -595,8 +595,8 @@ export const QueryValidatorSlashesRequest = { fromJSON(object: any): QueryValidatorSlashesRequest { return { validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "", - startingHeight: isSet(object.startingHeight) ? Long.fromString(object.startingHeight) : Long.UZERO, - endingHeight: isSet(object.endingHeight) ? Long.fromString(object.endingHeight) : Long.UZERO, + startingHeight: isSet(object.startingHeight) ? Long.fromValue(object.startingHeight) : Long.UZERO, + endingHeight: isSet(object.endingHeight) ? Long.fromValue(object.endingHeight) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index 6391a281..76991821 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -81,9 +81,9 @@ export const Equivocation = { fromJSON(object: any): Equivocation { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, consensusAddress: isSet(object.consensusAddress) ? String(object.consensusAddress) : "", }; }, diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index 4660bdb8..b87e9cff 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -122,7 +122,7 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { startingProposalId: isSet(object.startingProposalId) - ? Long.fromString(object.startingProposalId) + ? Long.fromValue(object.startingProposalId) : Long.UZERO, deposits: Array.isArray(object?.deposits) ? object.deposits.map((e: any) => Deposit.fromJSON(e)) : [], votes: Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index b8923329..b464d741 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -477,7 +477,7 @@ export const Deposit = { fromJSON(object: any): Deposit { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; @@ -620,7 +620,7 @@ export const Proposal = { fromJSON(object: any): Proposal { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, content: isSet(object.content) ? Any.fromJSON(object.content) : undefined, status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0, finalTallyResult: isSet(object.finalTallyResult) @@ -855,7 +855,7 @@ export const Vote = { fromJSON(object: any): Vote { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, options: Array.isArray(object?.options) diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 90e3a438..88fbb535 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -190,7 +190,7 @@ export const QueryProposalRequest = { fromJSON(object: any): QueryProposalRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, }; }, @@ -495,7 +495,7 @@ export const QueryVoteRequest = { fromJSON(object: any): QueryVoteRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", }; }, @@ -623,7 +623,7 @@ export const QueryVotesRequest = { fromJSON(object: any): QueryVotesRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -924,7 +924,7 @@ export const QueryDepositRequest = { fromJSON(object: any): QueryDepositRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", }; }, @@ -1055,7 +1055,7 @@ export const QueryDepositsRequest = { fromJSON(object: any): QueryDepositsRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -1199,7 +1199,7 @@ export const QueryTallyResultRequest = { fromJSON(object: any): QueryTallyResultRequest { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, }; }, diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index 20c8139f..0b5ab7f8 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -188,7 +188,7 @@ export const MsgSubmitProposalResponse = { fromJSON(object: any): MsgSubmitProposalResponse { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, }; }, @@ -267,7 +267,7 @@ export const MsgVote = { fromJSON(object: any): MsgVote { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, }; @@ -392,7 +392,7 @@ export const MsgVoteWeighted = { fromJSON(object: any): MsgVoteWeighted { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, voter: isSet(object.voter) ? String(object.voter) : "", options: Array.isArray(object?.options) ? object.options.map((e: any) => WeightedVoteOption.fromJSON(e)) @@ -525,7 +525,7 @@ export const MsgDeposit = { fromJSON(object: any): MsgDeposit { return { - proposalId: isSet(object.proposalId) ? Long.fromString(object.proposalId) : Long.UZERO, + proposalId: isSet(object.proposalId) ? Long.fromValue(object.proposalId) : Long.UZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index 14950e6e..e48598ba 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -190,7 +190,7 @@ export const Params = { inflationMax: isSet(object.inflationMax) ? String(object.inflationMax) : "", inflationMin: isSet(object.inflationMin) ? String(object.inflationMin) : "", goalBonded: isSet(object.goalBonded) ? String(object.goalBonded) : "", - blocksPerYear: isSet(object.blocksPerYear) ? Long.fromString(object.blocksPerYear) : Long.UZERO, + blocksPerYear: isSet(object.blocksPerYear) ? Long.fromValue(object.blocksPerYear) : Long.UZERO, }; }, diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index 6ba42a45..ce59d489 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -348,7 +348,7 @@ export const MissedBlock = { fromJSON(object: any): MissedBlock { return { - index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, missed: isSet(object.missed) ? Boolean(object.missed) : false, }; }, diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index d5074984..309ea686 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -141,12 +141,12 @@ export const ValidatorSigningInfo = { fromJSON(object: any): ValidatorSigningInfo { return { address: isSet(object.address) ? String(object.address) : "", - startHeight: isSet(object.startHeight) ? Long.fromString(object.startHeight) : Long.ZERO, - indexOffset: isSet(object.indexOffset) ? Long.fromString(object.indexOffset) : Long.ZERO, + startHeight: isSet(object.startHeight) ? Long.fromValue(object.startHeight) : Long.ZERO, + indexOffset: isSet(object.indexOffset) ? Long.fromValue(object.indexOffset) : Long.ZERO, jailedUntil: isSet(object.jailedUntil) ? fromJsonTimestamp(object.jailedUntil) : undefined, tombstoned: isSet(object.tombstoned) ? Boolean(object.tombstoned) : false, missedBlocksCounter: isSet(object.missedBlocksCounter) - ? Long.fromString(object.missedBlocksCounter) + ? Long.fromValue(object.missedBlocksCounter) : Long.ZERO, }; }, @@ -263,7 +263,7 @@ export const Params = { fromJSON(object: any): Params { return { signedBlocksWindow: isSet(object.signedBlocksWindow) - ? Long.fromString(object.signedBlocksWindow) + ? Long.fromValue(object.signedBlocksWindow) : Long.ZERO, minSignedPerWindow: isSet(object.minSignedPerWindow) ? bytesFromBase64(object.minSignedPerWindow) diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index df98dcae..10f331ef 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -281,7 +281,7 @@ export const LastValidatorPower = { fromJSON(object: any): LastValidatorPower { return { address: isSet(object.address) ? String(object.address) : "", - power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, }; }, diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index ba292143..a20814f9 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1972,7 +1972,7 @@ export const QueryHistoricalInfoRequest = { fromJSON(object: any): QueryHistoricalInfoRequest { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, }; }, diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index e73d1196..720470b3 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -810,7 +810,7 @@ export const Validator = { tokens: isSet(object.tokens) ? String(object.tokens) : "", delegatorShares: isSet(object.delegatorShares) ? String(object.delegatorShares) : "", description: isSet(object.description) ? Description.fromJSON(object.description) : undefined, - unbondingHeight: isSet(object.unbondingHeight) ? Long.fromString(object.unbondingHeight) : Long.ZERO, + unbondingHeight: isSet(object.unbondingHeight) ? Long.fromValue(object.unbondingHeight) : Long.ZERO, unbondingTime: isSet(object.unbondingTime) ? fromJsonTimestamp(object.unbondingTime) : undefined, commission: isSet(object.commission) ? Commission.fromJSON(object.commission) : undefined, minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "", @@ -1440,7 +1440,7 @@ export const UnbondingDelegationEntry = { fromJSON(object: any): UnbondingDelegationEntry { return { - creationHeight: isSet(object.creationHeight) ? Long.fromString(object.creationHeight) : Long.ZERO, + creationHeight: isSet(object.creationHeight) ? Long.fromValue(object.creationHeight) : Long.ZERO, completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined, initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", balance: isSet(object.balance) ? String(object.balance) : "", @@ -1542,7 +1542,7 @@ export const RedelegationEntry = { fromJSON(object: any): RedelegationEntry { return { - creationHeight: isSet(object.creationHeight) ? Long.fromString(object.creationHeight) : Long.ZERO, + creationHeight: isSet(object.creationHeight) ? Long.fromValue(object.creationHeight) : Long.ZERO, completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined, initialBalance: isSet(object.initialBalance) ? String(object.initialBalance) : "", sharesDst: isSet(object.sharesDst) ? String(object.sharesDst) : "", diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 00d9faca..34eccf89 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -272,7 +272,7 @@ export const SignatureDescriptor = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, data: isSet(object.data) ? SignatureDescriptor_Data.fromJSON(object.data) : undefined, - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 9fc36653..fc22df46 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -884,7 +884,7 @@ export const GetBlockWithTxsRequest = { fromJSON(object: any): GetBlockWithTxsRequest { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index c837c0dd..67624ecc 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -485,7 +485,7 @@ export const SignDoc = { bodyBytes: isSet(object.bodyBytes) ? bytesFromBase64(object.bodyBytes) : new Uint8Array(), authInfoBytes: isSet(object.authInfoBytes) ? bytesFromBase64(object.authInfoBytes) : new Uint8Array(), chainId: isSet(object.chainId) ? String(object.chainId) : "", - accountNumber: isSet(object.accountNumber) ? Long.fromString(object.accountNumber) : Long.UZERO, + accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO, }; }, @@ -595,7 +595,7 @@ export const TxBody = { return { messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], memo: isSet(object.memo) ? String(object.memo) : "", - timeoutHeight: isSet(object.timeoutHeight) ? Long.fromString(object.timeoutHeight) : Long.UZERO, + timeoutHeight: isSet(object.timeoutHeight) ? Long.fromValue(object.timeoutHeight) : Long.UZERO, extensionOptions: Array.isArray(object?.extensionOptions) ? object.extensionOptions.map((e: any) => Any.fromJSON(e)) : [], @@ -785,7 +785,7 @@ export const SignerInfo = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, modeInfo: isSet(object.modeInfo) ? ModeInfo.fromJSON(object.modeInfo) : undefined, - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, @@ -1096,7 +1096,7 @@ export const Fee = { fromJSON(object: any): Fee { return { amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - gasLimit: isSet(object.gasLimit) ? Long.fromString(object.gasLimit) : Long.UZERO, + gasLimit: isSet(object.gasLimit) ? Long.fromValue(object.gasLimit) : Long.UZERO, payer: isSet(object.payer) ? String(object.payer) : "", granter: isSet(object.granter) ? String(object.granter) : "", }; diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index d1b44c2e..bcd3d519 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -284,7 +284,7 @@ export const QueryAppliedPlanResponse = { fromJSON(object: any): QueryAppliedPlanResponse { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, }; }, @@ -343,7 +343,7 @@ export const QueryUpgradedConsensusStateRequest = { fromJSON(object: any): QueryUpgradedConsensusStateRequest { return { - lastHeight: isSet(object.lastHeight) ? Long.fromString(object.lastHeight) : Long.ZERO, + lastHeight: isSet(object.lastHeight) ? Long.fromValue(object.lastHeight) : Long.ZERO, }; }, diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index 9cefc9ed..8ef2d1e1 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -158,7 +158,7 @@ export const Plan = { return { name: isSet(object.name) ? String(object.name) : "", time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, info: isSet(object.info) ? String(object.info) : "", upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) @@ -395,7 +395,7 @@ export const ModuleVersion = { fromJSON(object: any): ModuleVersion { return { name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? Long.fromString(object.version) : Long.UZERO, + version: isSet(object.version) ? Long.fromValue(object.version) : Long.UZERO, }; }, diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index abccbc54..17dec3ac 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -97,7 +97,7 @@ export const MsgCreateVestingAccount = { fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "", toAddress: isSet(object.toAddress) ? String(object.toAddress) : "", amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? Long.fromString(object.endTime) : Long.ZERO, + endTime: isSet(object.endTime) ? Long.fromValue(object.endTime) : Long.ZERO, delayed: isSet(object.delayed) ? Boolean(object.delayed) : false, }; }, diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index a846d011..c47872db 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -147,7 +147,7 @@ export const BaseVestingAccount = { delegatedVesting: Array.isArray(object?.delegatedVesting) ? object.delegatedVesting.map((e: any) => Coin.fromJSON(e)) : [], - endTime: isSet(object.endTime) ? Long.fromString(object.endTime) : Long.ZERO, + endTime: isSet(object.endTime) ? Long.fromValue(object.endTime) : Long.ZERO, }; }, @@ -244,7 +244,7 @@ export const ContinuousVestingAccount = { baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? Long.fromString(object.startTime) : Long.ZERO, + startTime: isSet(object.startTime) ? Long.fromValue(object.startTime) : Long.ZERO, }; }, @@ -386,7 +386,7 @@ export const Period = { fromJSON(object: any): Period { return { - length: isSet(object.length) ? Long.fromString(object.length) : Long.ZERO, + length: isSet(object.length) ? Long.fromValue(object.length) : Long.ZERO, amount: Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -473,7 +473,7 @@ export const PeriodicVestingAccount = { baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : undefined, - startTime: isSet(object.startTime) ? Long.fromString(object.startTime) : Long.ZERO, + startTime: isSet(object.startTime) ? Long.fromValue(object.startTime) : Long.ZERO, vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e: any) => Period.fromJSON(e)) : [], diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index af243792..4c71488e 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -345,7 +345,7 @@ export const Code = { fromJSON(object: any): Code { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, codeInfo: isSet(object.codeInfo) ? CodeInfo.fromJSON(object.codeInfo) : undefined, codeBytes: isSet(object.codeBytes) ? bytesFromBase64(object.codeBytes) : new Uint8Array(), pinned: isSet(object.pinned) ? Boolean(object.pinned) : false, @@ -520,7 +520,7 @@ export const Sequence = { fromJSON(object: any): Sequence { return { idKey: isSet(object.idKey) ? bytesFromBase64(object.idKey) : new Uint8Array(), - value: isSet(object.value) ? Long.fromString(object.value) : Long.UZERO, + value: isSet(object.value) ? Long.fromValue(object.value) : Long.UZERO, }; }, diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index 878c5cea..0e6424ac 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -99,10 +99,8 @@ export const MsgIBCSend = { fromJSON(object: any): MsgIBCSend { return { channel: isSet(object.channel) ? String(object.channel) : "", - timeoutHeight: isSet(object.timeoutHeight) ? Long.fromString(object.timeoutHeight) : Long.UZERO, - timeoutTimestamp: isSet(object.timeoutTimestamp) - ? Long.fromString(object.timeoutTimestamp) - : Long.UZERO, + timeoutHeight: isSet(object.timeoutHeight) ? Long.fromValue(object.timeoutHeight) : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), }; }, diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 49c00b94..eda8da35 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -391,7 +391,7 @@ export const InstantiateContractProposal = { description: isSet(object.description) ? String(object.description) : "", runAs: isSet(object.runAs) ? String(object.runAs) : "", admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, label: isSet(object.label) ? String(object.label) : "", msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [], @@ -513,7 +513,7 @@ export const MigrateContractProposal = { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; }, @@ -1000,7 +1000,7 @@ export const PinCodesProposal = { return { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], }; }, @@ -1098,7 +1098,7 @@ export const UnpinCodesProposal = { return { title: isSet(object.title) ? String(object.title) : "", description: isSet(object.description) ? String(object.description) : "", - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], }; }, diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 6fbac169..d19efcd3 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -524,7 +524,7 @@ export const QueryContractsByCodeRequest = { fromJSON(object: any): QueryContractsByCodeRequest { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -1088,7 +1088,7 @@ export const QueryCodeRequest = { fromJSON(object: any): QueryCodeRequest { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, }; }, @@ -1163,7 +1163,7 @@ export const CodeInfoResponse = { fromJSON(object: any): CodeInfoResponse { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, creator: isSet(object.creator) ? String(object.creator) : "", dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(), }; @@ -1522,7 +1522,7 @@ export const QueryPinnedCodesResponse = { fromJSON(object: any): QueryPinnedCodesResponse { return { - codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromString(e)) : [], + codeIds: Array.isArray(object?.codeIds) ? object.codeIds.map((e: any) => Long.fromValue(e)) : [], pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index 52447558..c95ab4ce 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -261,7 +261,7 @@ export const MsgStoreCodeResponse = { fromJSON(object: any): MsgStoreCodeResponse { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, }; }, @@ -365,7 +365,7 @@ export const MsgInstantiateContract = { return { sender: isSet(object.sender) ? String(object.sender) : "", admin: isSet(object.admin) ? String(object.admin) : "", - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, label: isSet(object.label) ? String(object.label) : "", msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), funds: Array.isArray(object?.funds) ? object.funds.map((e: any) => Coin.fromJSON(e)) : [], @@ -700,7 +700,7 @@ export const MsgMigrateContract = { return { sender: isSet(object.sender) ? String(object.sender) : "", contract: isSet(object.contract) ? String(object.contract) : "", - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; }, diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index cb90c400..21c14a65 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -402,7 +402,7 @@ export const Params = { instantiateDefaultPermission: isSet(object.instantiateDefaultPermission) ? accessTypeFromJSON(object.instantiateDefaultPermission) : 0, - maxWasmCodeSize: isSet(object.maxWasmCodeSize) ? Long.fromString(object.maxWasmCodeSize) : Long.UZERO, + maxWasmCodeSize: isSet(object.maxWasmCodeSize) ? Long.fromValue(object.maxWasmCodeSize) : Long.UZERO, }; }, @@ -616,7 +616,7 @@ export const ContractInfo = { fromJSON(object: any): ContractInfo { return { - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, creator: isSet(object.creator) ? String(object.creator) : "", admin: isSet(object.admin) ? String(object.admin) : "", label: isSet(object.label) ? String(object.label) : "", @@ -727,7 +727,7 @@ export const ContractCodeHistoryEntry = { fromJSON(object: any): ContractCodeHistoryEntry { return { operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : 0, - codeId: isSet(object.codeId) ? Long.fromString(object.codeId) : Long.UZERO, + codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO, updated: isSet(object.updated) ? AbsoluteTxPosition.fromJSON(object.updated) : undefined, msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(), }; @@ -809,8 +809,8 @@ export const AbsoluteTxPosition = { fromJSON(object: any): AbsoluteTxPosition { return { - blockHeight: isSet(object.blockHeight) ? Long.fromString(object.blockHeight) : Long.UZERO, - txIndex: isSet(object.txIndex) ? Long.fromString(object.txIndex) : Long.UZERO, + blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.UZERO, + txIndex: isSet(object.txIndex) ? Long.fromValue(object.txIndex) : Long.UZERO, }; }, diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 642b660b..9acdafc1 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -3800,10 +3800,8 @@ export const UninterpretedOption = { ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) - ? Long.fromString(object.positiveIntValue) - : Long.UZERO, - negativeIntValue: isSet(object.negativeIntValue) ? Long.fromString(object.negativeIntValue) : Long.ZERO, + positiveIntValue: isSet(object.positiveIntValue) ? Long.fromValue(object.positiveIntValue) : Long.UZERO, + negativeIntValue: isSet(object.negativeIntValue) ? Long.fromValue(object.negativeIntValue) : Long.ZERO, doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(), aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 71fba511..4d2e7dd6 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -130,7 +130,7 @@ export const Duration = { fromJSON(object: any): Duration { return { - seconds: isSet(object.seconds) ? Long.fromString(object.seconds) : Long.ZERO, + seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, nanos: isSet(object.nanos) ? Number(object.nanos) : 0, }; }, diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index 2d79b637..334db22b 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -152,7 +152,7 @@ export const Timestamp = { fromJSON(object: any): Timestamp { return { - seconds: isSet(object.seconds) ? Long.fromString(object.seconds) : Long.ZERO, + seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, nanos: isSet(object.nanos) ? Number(object.nanos) : 0, }; }, diff --git a/src/helpers.ts b/src/helpers.ts index 3c7a428f..98ad0327 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.39.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.40.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index f3bf96cb..42f77273 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -141,9 +141,7 @@ export const MsgTransfer = { sender: isSet(object.sender) ? String(object.sender) : "", receiver: isSet(object.receiver) ? String(object.receiver) : "", timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) - ? Long.fromString(object.timeoutTimestamp) - : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, }; }, diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index 9405b61a..8b7b3e14 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -687,16 +687,14 @@ export const Packet = { fromJSON(object: any): Packet { return { - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : "", sourceChannel: isSet(object.sourceChannel) ? String(object.sourceChannel) : "", destinationPort: isSet(object.destinationPort) ? String(object.destinationPort) : "", destinationChannel: isSet(object.destinationChannel) ? String(object.destinationChannel) : "", data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined, - timeoutTimestamp: isSet(object.timeoutTimestamp) - ? Long.fromString(object.timeoutTimestamp) - : Long.UZERO, + timeoutTimestamp: isSet(object.timeoutTimestamp) ? Long.fromValue(object.timeoutTimestamp) : Long.UZERO, }; }, @@ -807,7 +805,7 @@ export const PacketState = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), }; }, diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 4ea1b423..8d462562 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -152,7 +152,7 @@ export const GenesisState = { ? object.ackSequences.map((e: any) => PacketSequence.fromJSON(e)) : [], nextChannelSequence: isSet(object.nextChannelSequence) - ? Long.fromString(object.nextChannelSequence) + ? Long.fromValue(object.nextChannelSequence) : Long.UZERO, }; }, @@ -283,7 +283,7 @@ export const PacketSequence = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 0678c2f0..de20cc62 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1087,8 +1087,8 @@ export const QueryChannelConsensusStateRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, }; }, @@ -1283,7 +1283,7 @@ export const QueryPacketCommitmentRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, @@ -1639,7 +1639,7 @@ export const QueryPacketReceiptRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, @@ -1811,7 +1811,7 @@ export const QueryPacketAcknowledgementRequest = { return { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, }; }, @@ -2011,7 +2011,7 @@ export const QueryPacketAcknowledgementsRequest = { channelId: isSet(object.channelId) ? String(object.channelId) : "", pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) - ? object.packetCommitmentSequences.map((e: any) => Long.fromString(e)) + ? object.packetCommitmentSequences.map((e: any) => Long.fromValue(e)) : [], }; }, @@ -2216,7 +2216,7 @@ export const QueryUnreceivedPacketsRequest = { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", packetCommitmentSequences: Array.isArray(object?.packetCommitmentSequences) - ? object.packetCommitmentSequences.map((e: any) => Long.fromString(e)) + ? object.packetCommitmentSequences.map((e: any) => Long.fromValue(e)) : [], }; }, @@ -2309,7 +2309,7 @@ export const QueryUnreceivedPacketsResponse = { fromJSON(object: any): QueryUnreceivedPacketsResponse { return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromString(e)) : [], + sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromValue(e)) : [], height: isSet(object.height) ? Height.fromJSON(object.height) : undefined, }; }, @@ -2410,7 +2410,7 @@ export const QueryUnreceivedAcksRequest = { portId: isSet(object.portId) ? String(object.portId) : "", channelId: isSet(object.channelId) ? String(object.channelId) : "", packetAckSequences: Array.isArray(object?.packetAckSequences) - ? object.packetAckSequences.map((e: any) => Long.fromString(e)) + ? object.packetAckSequences.map((e: any) => Long.fromValue(e)) : [], }; }, @@ -2501,7 +2501,7 @@ export const QueryUnreceivedAcksResponse = { fromJSON(object: any): QueryUnreceivedAcksResponse { return { - sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromString(e)) : [], + sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Long.fromValue(e)) : [], height: isSet(object.height) ? Height.fromJSON(object.height) : undefined, }; }, @@ -2658,7 +2658,7 @@ export const QueryNextSequenceReceiveResponse = { fromJSON(object: any): QueryNextSequenceReceiveResponse { return { nextSequenceReceive: isSet(object.nextSequenceReceive) - ? Long.fromString(object.nextSequenceReceive) + ? Long.fromValue(object.nextSequenceReceive) : Long.UZERO, proof: isSet(object.proof) ? bytesFromBase64(object.proof) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index f593fa32..c3f83b55 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1293,9 +1293,7 @@ export const MsgTimeout = { ? bytesFromBase64(object.proofUnreceived) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) - ? Long.fromString(object.nextSequenceRecv) - : Long.UZERO, + nextSequenceRecv: isSet(object.nextSequenceRecv) ? Long.fromValue(object.nextSequenceRecv) : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, @@ -1465,9 +1463,7 @@ export const MsgTimeoutOnClose = { : new Uint8Array(), proofClose: isSet(object.proofClose) ? bytesFromBase64(object.proofClose) : new Uint8Array(), proofHeight: isSet(object.proofHeight) ? Height.fromJSON(object.proofHeight) : undefined, - nextSequenceRecv: isSet(object.nextSequenceRecv) - ? Long.fromString(object.nextSequenceRecv) - : Long.UZERO, + nextSequenceRecv: isSet(object.nextSequenceRecv) ? Long.fromValue(object.nextSequenceRecv) : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 2a17bd50..e629a294 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -577,8 +577,8 @@ export const Height = { fromJSON(object: any): Height { return { - revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, }; }, diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index 47fdd17b..ae6e9742 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -140,7 +140,7 @@ export const GenesisState = { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, createLocalhost: isSet(object.createLocalhost) ? Boolean(object.createLocalhost) : false, nextClientSequence: isSet(object.nextClientSequence) - ? Long.fromString(object.nextClientSequence) + ? Long.fromValue(object.nextClientSequence) : Long.UZERO, }; }, diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index 8e9de6ac..8b9cc8ec 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -533,8 +533,8 @@ export const QueryConsensusStateRequest = { fromJSON(object: any): QueryConsensusStateRequest { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, latestHeight: isSet(object.latestHeight) ? Boolean(object.latestHeight) : false, }; }, diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 36457e94..4fa9779f 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -259,7 +259,7 @@ export const ConnectionEnd = { versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], state: isSet(object.state) ? stateFromJSON(object.state) : 0, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, }; }, @@ -386,7 +386,7 @@ export const IdentifiedConnection = { versions: Array.isArray(object?.versions) ? object.versions.map((e: any) => Version.fromJSON(e)) : [], state: isSet(object.state) ? stateFromJSON(object.state) : 0, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, }; }, @@ -760,7 +760,7 @@ export const Params = { fromJSON(object: any): Params { return { maxExpectedTimePerBlock: isSet(object.maxExpectedTimePerBlock) - ? Long.fromString(object.maxExpectedTimePerBlock) + ? Long.fromValue(object.maxExpectedTimePerBlock) : Long.UZERO, }; }, diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 4974d171..7ea87895 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -87,7 +87,7 @@ export const GenesisState = { ? object.clientConnectionPaths.map((e: any) => ConnectionPaths.fromJSON(e)) : [], nextConnectionSequence: isSet(object.nextConnectionSequence) - ? Long.fromString(object.nextConnectionSequence) + ? Long.fromValue(object.nextConnectionSequence) : Long.UZERO, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, }; diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 7598ec86..5405f86c 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -799,8 +799,8 @@ export const QueryConnectionConsensusStateRequest = { fromJSON(object: any): QueryConnectionConsensusStateRequest { return { connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", - revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO, - revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO, + revisionNumber: isSet(object.revisionNumber) ? Long.fromValue(object.revisionNumber) : Long.UZERO, + revisionHeight: isSet(object.revisionHeight) ? Long.fromValue(object.revisionHeight) : Long.UZERO, }; }, diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 629454fa..ceef0b85 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -186,7 +186,7 @@ export const MsgConnectionOpenInit = { clientId: isSet(object.clientId) ? String(object.clientId) : "", counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, version: isSet(object.version) ? Version.fromJSON(object.version) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, signer: isSet(object.signer) ? String(object.signer) : "", }; }, @@ -409,7 +409,7 @@ export const MsgConnectionOpenTry = { previousConnectionId: isSet(object.previousConnectionId) ? String(object.previousConnectionId) : "", clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined, counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined, - delayPeriod: isSet(object.delayPeriod) ? Long.fromString(object.delayPeriod) : Long.UZERO, + delayPeriod: isSet(object.delayPeriod) ? Long.fromValue(object.delayPeriod) : Long.UZERO, counterpartyVersions: Array.isArray(object?.counterpartyVersions) ? object.counterpartyVersions.map((e: any) => Version.fromJSON(e)) : [], diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 84dca2f6..c11deb7b 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -361,8 +361,8 @@ export const ClientState = { fromJSON(object: any): ClientState { return { - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, - frozenSequence: isSet(object.frozenSequence) ? Long.fromString(object.frozenSequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + frozenSequence: isSet(object.frozenSequence) ? Long.fromValue(object.frozenSequence) : Long.UZERO, consensusState: isSet(object.consensusState) ? ConsensusState.fromJSON(object.consensusState) : undefined, @@ -464,7 +464,7 @@ export const ConsensusState = { return { publicKey: isSet(object.publicKey) ? Any.fromJSON(object.publicKey) : undefined, diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", - timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, }; }, @@ -567,8 +567,8 @@ export const Header = { fromJSON(object: any): Header { return { - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, - timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), newPublicKey: isSet(object.newPublicKey) ? Any.fromJSON(object.newPublicKey) : undefined, newDiversifier: isSet(object.newDiversifier) ? String(object.newDiversifier) : "", @@ -676,7 +676,7 @@ export const Misbehaviour = { fromJSON(object: any): Misbehaviour { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, signatureOne: isSet(object.signatureOne) ? SignatureAndData.fromJSON(object.signatureOne) : undefined, signatureTwo: isSet(object.signatureTwo) ? SignatureAndData.fromJSON(object.signatureTwo) : undefined, }; @@ -781,7 +781,7 @@ export const SignatureAndData = { signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(), dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : 0, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, }; }, @@ -860,7 +860,7 @@ export const TimestampedSignatureData = { fromJSON(object: any): TimestampedSignatureData { return { signatureData: isSet(object.signatureData) ? bytesFromBase64(object.signatureData) : new Uint8Array(), - timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, }; }, @@ -962,8 +962,8 @@ export const SignBytes = { fromJSON(object: any): SignBytes { return { - sequence: isSet(object.sequence) ? Long.fromString(object.sequence) : Long.UZERO, - timestamp: isSet(object.timestamp) ? Long.fromString(object.timestamp) : Long.UZERO, + sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO, + timestamp: isSet(object.timestamp) ? Long.fromValue(object.timestamp) : Long.UZERO, diversifier: isSet(object.diversifier) ? String(object.diversifier) : "", dataType: isSet(object.dataType) ? dataTypeFromJSON(object.dataType) : 0, data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), @@ -1618,7 +1618,7 @@ export const NextSequenceRecvData = { fromJSON(object: any): NextSequenceRecvData { return { path: isSet(object.path) ? bytesFromBase64(object.path) : new Uint8Array(), - nextSeqRecv: isSet(object.nextSeqRecv) ? Long.fromString(object.nextSeqRecv) : Long.UZERO, + nextSeqRecv: isSet(object.nextSeqRecv) ? Long.fromValue(object.nextSeqRecv) : Long.UZERO, }; }, diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index aa29646b..863d10dc 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -669,8 +669,8 @@ export const Fraction = { fromJSON(object: any): Fraction { return { - numerator: isSet(object.numerator) ? Long.fromString(object.numerator) : Long.UZERO, - denominator: isSet(object.denominator) ? Long.fromString(object.denominator) : Long.UZERO, + numerator: isSet(object.numerator) ? Long.fromValue(object.numerator) : Long.UZERO, + denominator: isSet(object.denominator) ? Long.fromValue(object.denominator) : Long.UZERO, }; }, diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index bd41515a..c35abac3 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1018,8 +1018,8 @@ export const RequestInfo = { fromJSON(object: any): RequestInfo { return { version: isSet(object.version) ? String(object.version) : "", - blockVersion: isSet(object.blockVersion) ? Long.fromString(object.blockVersion) : Long.UZERO, - p2pVersion: isSet(object.p2pVersion) ? Long.fromString(object.p2pVersion) : Long.UZERO, + blockVersion: isSet(object.blockVersion) ? Long.fromValue(object.blockVersion) : Long.UZERO, + p2pVersion: isSet(object.p2pVersion) ? Long.fromValue(object.p2pVersion) : Long.UZERO, }; }, @@ -1208,7 +1208,7 @@ export const RequestInitChain = { ? object.validators.map((e: any) => ValidatorUpdate.fromJSON(e)) : [], appStateBytes: isSet(object.appStateBytes) ? bytesFromBase64(object.appStateBytes) : new Uint8Array(), - initialHeight: isSet(object.initialHeight) ? Long.fromString(object.initialHeight) : Long.ZERO, + initialHeight: isSet(object.initialHeight) ? Long.fromValue(object.initialHeight) : Long.ZERO, }; }, @@ -1323,7 +1323,7 @@ export const RequestQuery = { return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), path: isSet(object.path) ? String(object.path) : "", - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, prove: isSet(object.prove) ? Boolean(object.prove) : false, }; }, @@ -1624,7 +1624,7 @@ export const RequestEndBlock = { fromJSON(object: any): RequestEndBlock { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, }; }, @@ -1856,7 +1856,7 @@ export const RequestLoadSnapshotChunk = { fromJSON(object: any): RequestLoadSnapshotChunk { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunk: isSet(object.chunk) ? Number(object.chunk) : 0, }; @@ -2506,8 +2506,8 @@ export const ResponseInfo = { return { data: isSet(object.data) ? String(object.data) : "", version: isSet(object.version) ? String(object.version) : "", - appVersion: isSet(object.appVersion) ? Long.fromString(object.appVersion) : Long.UZERO, - lastBlockHeight: isSet(object.lastBlockHeight) ? Long.fromString(object.lastBlockHeight) : Long.ZERO, + appVersion: isSet(object.appVersion) ? Long.fromValue(object.appVersion) : Long.UZERO, + lastBlockHeight: isSet(object.lastBlockHeight) ? Long.fromValue(object.lastBlockHeight) : Long.ZERO, lastBlockAppHash: isSet(object.lastBlockAppHash) ? bytesFromBase64(object.lastBlockAppHash) : new Uint8Array(), @@ -2836,11 +2836,11 @@ export const ResponseQuery = { code: isSet(object.code) ? Number(object.code) : 0, log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), proofOps: isSet(object.proofOps) ? ProofOps.fromJSON(object.proofOps) : undefined, - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, codespace: isSet(object.codespace) ? String(object.codespace) : "", }; }, @@ -3050,8 +3050,8 @@ export const ResponseCheckTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -3201,8 +3201,8 @@ export const ResponseDeliverTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromString(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromString(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, + gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -3397,7 +3397,7 @@ export const ResponseCommit = { fromJSON(object: any): ResponseCommit { return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), - retainHeight: isSet(object.retainHeight) ? Long.fromString(object.retainHeight) : Long.ZERO, + retainHeight: isSet(object.retainHeight) ? Long.fromValue(object.retainHeight) : Long.ZERO, }; }, @@ -3863,8 +3863,8 @@ export const BlockParams = { fromJSON(object: any): BlockParams { return { - maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, - maxGas: isSet(object.maxGas) ? Long.fromString(object.maxGas) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, + maxGas: isSet(object.maxGas) ? Long.fromValue(object.maxGas) : Long.ZERO, }; }, @@ -4183,7 +4183,7 @@ export const TxResult = { fromJSON(object: any): TxResult { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, index: isSet(object.index) ? Number(object.index) : 0, tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(), result: isSet(object.result) ? ResponseDeliverTx.fromJSON(object.result) : undefined, @@ -4264,7 +4264,7 @@ export const Validator = { fromJSON(object: any): Validator { return { address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), - power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, }; }, @@ -4334,7 +4334,7 @@ export const ValidatorUpdate = { fromJSON(object: any): ValidatorUpdate { return { pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - power: isSet(object.power) ? Long.fromString(object.power) : Long.ZERO, + power: isSet(object.power) ? Long.fromValue(object.power) : Long.ZERO, }; }, @@ -4507,9 +4507,9 @@ export const Evidence = { return { type: isSet(object.type) ? evidenceTypeFromJSON(object.type) : 0, validator: isSet(object.validator) ? Validator.fromJSON(object.validator) : undefined, - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, }; }, @@ -4619,7 +4619,7 @@ export const Snapshot = { fromJSON(object: any): Snapshot { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.UZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO, format: isSet(object.format) ? Number(object.format) : 0, chunks: isSet(object.chunks) ? Number(object.chunks) : 0, hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(), diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 813c10da..0e0cb420 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -103,8 +103,8 @@ export const Proof = { fromJSON(object: any): Proof { return { - total: isSet(object.total) ? Long.fromString(object.total) : Long.ZERO, - index: isSet(object.index) ? Long.fromString(object.index) : Long.ZERO, + total: isSet(object.total) ? Long.fromValue(object.total) : Long.ZERO, + index: isSet(object.index) ? Long.fromValue(object.index) : Long.ZERO, leafHash: isSet(object.leafHash) ? bytesFromBase64(object.leafHash) : new Uint8Array(), aunts: Array.isArray(object?.aunts) ? object.aunts.map((e: any) => bytesFromBase64(e)) : [], }; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index c9ac3a59..17719df3 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -164,9 +164,9 @@ export const ProtocolVersion = { fromJSON(object: any): ProtocolVersion { return { - p2p: isSet(object.p2p) ? Long.fromString(object.p2p) : Long.UZERO, - block: isSet(object.block) ? Long.fromString(object.block) : Long.UZERO, - app: isSet(object.app) ? Long.fromString(object.app) : Long.UZERO, + p2p: isSet(object.p2p) ? Long.fromValue(object.p2p) : Long.UZERO, + block: isSet(object.block) ? Long.fromValue(object.block) : Long.UZERO, + app: isSet(object.app) ? Long.fromValue(object.app) : Long.UZERO, }; }, diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 16f32abd..296ca6d5 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -192,8 +192,8 @@ export const DuplicateVoteEvidence = { return { voteA: isSet(object.voteA) ? Vote.fromJSON(object.voteA) : undefined, voteB: isSet(object.voteB) ? Vote.fromJSON(object.voteB) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, - validatorPower: isSet(object.validatorPower) ? Long.fromString(object.validatorPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, + validatorPower: isSet(object.validatorPower) ? Long.fromValue(object.validatorPower) : Long.ZERO, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, }; }, @@ -310,11 +310,11 @@ export const LightClientAttackEvidence = { conflictingBlock: isSet(object.conflictingBlock) ? LightBlock.fromJSON(object.conflictingBlock) : undefined, - commonHeight: isSet(object.commonHeight) ? Long.fromString(object.commonHeight) : Long.ZERO, + commonHeight: isSet(object.commonHeight) ? Long.fromValue(object.commonHeight) : Long.ZERO, byzantineValidators: Array.isArray(object?.byzantineValidators) ? object.byzantineValidators.map((e: any) => Validator.fromJSON(e)) : [], - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, }; }, diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index e014d0e8..8aa87fe4 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -251,9 +251,9 @@ export const BlockParams = { fromJSON(object: any): BlockParams { return { - maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, - maxGas: isSet(object.maxGas) ? Long.fromString(object.maxGas) : Long.ZERO, - timeIotaMs: isSet(object.timeIotaMs) ? Long.fromString(object.timeIotaMs) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, + maxGas: isSet(object.maxGas) ? Long.fromValue(object.maxGas) : Long.ZERO, + timeIotaMs: isSet(object.timeIotaMs) ? Long.fromValue(object.timeIotaMs) : Long.ZERO, }; }, @@ -336,9 +336,9 @@ export const EvidenceParams = { fromJSON(object: any): EvidenceParams { return { - maxAgeNumBlocks: isSet(object.maxAgeNumBlocks) ? Long.fromString(object.maxAgeNumBlocks) : Long.ZERO, + maxAgeNumBlocks: isSet(object.maxAgeNumBlocks) ? Long.fromValue(object.maxAgeNumBlocks) : Long.ZERO, maxAgeDuration: isSet(object.maxAgeDuration) ? Duration.fromJSON(object.maxAgeDuration) : undefined, - maxBytes: isSet(object.maxBytes) ? Long.fromString(object.maxBytes) : Long.ZERO, + maxBytes: isSet(object.maxBytes) ? Long.fromValue(object.maxBytes) : Long.ZERO, }; }, @@ -465,7 +465,7 @@ export const VersionParams = { fromJSON(object: any): VersionParams { return { - appVersion: isSet(object.appVersion) ? Long.fromString(object.appVersion) : Long.UZERO, + appVersion: isSet(object.appVersion) ? Long.fromValue(object.appVersion) : Long.UZERO, }; }, @@ -533,8 +533,8 @@ export const HashedParams = { fromJSON(object: any): HashedParams { return { - blockMaxBytes: isSet(object.blockMaxBytes) ? Long.fromString(object.blockMaxBytes) : Long.ZERO, - blockMaxGas: isSet(object.blockMaxGas) ? Long.fromString(object.blockMaxGas) : Long.ZERO, + blockMaxBytes: isSet(object.blockMaxBytes) ? Long.fromValue(object.blockMaxBytes) : Long.ZERO, + blockMaxGas: isSet(object.blockMaxGas) ? Long.fromValue(object.blockMaxGas) : Long.ZERO, }; }, diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index e22cc286..b07f6af4 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -627,7 +627,7 @@ export const Header = { return { version: isSet(object.version) ? Consensus.fromJSON(object.version) : undefined, chainId: isSet(object.chainId) ? String(object.chainId) : "", - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined, lastBlockId: isSet(object.lastBlockId) ? BlockID.fromJSON(object.lastBlockId) : undefined, lastCommitHash: isSet(object.lastCommitHash) @@ -889,7 +889,7 @@ export const Vote = { fromJSON(object: any): Vote { return { type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0, - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, @@ -1008,7 +1008,7 @@ export const Commit = { fromJSON(object: any): Commit { return { - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, signatures: Array.isArray(object?.signatures) @@ -1244,7 +1244,7 @@ export const Proposal = { fromJSON(object: any): Proposal { return { type: isSet(object.type) ? signedMsgTypeFromJSON(object.type) : 0, - height: isSet(object.height) ? Long.fromString(object.height) : Long.ZERO, + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, round: isSet(object.round) ? Number(object.round) : 0, polRound: isSet(object.polRound) ? Number(object.polRound) : 0, blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, @@ -1502,9 +1502,9 @@ export const BlockMeta = { fromJSON(object: any): BlockMeta { return { blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - blockSize: isSet(object.blockSize) ? Long.fromString(object.blockSize) : Long.ZERO, + blockSize: isSet(object.blockSize) ? Long.fromValue(object.blockSize) : Long.ZERO, header: isSet(object.header) ? Header.fromJSON(object.header) : undefined, - numTxs: isSet(object.numTxs) ? Long.fromString(object.numTxs) : Long.ZERO, + numTxs: isSet(object.numTxs) ? Long.fromValue(object.numTxs) : Long.ZERO, }; }, diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 2cf81a9c..46a8b81c 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -80,7 +80,7 @@ export const ValidatorSet = { ? object.validators.map((e: any) => Validator.fromJSON(e)) : [], proposer: isSet(object.proposer) ? Validator.fromJSON(object.proposer) : undefined, - totalVotingPower: isSet(object.totalVotingPower) ? Long.fromString(object.totalVotingPower) : Long.ZERO, + totalVotingPower: isSet(object.totalVotingPower) ? Long.fromValue(object.totalVotingPower) : Long.ZERO, }; }, @@ -183,8 +183,8 @@ export const Validator = { return { address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(), pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, - proposerPriority: isSet(object.proposerPriority) ? Long.fromString(object.proposerPriority) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, + proposerPriority: isSet(object.proposerPriority) ? Long.fromValue(object.proposerPriority) : Long.ZERO, }; }, @@ -268,7 +268,7 @@ export const SimpleValidator = { fromJSON(object: any): SimpleValidator { return { pubKey: isSet(object.pubKey) ? PublicKey.fromJSON(object.pubKey) : undefined, - votingPower: isSet(object.votingPower) ? Long.fromString(object.votingPower) : Long.ZERO, + votingPower: isSet(object.votingPower) ? Long.fromValue(object.votingPower) : Long.ZERO, }; }, diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index 885bcfd4..d72ca96a 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -71,7 +71,7 @@ export const App = { fromJSON(object: any): App { return { - protocol: isSet(object.protocol) ? Long.fromString(object.protocol) : Long.UZERO, + protocol: isSet(object.protocol) ? Long.fromValue(object.protocol) : Long.UZERO, software: isSet(object.software) ? String(object.software) : "", }; }, @@ -142,8 +142,8 @@ export const Consensus = { fromJSON(object: any): Consensus { return { - block: isSet(object.block) ? Long.fromString(object.block) : Long.UZERO, - app: isSet(object.app) ? Long.fromString(object.app) : Long.UZERO, + block: isSet(object.block) ? Long.fromValue(object.block) : Long.UZERO, + app: isSet(object.app) ? Long.fromValue(object.app) : Long.UZERO, }; }, From 0ab79fc9a6641a0d67aa04cada020bdb988e5d45 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 18:49:18 -0500 Subject: [PATCH 12/38] upgrade --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- src/helpers.ts | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e089cdd..3f172d0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.40.0", + "@osmonauts/telescope": "^0.41.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.35.0.tgz", - "integrity": "sha512-nSWiaTBj9CfSVUem9gP/h3u2Wjot+VVapJm23V45guHgDmbgYbHxV+hwE9z2GBHejgprbg71TiM2Qjw58CyhFw==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.36.0.tgz", + "integrity": "sha512-k8slHGRxWj7PGJESh55MAraUXa4Wp41l9ZwbT+8pDfl3eZfvQgBlf8FWhOVJl96+xqcpJUAXcTHGN6Lh7Q9AVA==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.40.0.tgz", - "integrity": "sha512-Czi02GE2/bh2ZDJYaeMSXNwFWrTBXdPBHm3wy8xCfSW5/fz/qMFRJ6orF3XVvgHz78C1yRWpjqIdH6g/UuwEww==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.41.0.tgz", + "integrity": "sha512-b8rUfjZ4owVZEND1aWS1asE7CRWWgHD6guftssosPfY5yL5v3mrdBMTTXuhUCHfhCWFha6AcV6nW96U8f8/VPA==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.35.0", + "@osmonauts/ast": "^0.36.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.35.0.tgz", - "integrity": "sha512-nSWiaTBj9CfSVUem9gP/h3u2Wjot+VVapJm23V45guHgDmbgYbHxV+hwE9z2GBHejgprbg71TiM2Qjw58CyhFw==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.36.0.tgz", + "integrity": "sha512-k8slHGRxWj7PGJESh55MAraUXa4Wp41l9ZwbT+8pDfl3eZfvQgBlf8FWhOVJl96+xqcpJUAXcTHGN6Lh7Q9AVA==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.40.0.tgz", - "integrity": "sha512-Czi02GE2/bh2ZDJYaeMSXNwFWrTBXdPBHm3wy8xCfSW5/fz/qMFRJ6orF3XVvgHz78C1yRWpjqIdH6g/UuwEww==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.41.0.tgz", + "integrity": "sha512-b8rUfjZ4owVZEND1aWS1asE7CRWWgHD6guftssosPfY5yL5v3mrdBMTTXuhUCHfhCWFha6AcV6nW96U8f8/VPA==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.35.0", + "@osmonauts/ast": "^0.36.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index 5c3b8dee..b96be1cc 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.40.0", + "@osmonauts/telescope": "^0.41.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/helpers.ts b/src/helpers.ts index 98ad0327..5d8615b8 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.40.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.41.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From 490438c7e35f28280d6d99619bc3f61c00c29900 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 3 Oct 2022 18:49:39 -0500 Subject: [PATCH 13/38] upgrade Duration types --- src/cosmos/feegrant/v1beta1/feegrant.ts | 3 ++- src/cosmos/gov/v1beta1/gov.ts | 10 ++++++++-- src/cosmos/slashing/v1beta1/slashing.ts | 5 ++++- src/cosmos/staking/v1beta1/staking.ts | 5 ++++- src/ibc/lightclients/tendermint/v1/tendermint.ts | 15 ++++++++++++--- src/tendermint/types/params.ts | 5 ++++- 6 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index 4ffad3a3..ca63df4b 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -269,7 +269,8 @@ export const PeriodicAllowance = { object.basic !== undefined && object.basic !== null ? BasicAllowance.fromPartial(object.basic) : undefined; - message.period = object.period ?? undefined; + message.period = + object.period !== undefined && object.period !== null ? Duration.fromPartial(object.period) : undefined; message.periodSpendLimit = object.periodSpendLimit?.map((e) => Coin.fromPartial(e)) || []; message.periodCanSpend = object.periodCanSpend?.map((e) => Coin.fromPartial(e)) || []; message.periodReset = diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index b464d741..50263a51 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -965,7 +965,10 @@ export const DepositParams = { fromPartial, I>>(object: I): DepositParams { const message = createBaseDepositParams(); message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || []; - message.maxDepositPeriod = object.maxDepositPeriod ?? undefined; + message.maxDepositPeriod = + object.maxDepositPeriod !== undefined && object.maxDepositPeriod !== null + ? Duration.fromPartial(object.maxDepositPeriod) + : undefined; return message; }, }; @@ -1021,7 +1024,10 @@ export const VotingParams = { fromPartial, I>>(object: I): VotingParams { const message = createBaseVotingParams(); - message.votingPeriod = object.votingPeriod ?? undefined; + message.votingPeriod = + object.votingPeriod !== undefined && object.votingPeriod !== null + ? Duration.fromPartial(object.votingPeriod) + : undefined; return message; }, }; diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 309ea686..2b59fb12 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -307,7 +307,10 @@ export const Params = { ? Long.fromValue(object.signedBlocksWindow) : Long.ZERO; message.minSignedPerWindow = object.minSignedPerWindow ?? new Uint8Array(); - message.downtimeJailDuration = object.downtimeJailDuration ?? undefined; + message.downtimeJailDuration = + object.downtimeJailDuration !== undefined && object.downtimeJailDuration !== null + ? Duration.fromPartial(object.downtimeJailDuration) + : undefined; message.slashFractionDoubleSign = object.slashFractionDoubleSign ?? new Uint8Array(); message.slashFractionDowntime = object.slashFractionDowntime ?? new Uint8Array(); return message; diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index 720470b3..f9eca33b 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1772,7 +1772,10 @@ export const Params = { fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.unbondingTime = object.unbondingTime ?? undefined; + message.unbondingTime = + object.unbondingTime !== undefined && object.unbondingTime !== null + ? Duration.fromPartial(object.unbondingTime) + : undefined; message.maxValidators = object.maxValidators ?? 0; message.maxEntries = object.maxEntries ?? 0; message.historicalEntries = object.historicalEntries ?? 0; diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 863d10dc..8ff13bb5 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -313,9 +313,18 @@ export const ClientState = { object.trustLevel !== undefined && object.trustLevel !== null ? Fraction.fromPartial(object.trustLevel) : undefined; - message.trustingPeriod = object.trustingPeriod ?? undefined; - message.unbondingPeriod = object.unbondingPeriod ?? undefined; - message.maxClockDrift = object.maxClockDrift ?? undefined; + message.trustingPeriod = + object.trustingPeriod !== undefined && object.trustingPeriod !== null + ? Duration.fromPartial(object.trustingPeriod) + : undefined; + message.unbondingPeriod = + object.unbondingPeriod !== undefined && object.unbondingPeriod !== null + ? Duration.fromPartial(object.unbondingPeriod) + : undefined; + message.maxClockDrift = + object.maxClockDrift !== undefined && object.maxClockDrift !== null + ? Duration.fromPartial(object.maxClockDrift) + : undefined; message.frozenHeight = object.frozenHeight !== undefined && object.frozenHeight !== null ? Height.fromPartial(object.frozenHeight) diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 8aa87fe4..f9a53dee 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -357,7 +357,10 @@ export const EvidenceParams = { object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null ? Long.fromValue(object.maxAgeNumBlocks) : Long.ZERO; - message.maxAgeDuration = object.maxAgeDuration ?? undefined; + message.maxAgeDuration = + object.maxAgeDuration !== undefined && object.maxAgeDuration !== null + ? Duration.fromPartial(object.maxAgeDuration) + : undefined; message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; return message; From bf952dc285ae9d79d55a1159cfd92e0db532d9f8 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 4 Oct 2022 23:09:53 -0500 Subject: [PATCH 14/38] enums --- package-lock.json | 30 ++++++++--------- package.json | 2 +- src/confio/proofs.ts | 6 ++-- src/cosmos/gov/v1beta1/gov.ts | 16 ++++++---- src/cosmos/staking/v1beta1/authz.ts | 3 +- src/cosmos/staking/v1beta1/staking.ts | 3 +- src/cosmos/tx/signing/v1beta1/signing.ts | 27 ++++++++-------- src/cosmos/tx/v1beta1/service.ts | 12 ++++--- src/cosmwasm/wasm/v1/types.ts | 6 ++-- src/google/protobuf/descriptor.ts | 32 +++++++++++-------- src/helpers.ts | 2 +- src/ibc/core/channel/v1/channel.ts | 12 ++++--- src/ibc/core/connection/v1/connection.ts | 5 +-- .../solomachine/v1/solomachine.ts | 3 +- src/tendermint/abci/types.ts | 12 ++++--- src/tendermint/types/types.ts | 6 ++-- 16 files changed, 102 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f172d0b..c35c2add 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.41.0", + "@osmonauts/telescope": "^0.43.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.36.0.tgz", - "integrity": "sha512-k8slHGRxWj7PGJESh55MAraUXa4Wp41l9ZwbT+8pDfl3eZfvQgBlf8FWhOVJl96+xqcpJUAXcTHGN6Lh7Q9AVA==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.0.tgz", + "integrity": "sha512-Wr0mDIth/rGuvvXwTrnD9zgGkLkDz18dFPZ4bS+zqnxMUE1JFNyTcE5JAsM2bTZl45Yn7YGSK0wKd7CraWtNcQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.41.0.tgz", - "integrity": "sha512-b8rUfjZ4owVZEND1aWS1asE7CRWWgHD6guftssosPfY5yL5v3mrdBMTTXuhUCHfhCWFha6AcV6nW96U8f8/VPA==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.0.tgz", + "integrity": "sha512-wezP8p32Lwu5Mk1WpLl68fCvPkldbfysPtvMTf0zMHQiFhmMlIwYGIAXJf85qj3iy+u0EuFLmvnyDf7ke4UYGQ==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.36.0", + "@osmonauts/ast": "^0.38.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.36.0.tgz", - "integrity": "sha512-k8slHGRxWj7PGJESh55MAraUXa4Wp41l9ZwbT+8pDfl3eZfvQgBlf8FWhOVJl96+xqcpJUAXcTHGN6Lh7Q9AVA==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.0.tgz", + "integrity": "sha512-Wr0mDIth/rGuvvXwTrnD9zgGkLkDz18dFPZ4bS+zqnxMUE1JFNyTcE5JAsM2bTZl45Yn7YGSK0wKd7CraWtNcQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.41.0.tgz", - "integrity": "sha512-b8rUfjZ4owVZEND1aWS1asE7CRWWgHD6guftssosPfY5yL5v3mrdBMTTXuhUCHfhCWFha6AcV6nW96U8f8/VPA==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.0.tgz", + "integrity": "sha512-wezP8p32Lwu5Mk1WpLl68fCvPkldbfysPtvMTf0zMHQiFhmMlIwYGIAXJf85qj3iy+u0EuFLmvnyDf7ke4UYGQ==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.36.0", + "@osmonauts/ast": "^0.38.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index b96be1cc..b4209e7e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.41.0", + "@osmonauts/telescope": "^0.43.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 3ef74f6c..94e94f55 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -66,8 +66,9 @@ export function hashOpToJSON(object: HashOp): string { case HashOp.BITCOIN: return "BITCOIN"; + case HashOp.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** @@ -179,8 +180,9 @@ export function lengthOpToJSON(object: LengthOp): string { case LengthOp.REQUIRE_64_BYTES: return "REQUIRE_64_BYTES"; + case LengthOp.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 50263a51..29a43c9c 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -79,8 +79,9 @@ export function voteOptionToJSON(object: VoteOption): string { case VoteOption.VOTE_OPTION_NO_WITH_VETO: return "VOTE_OPTION_NO_WITH_VETO"; + case VoteOption.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** ProposalStatus enumerates the valid statuses of a proposal. */ @@ -91,31 +92,31 @@ export enum ProposalStatus { /** * PROPOSAL_STATUS_DEPOSIT_PERIOD - PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - * period. + * period. */ PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, /** * PROPOSAL_STATUS_VOTING_PERIOD - PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - * period. + * period. */ PROPOSAL_STATUS_VOTING_PERIOD = 2, /** * PROPOSAL_STATUS_PASSED - PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - * passed. + * passed. */ PROPOSAL_STATUS_PASSED = 3, /** * PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - * been rejected. + * been rejected. */ PROPOSAL_STATUS_REJECTED = 4, /** * PROPOSAL_STATUS_FAILED - PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - * failed. + * failed. */ PROPOSAL_STATUS_FAILED = 5, UNRECOGNIZED = -1, @@ -172,8 +173,9 @@ export function proposalStatusToJSON(object: ProposalStatus): string { case ProposalStatus.PROPOSAL_STATUS_FAILED: return "PROPOSAL_STATUS_FAILED"; + case ProposalStatus.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 11e8a2c7..728949e6 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -61,8 +61,9 @@ export function authorizationTypeToJSON(object: AuthorizationType): string { case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE: return "AUTHORIZATION_TYPE_REDELEGATE"; + case AuthorizationType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index f9eca33b..f18d7ffe 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -61,8 +61,9 @@ export function bondStatusToJSON(object: BondStatus): string { case BondStatus.BOND_STATUS_BONDED: return "BOND_STATUS_BONDED"; + case BondStatus.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 34eccf89..7dada4c7 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -9,40 +9,40 @@ export const protobufPackage = "cosmos.tx.signing.v1beta1"; export enum SignMode { /** * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - * rejected + * rejected */ SIGN_MODE_UNSPECIFIED = 0, /** * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - * verified with raw bytes from Tx + * verified with raw bytes from Tx */ SIGN_MODE_DIRECT = 1, /** * SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some - * human-readable textual representation on top of the binary representation - * from SIGN_MODE_DIRECT + * human-readable textual representation on top of the binary representation + * from SIGN_MODE_DIRECT */ SIGN_MODE_TEXTUAL = 2, /** * SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - * Amino JSON and will be removed in the future + * Amino JSON and will be removed in the future */ SIGN_MODE_LEGACY_AMINO_JSON = 127, /** * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 * - * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - * but is not implemented on the SDK by default. To enable EIP-191, you need - * to pass a custom `TxConfig` that has an implementation of - * `SignModeHandler` for EIP-191. The SDK may decide to fully support - * EIP-191 in the future. + * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + * but is not implemented on the SDK by default. To enable EIP-191, you need + * to pass a custom `TxConfig` that has an implementation of + * `SignModeHandler` for EIP-191. The SDK may decide to fully support + * EIP-191 in the future. * - * Since: cosmos-sdk 0.45.2 + * Since: cosmos-sdk 0.45.2 */ SIGN_MODE_EIP_191 = 191, UNRECOGNIZED = -1, @@ -92,8 +92,9 @@ export function signModeToJSON(object: SignMode): string { case SignMode.SIGN_MODE_EIP_191: return "SIGN_MODE_EIP_191"; + case SignMode.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** SignatureDescriptors wraps multiple SignatureDescriptor's. */ diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index fc22df46..86ece859 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -51,8 +51,9 @@ export function orderByToJSON(object: OrderBy): string { case OrderBy.ORDER_BY_DESC: return "ORDER_BY_DESC"; + case OrderBy.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. */ @@ -63,19 +64,19 @@ export enum BroadcastMode { /** * BROADCAST_MODE_BLOCK - BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - * the tx to be committed in a block. + * the tx to be committed in a block. */ BROADCAST_MODE_BLOCK = 1, /** * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - * a CheckTx execution response only. + * a CheckTx execution response only. */ BROADCAST_MODE_SYNC = 2, /** * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - * immediately. + * immediately. */ BROADCAST_MODE_ASYNC = 3, UNRECOGNIZED = -1, @@ -118,8 +119,9 @@ export function broadcastModeToJSON(object: BroadcastMode): string { case BroadcastMode.BROADCAST_MODE_ASYNC: return "BROADCAST_MODE_ASYNC"; + case BroadcastMode.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 21c14a65..90ff6340 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -57,8 +57,9 @@ export function accessTypeToJSON(object: AccessType): string { case AccessType.ACCESS_TYPE_EVERYBODY: return "ACCESS_TYPE_EVERYBODY"; + case AccessType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** ContractCodeHistoryOperationType actions that caused a code change */ @@ -115,8 +116,9 @@ export function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHisto case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"; + case ContractCodeHistoryOperationType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** AccessTypeParam */ diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 9acdafc1..abc22575 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -5,21 +5,21 @@ export const protobufPackage = "google.protobuf"; export enum FieldDescriptorProto_Type { /** * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. + * 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. + * 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. + * negative values are likely. */ TYPE_INT32 = 5, TYPE_FIXED64 = 6, @@ -29,9 +29,9 @@ export enum FieldDescriptorProto_Type { /** * 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. + * 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 = 11, @@ -186,8 +186,9 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typ case FieldDescriptorProto_Type.TYPE_SINT64: return "TYPE_SINT64"; + case FieldDescriptorProto_Type.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum FieldDescriptorProto_Label { @@ -228,8 +229,9 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La case FieldDescriptorProto_Label.LABEL_REPEATED: return "LABEL_REPEATED"; + case FieldDescriptorProto_Label.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** Generated classes can be optimized for speed or code size. */ @@ -237,7 +239,7 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La export enum FileOptions_OptimizeMode { /** * SPEED - Generate complete code for parsing, serialization, - * etc. + * etc. */ SPEED = 1, @@ -279,8 +281,9 @@ export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode) case FileOptions_OptimizeMode.LITE_RUNTIME: return "LITE_RUNTIME"; + case FileOptions_OptimizeMode.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum FieldOptions_CType { @@ -321,8 +324,9 @@ export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { case FieldOptions_CType.STRING_PIECE: return "STRING_PIECE"; + case FieldOptions_CType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum FieldOptions_JSType { @@ -367,8 +371,9 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { case FieldOptions_JSType.JS_NUMBER: return "JS_NUMBER"; + case FieldOptions_JSType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** @@ -418,8 +423,9 @@ export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_Idemp case MethodOptions_IdempotencyLevel.IDEMPOTENT: return "IDEMPOTENT"; + case MethodOptions_IdempotencyLevel.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/helpers.ts b/src/helpers.ts index 5d8615b8..3aa7c83d 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.41.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.43.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index 8b7b3e14..b639fc05 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -20,13 +20,13 @@ export enum State { /** * STATE_OPEN - A channel has completed the handshake. Open channels are - * ready to send and receive packets. + * 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. + * packets. */ STATE_CLOSED = 4, UNRECOGNIZED = -1, @@ -76,8 +76,9 @@ export function stateToJSON(object: State): string { case State.STATE_CLOSED: return "STATE_CLOSED"; + case State.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** Order defines if a channel is ORDERED or UNORDERED */ @@ -88,7 +89,7 @@ export enum Order { /** * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in - * which they were sent. + * which they were sent. */ ORDER_UNORDERED = 1, @@ -127,8 +128,9 @@ export function orderToJSON(object: Order): string { case Order.ORDER_ORDERED: return "ORDER_ORDERED"; + case Order.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 4fa9779f..6fd81990 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -17,7 +17,7 @@ export enum State { /** * STATE_TRYOPEN - A connection end has acknowledged the handshake step on the counterparty - * chain. + * chain. */ STATE_TRYOPEN = 2, @@ -63,8 +63,9 @@ export function stateToJSON(object: State): string { case State.STATE_OPEN: return "STATE_OPEN"; + case State.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index c11deb7b..0ca878d7 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -122,8 +122,9 @@ export function dataTypeToJSON(object: DataType): string { case DataType.DATA_TYPE_HEADER: return "DATA_TYPE_HEADER"; + case DataType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index c35abac3..2a1fb212 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -45,8 +45,9 @@ export function checkTxTypeToJSON(object: CheckTxType): string { case CheckTxType.RECHECK: return "RECHECK"; + case CheckTxType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum ResponseOfferSnapshot_Result { @@ -121,8 +122,9 @@ export function responseOfferSnapshot_ResultToJSON(object: ResponseOfferSnapshot case ResponseOfferSnapshot_Result.REJECT_SENDER: return "REJECT_SENDER"; + case ResponseOfferSnapshot_Result.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum ResponseApplySnapshotChunk_Result { @@ -197,8 +199,9 @@ export function responseApplySnapshotChunk_ResultToJSON(object: ResponseApplySna case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT: return "REJECT_SNAPSHOT"; + case ResponseApplySnapshotChunk_Result.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export enum EvidenceType { @@ -238,8 +241,9 @@ export function evidenceTypeToJSON(object: EvidenceType): string { case EvidenceType.LIGHT_CLIENT_ATTACK: return "LIGHT_CLIENT_ATTACK"; + case EvidenceType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } export interface Request { diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index b07f6af4..6e71250d 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -62,8 +62,9 @@ export function blockIDFlagToJSON(object: BlockIDFlag): string { case BlockIDFlag.BLOCK_ID_FLAG_NIL: return "BLOCK_ID_FLAG_NIL"; + case BlockIDFlag.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** SignedMsgType is a type of signed message in the consensus. */ @@ -117,8 +118,9 @@ export function signedMsgTypeToJSON(object: SignedMsgType): string { case SignedMsgType.SIGNED_MSG_TYPE_PROPOSAL: return "SIGNED_MSG_TYPE_PROPOSAL"; + case SignedMsgType.UNRECOGNIZED: default: - return "UNKNOWN"; + return "UNRECOGNIZED"; } } /** PartsetHeader */ From 4ad117f46da33d23e8573964b41819a0bf29f16b Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 4 Oct 2022 23:18:23 -0500 Subject: [PATCH 15/38] enum spacing --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- src/helpers.ts | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index c35c2add..7eb23aa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.43.0", + "@osmonauts/telescope": "^0.43.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.0.tgz", - "integrity": "sha512-Wr0mDIth/rGuvvXwTrnD9zgGkLkDz18dFPZ4bS+zqnxMUE1JFNyTcE5JAsM2bTZl45Yn7YGSK0wKd7CraWtNcQ==", + "version": "0.38.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.1.tgz", + "integrity": "sha512-jjaZamHTnRuXEcyr+IYZzjnb6Ws6ffOP19w37Qfen8Rckaw6QRA+kWXmcuyBif2vulxa5ETALmWh0ugInUiSfQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.0.tgz", - "integrity": "sha512-wezP8p32Lwu5Mk1WpLl68fCvPkldbfysPtvMTf0zMHQiFhmMlIwYGIAXJf85qj3iy+u0EuFLmvnyDf7ke4UYGQ==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.1.tgz", + "integrity": "sha512-BBduWqtkAtWH+rwBNiAfjxWFu90w16ayVgCorZctopDDP2+/q++i6i9DImuSE8hCp4K6Nxv9rLCsVPw34Du9Tw==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.38.0", + "@osmonauts/ast": "^0.38.1", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.0.tgz", - "integrity": "sha512-Wr0mDIth/rGuvvXwTrnD9zgGkLkDz18dFPZ4bS+zqnxMUE1JFNyTcE5JAsM2bTZl45Yn7YGSK0wKd7CraWtNcQ==", + "version": "0.38.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.1.tgz", + "integrity": "sha512-jjaZamHTnRuXEcyr+IYZzjnb6Ws6ffOP19w37Qfen8Rckaw6QRA+kWXmcuyBif2vulxa5ETALmWh0ugInUiSfQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.0.tgz", - "integrity": "sha512-wezP8p32Lwu5Mk1WpLl68fCvPkldbfysPtvMTf0zMHQiFhmMlIwYGIAXJf85qj3iy+u0EuFLmvnyDf7ke4UYGQ==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.1.tgz", + "integrity": "sha512-BBduWqtkAtWH+rwBNiAfjxWFu90w16ayVgCorZctopDDP2+/q++i6i9DImuSE8hCp4K6Nxv9rLCsVPw34Du9Tw==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.38.0", + "@osmonauts/ast": "^0.38.1", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index b4209e7e..b778da56 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.43.0", + "@osmonauts/telescope": "^0.43.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/helpers.ts b/src/helpers.ts index 3aa7c83d..3017668b 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.43.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.43.1 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From 62cae4c9edf323a5ab03cf02edabdac74fff006e Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 4 Oct 2022 23:33:48 -0500 Subject: [PATCH 16/38] enum spacing --- package-lock.json | 30 ++++++------- package.json | 2 +- src/confio/proofs.ts | 104 +++++++++++++++++++++---------------------- src/helpers.ts | 2 +- 4 files changed, 69 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7eb23aa4..95a45ef6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.43.1", + "@osmonauts/telescope": "^0.45.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.38.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.1.tgz", - "integrity": "sha512-jjaZamHTnRuXEcyr+IYZzjnb6Ws6ffOP19w37Qfen8Rckaw6QRA+kWXmcuyBif2vulxa5ETALmWh0ugInUiSfQ==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.40.0.tgz", + "integrity": "sha512-0kFqdVUr+m5le0wVsKivbkusYHBzOtJDotAFpuQ8EE/hAHlr6DnfQhmJ3qvnzAFuUVTGxC6vwGMnDiHQjoeKcg==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.1.tgz", - "integrity": "sha512-BBduWqtkAtWH+rwBNiAfjxWFu90w16ayVgCorZctopDDP2+/q++i6i9DImuSE8hCp4K6Nxv9rLCsVPw34Du9Tw==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.45.0.tgz", + "integrity": "sha512-y0qdR9acVf7oMo4AT9oQOk3d/Oz3auKMpE2d/3/vbFCe504tfrpowPl2pid5VRrgYcJ1aNcdgpEGI8yYDYGryg==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.38.1", + "@osmonauts/ast": "^0.40.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.38.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.38.1.tgz", - "integrity": "sha512-jjaZamHTnRuXEcyr+IYZzjnb6Ws6ffOP19w37Qfen8Rckaw6QRA+kWXmcuyBif2vulxa5ETALmWh0ugInUiSfQ==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.40.0.tgz", + "integrity": "sha512-0kFqdVUr+m5le0wVsKivbkusYHBzOtJDotAFpuQ8EE/hAHlr6DnfQhmJ3qvnzAFuUVTGxC6vwGMnDiHQjoeKcg==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.43.1.tgz", - "integrity": "sha512-BBduWqtkAtWH+rwBNiAfjxWFu90w16ayVgCorZctopDDP2+/q++i6i9DImuSE8hCp4K6Nxv9rLCsVPw34Du9Tw==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.45.0.tgz", + "integrity": "sha512-y0qdR9acVf7oMo4AT9oQOk3d/Oz3auKMpE2d/3/vbFCe504tfrpowPl2pid5VRrgYcJ1aNcdgpEGI8yYDYGryg==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.38.1", + "@osmonauts/ast": "^0.40.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index b778da56..5e36f0ff 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.43.1", + "@osmonauts/telescope": "^0.45.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 94e94f55..146fdc0a 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -73,9 +73,9 @@ export 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) + * 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 { @@ -187,24 +187,24 @@ export 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. + * 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. + * 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. + * 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. + * 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 { @@ -215,8 +215,8 @@ export interface ExistenceProof { } /** * 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. + * 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 { @@ -235,19 +235,19 @@ export interface CommitmentProof { } /** * 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. + * 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 + * 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) + * 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) + * Then combine the bytes, and hash it + * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) */ export interface LeafOp { @@ -264,20 +264,20 @@ export interface LeafOp { } /** * InnerOp represents a merkle-proof step that is not a leaf. - *It represents concatenating two children and hashing them to provide the next result. + * 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 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) + * 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. + * 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 + * 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 { @@ -287,15 +287,15 @@ export interface InnerOp { } /** * 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. + * This can be stored in the client and used to validate any incoming proofs. * - *verify(ProofSpec, Proof) -> Proof | Error + * 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. + * 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 { @@ -314,13 +314,13 @@ export interface ProofSpec { } /** * InnerSpec contains all store-specific structure info to determine if two proofs from a - *given store are neighbors. + * given store are neighbors. * - *This enables: + * This enables: * - *isLeftMost(spec: InnerSpec, op: InnerOp) - *isRightMost(spec: InnerSpec, op: InnerOp) - *isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) + * isLeftMost(spec: InnerSpec, op: InnerOp) + * isRightMost(spec: InnerSpec, op: InnerOp) + * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) */ export interface InnerSpec { diff --git a/src/helpers.ts b/src/helpers.ts index 3017668b..b0d62d6f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.43.1 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.45.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From 3e0a94d1e344b2f26aec62b989b53a399eba521a Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 4 Oct 2022 23:48:30 -0500 Subject: [PATCH 17/38] toJSON Duration --- package-lock.json | 30 +++++++++---------- package.json | 2 +- scripts/codegen.js | 4 +-- src/cosmos/feegrant/v1beta1/feegrant.ts | 3 +- src/cosmos/gov/v1beta1/gov.ts | 8 +++-- src/cosmos/slashing/v1beta1/slashing.ts | 5 +++- src/cosmos/staking/v1beta1/staking.ts | 3 +- src/helpers.ts | 2 +- .../lightclients/tendermint/v1/tendermint.ts | 9 ++++-- src/tendermint/types/params.ts | 3 +- 10 files changed, 41 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95a45ef6..d7ec2760 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.45.0", + "@osmonauts/telescope": "^0.47.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2408,9 +2408,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.40.0.tgz", - "integrity": "sha512-0kFqdVUr+m5le0wVsKivbkusYHBzOtJDotAFpuQ8EE/hAHlr6DnfQhmJ3qvnzAFuUVTGxC6vwGMnDiHQjoeKcg==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.42.0.tgz", + "integrity": "sha512-BIQp4LMV0zRf1RSIIu+Aywws468kEqIo3vcl8zqCc2M7t9dwhzMbBRgLazxIsvCfm62TgpIu2LWRYklEUObVaQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.9", @@ -2437,9 +2437,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.45.0.tgz", - "integrity": "sha512-y0qdR9acVf7oMo4AT9oQOk3d/Oz3auKMpE2d/3/vbFCe504tfrpowPl2pid5VRrgYcJ1aNcdgpEGI8yYDYGryg==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.47.0.tgz", + "integrity": "sha512-6NXt46NH2izZRAUICTR0aSBXpmVCNmrX4h6z9IlLxS8ve24iCzRws502hao8ydzX+fSnISql3PZ23Fz203HR4Q==", "dev": true, "dependencies": { "@babel/core": "7.18.13", @@ -2455,7 +2455,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.40.0", + "@osmonauts/ast": "^0.42.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", @@ -6859,9 +6859,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.40.0.tgz", - "integrity": "sha512-0kFqdVUr+m5le0wVsKivbkusYHBzOtJDotAFpuQ8EE/hAHlr6DnfQhmJ3qvnzAFuUVTGxC6vwGMnDiHQjoeKcg==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.42.0.tgz", + "integrity": "sha512-BIQp4LMV0zRf1RSIIu+Aywws468kEqIo3vcl8zqCc2M7t9dwhzMbBRgLazxIsvCfm62TgpIu2LWRYklEUObVaQ==", "dev": true, "requires": { "@babel/runtime": "^7.18.9", @@ -6888,9 +6888,9 @@ } }, "@osmonauts/telescope": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.45.0.tgz", - "integrity": "sha512-y0qdR9acVf7oMo4AT9oQOk3d/Oz3auKMpE2d/3/vbFCe504tfrpowPl2pid5VRrgYcJ1aNcdgpEGI8yYDYGryg==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.47.0.tgz", + "integrity": "sha512-6NXt46NH2izZRAUICTR0aSBXpmVCNmrX4h6z9IlLxS8ve24iCzRws502hao8ydzX+fSnISql3PZ23Fz203HR4Q==", "dev": true, "requires": { "@babel/core": "7.18.13", @@ -6906,7 +6906,7 @@ "@babel/traverse": "7.18.13", "@babel/types": "7.18.13", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.40.0", + "@osmonauts/ast": "^0.42.0", "@osmonauts/proto-parser": "^0.22.0", "@osmonauts/types": "^0.17.0", "@osmonauts/utils": "^0.5.0", diff --git a/package.json b/package.json index 5e36f0ff..141883ee 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.45.0", + "@osmonauts/telescope": "^0.47.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 5b572d7f..17f2eb7e 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -36,12 +36,12 @@ telescope({ fromJSON: true, toJSON: true }, - typingsFormat: { + typingsFormat: { useExact: true, useDeepPartial: true, timestamp: 'timestamp', duration: 'duration' - } + } }, lcdClients: { enabled: false diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index ca63df4b..e6246bcc 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -245,7 +245,8 @@ export const PeriodicAllowance = { const obj: any = {}; message.basic !== undefined && (obj.basic = message.basic ? BasicAllowance.toJSON(message.basic) : undefined); - message.period !== undefined && (obj.period = message.period); + message.period !== undefined && + (obj.period = message.period ? Duration.toJSON(message.period) : undefined); if (message.periodSpendLimit) { obj.periodSpendLimit = message.periodSpendLimit.map((e) => (e ? Coin.toJSON(e) : undefined)); diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 29a43c9c..6fcd2294 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -960,7 +960,10 @@ export const DepositParams = { obj.minDeposit = []; } - message.maxDepositPeriod !== undefined && (obj.maxDepositPeriod = message.maxDepositPeriod); + message.maxDepositPeriod !== undefined && + (obj.maxDepositPeriod = message.maxDepositPeriod + ? Duration.toJSON(message.maxDepositPeriod) + : undefined); return obj; }, @@ -1020,7 +1023,8 @@ export const VotingParams = { toJSON(message: VotingParams): unknown { const obj: any = {}; - message.votingPeriod !== undefined && (obj.votingPeriod = message.votingPeriod); + message.votingPeriod !== undefined && + (obj.votingPeriod = message.votingPeriod ? Duration.toJSON(message.votingPeriod) : undefined); return obj; }, diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 2b59fb12..c6245e6b 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -288,7 +288,10 @@ export const Params = { (obj.minSignedPerWindow = base64FromBytes( message.minSignedPerWindow !== undefined ? message.minSignedPerWindow : new Uint8Array(), )); - message.downtimeJailDuration !== undefined && (obj.downtimeJailDuration = message.downtimeJailDuration); + 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(), diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index f18d7ffe..d7b8a647 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1762,7 +1762,8 @@ export const Params = { toJSON(message: Params): unknown { const obj: any = {}; - message.unbondingTime !== undefined && (obj.unbondingTime = message.unbondingTime); + message.unbondingTime !== undefined && + (obj.unbondingTime = message.unbondingTime ? Duration.toJSON(message.unbondingTime) : undefined); message.maxValidators !== undefined && (obj.maxValidators = Math.round(message.maxValidators)); message.maxEntries !== undefined && (obj.maxEntries = Math.round(message.maxEntries)); message.historicalEntries !== undefined && diff --git a/src/helpers.ts b/src/helpers.ts index b0d62d6f..6a46225e 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.45.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.47.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 8ff13bb5..dbd1e7ee 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -279,9 +279,12 @@ export const ClientState = { message.chainId !== undefined && (obj.chainId = message.chainId); message.trustLevel !== undefined && (obj.trustLevel = message.trustLevel ? Fraction.toJSON(message.trustLevel) : undefined); - message.trustingPeriod !== undefined && (obj.trustingPeriod = message.trustingPeriod); - message.unbondingPeriod !== undefined && (obj.unbondingPeriod = message.unbondingPeriod); - message.maxClockDrift !== undefined && (obj.maxClockDrift = message.maxClockDrift); + message.trustingPeriod !== undefined && + (obj.trustingPeriod = message.trustingPeriod ? Duration.toJSON(message.trustingPeriod) : undefined); + message.unbondingPeriod !== undefined && + (obj.unbondingPeriod = message.unbondingPeriod ? Duration.toJSON(message.unbondingPeriod) : undefined); + message.maxClockDrift !== undefined && + (obj.maxClockDrift = message.maxClockDrift ? Duration.toJSON(message.maxClockDrift) : undefined); message.frozenHeight !== undefined && (obj.frozenHeight = message.frozenHeight ? Height.toJSON(message.frozenHeight) : undefined); message.latestHeight !== undefined && diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index f9a53dee..1fa1a1f2 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -346,7 +346,8 @@ export const EvidenceParams = { const obj: any = {}; message.maxAgeNumBlocks !== undefined && (obj.maxAgeNumBlocks = (message.maxAgeNumBlocks || Long.ZERO).toString()); - message.maxAgeDuration !== undefined && (obj.maxAgeDuration = message.maxAgeDuration); + message.maxAgeDuration !== undefined && + (obj.maxAgeDuration = message.maxAgeDuration ? Duration.toJSON(message.maxAgeDuration) : undefined); message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString()); return obj; }, From 03010b4a3052db774da5e3e5476b2179d73bc03f Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 5 Oct 2022 00:42:14 -0500 Subject: [PATCH 18/38] RPC interface comments --- package-lock.json | 974 +++++++------------- package.json | 2 +- src/cosmos/auth/v1beta1/query.ts | 8 +- src/cosmos/authz/v1beta1/query.ts | 10 +- src/cosmos/authz/v1beta1/tx.ts | 10 +- src/cosmos/bank/v1beta1/query.ts | 20 +- src/cosmos/bank/v1beta1/tx.ts | 6 +- src/cosmos/base/tendermint/v1beta1/query.ts | 14 +- src/cosmos/crisis/v1beta1/tx.ts | 4 +- src/cosmos/distribution/v1beta1/query.ts | 22 +- src/cosmos/distribution/v1beta1/tx.ts | 16 +- src/cosmos/evidence/v1beta1/query.ts | 6 +- src/cosmos/evidence/v1beta1/tx.ts | 4 +- src/cosmos/feegrant/v1beta1/query.ts | 6 +- src/cosmos/feegrant/v1beta1/tx.ts | 8 +- src/cosmos/gov/v1beta1/query.ts | 18 +- src/cosmos/gov/v1beta1/tx.ts | 12 +- src/cosmos/mint/v1beta1/query.ts | 8 +- src/cosmos/params/v1beta1/query.ts | 4 +- src/cosmos/slashing/v1beta1/query.ts | 8 +- src/cosmos/slashing/v1beta1/tx.ts | 4 +- src/cosmos/staking/v1beta1/query.ts | 36 +- src/cosmos/staking/v1beta1/tx.ts | 14 +- src/cosmos/tx/v1beta1/service.ts | 14 +- src/cosmos/upgrade/v1beta1/query.ts | 16 +- src/cosmos/vesting/v1beta1/tx.ts | 4 +- src/cosmwasm/wasm/v1/query.ts | 20 +- src/cosmwasm/wasm/v1/tx.ts | 14 +- src/helpers.ts | 2 +- src/ibc/applications/transfer/v1/query.ts | 8 +- src/ibc/applications/transfer/v1/tx.ts | 4 +- src/ibc/core/channel/v1/query.ts | 38 +- src/ibc/core/channel/v1/tx.ts | 24 +- src/ibc/core/client/v1/query.ts | 20 +- src/ibc/core/client/v1/tx.ts | 10 +- src/ibc/core/connection/v1/query.ts | 16 +- src/ibc/core/connection/v1/tx.ts | 12 +- 37 files changed, 577 insertions(+), 839 deletions(-) diff --git a/package-lock.json b/package-lock.json index d7ec2760..da419982 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.47.0", + "@osmonauts/telescope": "^0.50.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -55,21 +55,21 @@ } }, "node_modules/@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -85,12 +85,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", "dev": true, "dependencies": { - "@babel/types": "^7.18.13", + "@babel/types": "^7.19.3", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -243,20 +243,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-hoist-variables": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", @@ -312,69 +298,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", @@ -430,69 +353,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-simple-access": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", @@ -571,69 +431,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-wrap-function/node_modules/@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function/node_modules/@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function/node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helpers": { "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", @@ -648,69 +445,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helpers/node_modules/@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers/node_modules/@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/highlight": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", @@ -1951,19 +1685,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", + "@babel/generator": "^7.19.3", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1972,13 +1706,13 @@ } }, "node_modules/@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2408,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.42.0.tgz", - "integrity": "sha512-BIQp4LMV0zRf1RSIIu+Aywws468kEqIo3vcl8zqCc2M7t9dwhzMbBRgLazxIsvCfm62TgpIu2LWRYklEUObVaQ==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.45.0.tgz", + "integrity": "sha512-zJQhVJGHIfQEzd2oVcBU/rhjUjpqDH4bXxopsQKkrbCOtiEQ7T7dL2Pli+Gr3r+keZ6nzC4XLkPPamg4Hdg8sA==", "dev": true, "dependencies": { - "@babel/runtime": "^7.18.9", - "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.22.0", - "@osmonauts/types": "^0.17.0", - "@osmonauts/utils": "^0.5.0", + "@babel/runtime": "^7.19.0", + "@babel/types": "7.19.3", + "@osmonauts/proto-parser": "^0.24.0", + "@osmonauts/types": "^0.19.0", + "@osmonauts/utils": "^0.6.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.22.0.tgz", - "integrity": "sha512-yXACe8sq6JRoz57KnoTMPHXZdAtu8pec1YiiDI3m7fZ8+YWoGa3kCnDn4E1CkJhe8e411M+gDbux3vK8yD66RQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.24.0.tgz", + "integrity": "sha512-pOywSBzv5pRlAbgISoybyq5SFiL05/ab2lThS2zSIs14QLv9g3tCtRqeGaxTO061hSuxuaI6Du2xKBzxahb05w==", "dev": true, "dependencies": { - "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.17.0", + "@babel/runtime": "^7.19.0", + "@osmonauts/types": "^0.19.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2437,28 +2171,28 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.47.0.tgz", - "integrity": "sha512-6NXt46NH2izZRAUICTR0aSBXpmVCNmrX4h6z9IlLxS8ve24iCzRws502hao8ydzX+fSnISql3PZ23Fz203HR4Q==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.50.0.tgz", + "integrity": "sha512-3tkci0Te6omyaAUIS2wTgHbK/bL11MXHWvbgXh0cpJr9OudhIrXeHio4Y0XmqacSdePhUpc4iHTcrvoT5/xTHw==", "dev": true, "dependencies": { - "@babel/core": "7.18.13", - "@babel/generator": "7.18.13", - "@babel/parser": "^7.18.13", + "@babel/core": "7.19.3", + "@babel/generator": "7.19.3", + "@babel/parser": "^7.19.3", "@babel/plugin-proposal-class-properties": "7.18.6", "@babel/plugin-proposal-export-default-from": "7.18.10", "@babel/plugin-proposal-object-rest-spread": "7.18.9", - "@babel/plugin-transform-runtime": "7.18.10", - "@babel/preset-env": "7.18.10", + "@babel/plugin-transform-runtime": "7.19.1", + "@babel/preset-env": "7.19.3", "@babel/preset-typescript": "^7.17.12", - "@babel/runtime": "^7.18.9", - "@babel/traverse": "7.18.13", - "@babel/types": "7.18.13", + "@babel/runtime": "^7.19.0", + "@babel/traverse": "7.19.3", + "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.42.0", - "@osmonauts/proto-parser": "^0.22.0", - "@osmonauts/types": "^0.17.0", - "@osmonauts/utils": "^0.5.0", + "@osmonauts/ast": "^0.45.0", + "@osmonauts/proto-parser": "^0.24.0", + "@osmonauts/types": "^0.19.0", + "@osmonauts/utils": "^0.6.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -2475,8 +2209,130 @@ "rimraf": "3.0.2", "shelljs": "0.8.5" }, - "bin": { - "telescope": "main/telescope.js" + "bin": { + "telescope": "main/telescope.js" + } + }, + "node_modules/@osmonauts/telescope/node_modules/@babel/plugin-transform-runtime": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.1.tgz", + "integrity": "sha512-2nJjTUFIzBMP/f/miLxEK9vxwW/KUXsdvN4sR//TmuDhe6yU2h57WmIOE12Gng3MDP/xpjUV/ToZRdcf8Yj4fA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@osmonauts/telescope/node_modules/@babel/preset-env": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.3.tgz", + "integrity": "sha512-ziye1OTc9dGFOAXSWKUqQblYHNlBOaDl8wzqf2iKXJAltYiR3hKHUKmkt+S9PppW7RQpq4fFCrwwpIDj/f5P4w==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@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-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.19.3", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@osmonauts/telescope/node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, "node_modules/@osmonauts/telescope/node_modules/long": { @@ -2486,23 +2342,23 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.17.0.tgz", - "integrity": "sha512-e1J4t/qEfGzfWTCmnhCh12DGJj7O5q4nxCJsqXNOvU/VJA14M48S8mT9UCWlouemht3rEN9CYfVMCKKw8VaPNg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.19.0.tgz", + "integrity": "sha512-2iSpTR8swnYefG5AavzbkwMw0256wygj2RwmM+NSvxpt9zLmdXvYrF5OJoizYTNqEX+p7XxBPV5BEN7SPsW6kg==", "dev": true, "dependencies": { - "@babel/runtime": "^7.18.9", - "@osmonauts/utils": "^0.5.0", + "@babel/runtime": "^7.19.0", + "@osmonauts/utils": "^0.6.0", "case": "1.6.3" } }, "node_modules/@osmonauts/utils": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.5.0.tgz", - "integrity": "sha512-opK+xpeEdNdxRm3Wh1FwBwhPt654YPorSDfX8ZVfF6TIl0c3igf5bMjow2Acq4y0D4J+pauzJRrtEy9IHaZtjw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.6.0.tgz", + "integrity": "sha512-Os+2YlPi/Y7Rp/z9WimDOH8PcwYKJLyoQvauMs0Dyir+RioKKFUzQ3S3Bptc3pUIb/4+/OEYAChKAHgiWpS3hw==", "dev": true, "dependencies": { - "@babel/runtime": "^7.18.9" + "@babel/runtime": "^7.19.0" } }, "node_modules/@protobufjs/aspromise": { @@ -5150,21 +5006,21 @@ "dev": true }, "@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -5173,12 +5029,12 @@ } }, "@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", "dev": true, "requires": { - "@babel/types": "^7.18.13", + "@babel/types": "^7.19.3", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -5289,19 +5145,6 @@ "requires": { "@babel/template": "^7.18.10", "@babel/types": "^7.19.0" - }, - "dependencies": { - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-hoist-variables": { @@ -5345,59 +5188,6 @@ "@babel/template": "^7.18.10", "@babel/traverse": "^7.19.0", "@babel/types": "^7.19.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "requires": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - } - }, - "@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/helper-optimise-call-expression": { @@ -5438,59 +5228,6 @@ "@babel/helper-optimise-call-expression": "^7.18.6", "@babel/traverse": "^7.19.1", "@babel/types": "^7.19.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "requires": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - } - }, - "@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/helper-simple-access": { @@ -5548,59 +5285,6 @@ "@babel/template": "^7.18.10", "@babel/traverse": "^7.19.0", "@babel/types": "^7.19.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "requires": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - } - }, - "@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/helpers": { @@ -5612,59 +5296,6 @@ "@babel/template": "^7.18.10", "@babel/traverse": "^7.19.0", "@babel/types": "^7.19.0" - }, - "dependencies": { - "@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "requires": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - } - }, - "@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/highlight": { @@ -6496,31 +6127,31 @@ } }, "@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", + "@babel/generator": "^7.19.3", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" } }, @@ -6859,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.42.0.tgz", - "integrity": "sha512-BIQp4LMV0zRf1RSIIu+Aywws468kEqIo3vcl8zqCc2M7t9dwhzMbBRgLazxIsvCfm62TgpIu2LWRYklEUObVaQ==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.45.0.tgz", + "integrity": "sha512-zJQhVJGHIfQEzd2oVcBU/rhjUjpqDH4bXxopsQKkrbCOtiEQ7T7dL2Pli+Gr3r+keZ6nzC4XLkPPamg4Hdg8sA==", "dev": true, "requires": { - "@babel/runtime": "^7.18.9", - "@babel/types": "7.18.13", - "@osmonauts/proto-parser": "^0.22.0", - "@osmonauts/types": "^0.17.0", - "@osmonauts/utils": "^0.5.0", + "@babel/runtime": "^7.19.0", + "@babel/types": "7.19.3", + "@osmonauts/proto-parser": "^0.24.0", + "@osmonauts/types": "^0.19.0", + "@osmonauts/utils": "^0.6.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.22.0.tgz", - "integrity": "sha512-yXACe8sq6JRoz57KnoTMPHXZdAtu8pec1YiiDI3m7fZ8+YWoGa3kCnDn4E1CkJhe8e411M+gDbux3vK8yD66RQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.24.0.tgz", + "integrity": "sha512-pOywSBzv5pRlAbgISoybyq5SFiL05/ab2lThS2zSIs14QLv9g3tCtRqeGaxTO061hSuxuaI6Du2xKBzxahb05w==", "dev": true, "requires": { - "@babel/runtime": "^7.18.9", - "@osmonauts/types": "^0.17.0", + "@babel/runtime": "^7.19.0", + "@osmonauts/types": "^0.19.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6888,28 +6519,28 @@ } }, "@osmonauts/telescope": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.47.0.tgz", - "integrity": "sha512-6NXt46NH2izZRAUICTR0aSBXpmVCNmrX4h6z9IlLxS8ve24iCzRws502hao8ydzX+fSnISql3PZ23Fz203HR4Q==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.50.0.tgz", + "integrity": "sha512-3tkci0Te6omyaAUIS2wTgHbK/bL11MXHWvbgXh0cpJr9OudhIrXeHio4Y0XmqacSdePhUpc4iHTcrvoT5/xTHw==", "dev": true, "requires": { - "@babel/core": "7.18.13", - "@babel/generator": "7.18.13", - "@babel/parser": "^7.18.13", + "@babel/core": "7.19.3", + "@babel/generator": "7.19.3", + "@babel/parser": "^7.19.3", "@babel/plugin-proposal-class-properties": "7.18.6", "@babel/plugin-proposal-export-default-from": "7.18.10", "@babel/plugin-proposal-object-rest-spread": "7.18.9", - "@babel/plugin-transform-runtime": "7.18.10", - "@babel/preset-env": "7.18.10", + "@babel/plugin-transform-runtime": "7.19.1", + "@babel/preset-env": "7.19.3", "@babel/preset-typescript": "^7.17.12", - "@babel/runtime": "^7.18.9", - "@babel/traverse": "7.18.13", - "@babel/types": "7.18.13", + "@babel/runtime": "^7.19.0", + "@babel/traverse": "7.19.3", + "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.42.0", - "@osmonauts/proto-parser": "^0.22.0", - "@osmonauts/types": "^0.17.0", - "@osmonauts/utils": "^0.5.0", + "@osmonauts/ast": "^0.45.0", + "@osmonauts/proto-parser": "^0.24.0", + "@osmonauts/types": "^0.19.0", + "@osmonauts/utils": "^0.6.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -6927,6 +6558,113 @@ "shelljs": "0.8.5" }, "dependencies": { + "@babel/plugin-transform-runtime": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.1.tgz", + "integrity": "sha512-2nJjTUFIzBMP/f/miLxEK9vxwW/KUXsdvN4sR//TmuDhe6yU2h57WmIOE12Gng3MDP/xpjUV/ToZRdcf8Yj4fA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + } + }, + "@babel/preset-env": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.3.tgz", + "integrity": "sha512-ziye1OTc9dGFOAXSWKUqQblYHNlBOaDl8wzqf2iKXJAltYiR3hKHUKmkt+S9PppW7RQpq4fFCrwwpIDj/f5P4w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.19.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.18.9", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.18.6", + "@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-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.18.6", + "@babel/plugin-transform-modules-commonjs": "^7.18.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.18.8", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.19.3", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + } + }, "long": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", @@ -6936,23 +6674,23 @@ } }, "@osmonauts/types": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.17.0.tgz", - "integrity": "sha512-e1J4t/qEfGzfWTCmnhCh12DGJj7O5q4nxCJsqXNOvU/VJA14M48S8mT9UCWlouemht3rEN9CYfVMCKKw8VaPNg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.19.0.tgz", + "integrity": "sha512-2iSpTR8swnYefG5AavzbkwMw0256wygj2RwmM+NSvxpt9zLmdXvYrF5OJoizYTNqEX+p7XxBPV5BEN7SPsW6kg==", "dev": true, "requires": { - "@babel/runtime": "^7.18.9", - "@osmonauts/utils": "^0.5.0", + "@babel/runtime": "^7.19.0", + "@osmonauts/utils": "^0.6.0", "case": "1.6.3" } }, "@osmonauts/utils": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.5.0.tgz", - "integrity": "sha512-opK+xpeEdNdxRm3Wh1FwBwhPt654YPorSDfX8ZVfF6TIl0c3igf5bMjow2Acq4y0D4J+pauzJRrtEy9IHaZtjw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.6.0.tgz", + "integrity": "sha512-Os+2YlPi/Y7Rp/z9WimDOH8PcwYKJLyoQvauMs0Dyir+RioKKFUzQ3S3Bptc3pUIb/4+/OEYAChKAHgiWpS3hw==", "dev": true, "requires": { - "@babel/runtime": "^7.18.9" + "@babel/runtime": "^7.19.0" } }, "@protobufjs/aspromise": { diff --git a/package.json b/package.json index 141883ee..11ae3bd4 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.47.0", + "@osmonauts/telescope": "^0.50.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 0bd41291..5c29d5e9 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -400,19 +400,19 @@ export const QueryParamsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Accounts(request?: QueryAccountsRequest): Promise; /*Accounts returns all the existing accounts Since: cosmos-sdk 0.43*/ + Accounts(request?: QueryAccountsRequest): Promise; + /*Account returns account details based on address.*/ Account(request: QueryAccountRequest): Promise; - /*Account returns account details based on address.*/ + /*Params queries all parameters.*/ Params(request?: QueryParamsRequest): Promise; - /*Params queries all parameters.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index db3da3c9..4ae40673 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -545,21 +545,21 @@ export const QueryGranteeGrantsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Grants(request: QueryGrantsRequest): Promise; /*Returns list of `Authorization`, granted to the grantee by the granter.*/ - - GranterGrants(request: QueryGranterGrantsRequest): Promise; + Grants(request: QueryGrantsRequest): Promise; /*GranterGrants returns list of `GrantAuthorization`, granted by granter. Since: cosmos-sdk 0.45.2*/ - GranteeGrants(request: QueryGranteeGrantsRequest): Promise; + GranterGrants(request: QueryGranterGrantsRequest): Promise; /*GranteeGrants returns a list of `GrantAuthorization` by grantee. Since: cosmos-sdk 0.45.2*/ + + GranteeGrants(request: QueryGranteeGrantsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 33b34a0e..ed624217 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -432,23 +432,23 @@ export const MsgRevokeResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the authz Msg service. */ export interface Msg { - Grant(request: MsgGrant): Promise; /*Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten.*/ - - Exec(request: MsgExec): Promise; + Grant(request: MsgGrant): Promise; /*Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization.*/ - Revoke(request: MsgRevoke): Promise; + Exec(request: MsgExec): Promise; /*Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee.*/ + + Revoke(request: MsgRevoke): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 67a4797c..e66e371f 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1195,33 +1195,33 @@ export const QueryDenomMetadataResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Balance(request: QueryBalanceRequest): Promise; /*Balance queries the balance of a single coin for a single account.*/ - - AllBalances(request: QueryAllBalancesRequest): Promise; + Balance(request: QueryBalanceRequest): Promise; /*AllBalances queries the balance of all coins for a single account.*/ - SpendableBalances(request: QuerySpendableBalancesRequest): Promise; + AllBalances(request: QueryAllBalancesRequest): Promise; /*SpendableBalances queries the spenable balance of all coins for a single account.*/ - TotalSupply(request?: QueryTotalSupplyRequest): Promise; + SpendableBalances(request: QuerySpendableBalancesRequest): Promise; /*TotalSupply queries the total supply of all coins.*/ - SupplyOf(request: QuerySupplyOfRequest): Promise; + TotalSupply(request?: QueryTotalSupplyRequest): Promise; /*SupplyOf queries the supply of a single coin.*/ - Params(request?: QueryParamsRequest): Promise; + SupplyOf(request: QuerySupplyOfRequest): Promise; /*Params queries the parameters of x/bank module.*/ - DenomMetadata(request: QueryDenomMetadataRequest): Promise; + Params(request?: QueryParamsRequest): Promise; /*DenomsMetadata queries the client metadata of a given coin denomination.*/ - DenomsMetadata(request?: QueryDenomsMetadataRequest): Promise; + 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; diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 04789ea3..395fb032 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -272,14 +272,14 @@ export const MsgMultiSendResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the bank Msg service. */ export interface Msg { - Send(request: MsgSend): Promise; /*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; - /*MultiSend defines a method for sending coins from some accounts to other accounts.*/ } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index c9086468..d221a1f7 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1238,26 +1238,26 @@ export const Module = { return message; }, }; -/** Service defines the RPC service */ +/** Service defines the gRPC querier service for tendermint queries. */ export interface Service { - GetNodeInfo(request?: GetNodeInfoRequest): Promise; /*GetNodeInfo queries the current node info.*/ + GetNodeInfo(request?: GetNodeInfoRequest): Promise; + /*GetSyncing queries node syncing.*/ GetSyncing(request?: GetSyncingRequest): Promise; - /*GetSyncing queries node syncing.*/ + /*GetLatestBlock returns the latest block.*/ GetLatestBlock(request?: GetLatestBlockRequest): Promise; - /*GetLatestBlock returns the latest block.*/ + /*GetBlockByHeight queries block for given height.*/ GetBlockByHeight(request: GetBlockByHeightRequest): Promise; - /*GetBlockByHeight queries block for given height.*/ + /*GetLatestValidatorSet queries latest validator-set.*/ GetLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise; - /*GetLatestValidatorSet queries latest validator-set.*/ + /*GetValidatorSetByHeight queries validator-set at a given height.*/ GetValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise; - /*GetValidatorSetByHeight queries validator-set at a given height.*/ } export class QueryClientImpl implements Service { private readonly rpc: Rpc; diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index a76310b1..504463b1 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -134,11 +134,11 @@ export const MsgVerifyInvariantResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the bank Msg service. */ export interface Msg { - VerifyInvariant(request: MsgVerifyInvariant): Promise; /*VerifyInvariant defines a method to verify a particular invariance.*/ + VerifyInvariant(request: MsgVerifyInvariant): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index c073cafa..b4854840 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1340,42 +1340,42 @@ export const QueryCommunityPoolResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service for distribution module. */ export interface Query { - Params(request?: QueryParamsRequest): Promise; /*Params queries params of the distribution module.*/ + Params(request?: QueryParamsRequest): Promise; + /*ValidatorOutstandingRewards queries rewards of a validator address.*/ ValidatorOutstandingRewards( request: QueryValidatorOutstandingRewardsRequest, ): Promise; - /*ValidatorOutstandingRewards queries rewards of a validator address.*/ + /*ValidatorCommission queries accumulated commission for a validator.*/ ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - /*ValidatorCommission queries accumulated commission for a validator.*/ + /*ValidatorSlashes queries slash events of a validator.*/ ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /*ValidatorSlashes queries slash events of a validator.*/ + /*DelegationRewards queries the total rewards accrued by a delegation.*/ DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - /*DelegationRewards queries the total rewards accrued by a delegation.*/ + /*DelegationTotalRewards queries the total rewards accrued by a each + validator.*/ DelegationTotalRewards( request: QueryDelegationTotalRewardsRequest, ): Promise; - /*DelegationTotalRewards queries the total rewards accrued by a each - validator.*/ + /*DelegatorValidators queries the validators of a delegator.*/ DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /*DelegatorValidators queries the validators of a delegator.*/ + /*DelegatorWithdrawAddress queries withdraw address of a delegator.*/ DelegatorWithdrawAddress( request: QueryDelegatorWithdrawAddressRequest, ): Promise; - /*DelegatorWithdrawAddress queries withdraw address of a delegator.*/ + /*CommunityPool queries the community pool coins.*/ CommunityPool(request?: QueryCommunityPoolRequest): Promise; - /*CommunityPool queries the community pool coins.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index ff3c6d66..70706357 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -496,26 +496,26 @@ export const MsgFundCommunityPoolResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the distribution Msg service. */ export interface Msg { - SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; /*SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation).*/ - - WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; + SetWithdrawAddress(request: MsgSetWithdrawAddress): Promise; /*WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator.*/ - WithdrawValidatorCommission( - request: MsgWithdrawValidatorCommission, - ): Promise; + WithdrawDelegatorReward(request: MsgWithdrawDelegatorReward): Promise; /*WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address.*/ - FundCommunityPool(request: MsgFundCommunityPool): Promise; + 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; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 4bb73045..9992eddf 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -296,14 +296,14 @@ export const QueryAllEvidenceResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Evidence(request: QueryEvidenceRequest): Promise; /*Evidence queries evidence based on evidence hash.*/ + Evidence(request: QueryEvidenceRequest): Promise; + /*AllEvidence queries all evidence.*/ AllEvidence(request?: QueryAllEvidenceRequest): Promise; - /*AllEvidence queries all evidence.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 0704fbb5..01ca656e 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -149,12 +149,12 @@ export const MsgSubmitEvidenceResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the evidence Msg service. */ export interface Msg { - SubmitEvidence(request: MsgSubmitEvidence): Promise; /*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; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 7f57a9bc..4ca2cd87 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -316,14 +316,14 @@ export const QueryAllowancesResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Allowance(request: QueryAllowanceRequest): Promise; /*Allowance returns fee granted to the grantee by the granter.*/ + Allowance(request: QueryAllowanceRequest): Promise; + /*Allowances returns all the grants for address.*/ Allowances(request: QueryAllowancesRequest): Promise; - /*Allowances returns all the grants for address.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index c747a08a..e68bf288 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -269,16 +269,16 @@ export const MsgRevokeAllowanceResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the feegrant msg service. */ export interface Msg { - GrantAllowance(request: MsgGrantAllowance): Promise; /*GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time.*/ - - RevokeAllowance(request: MsgRevokeAllowance): Promise; + GrantAllowance(request: MsgGrantAllowance): Promise; /*RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee.*/ + + RevokeAllowance(request: MsgRevokeAllowance): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 88fbb535..297d0731 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1278,32 +1278,32 @@ export const QueryTallyResultResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service for gov module */ export interface Query { - Proposal(request: QueryProposalRequest): Promise; /*Proposal queries proposal details based on ProposalID.*/ + Proposal(request: QueryProposalRequest): Promise; + /*Proposals queries all proposals based on given status.*/ Proposals(request: QueryProposalsRequest): Promise; - /*Proposals queries all proposals based on given status.*/ + /*Vote queries voted information based on proposalID, voterAddr.*/ Vote(request: QueryVoteRequest): Promise; - /*Vote queries voted information based on proposalID, voterAddr.*/ + /*Votes queries votes of a given proposal.*/ Votes(request: QueryVotesRequest): Promise; - /*Votes queries votes of a given proposal.*/ + /*Params queries all parameters of the gov module.*/ Params(request: QueryParamsRequest): Promise; - /*Params queries all parameters of the gov module.*/ + /*Deposit queries single deposit information based proposalID, depositAddr.*/ Deposit(request: QueryDepositRequest): Promise; - /*Deposit queries single deposit information based proposalID, depositAddr.*/ + /*Deposits queries all deposits of a single proposal.*/ Deposits(request: QueryDepositsRequest): Promise; - /*Deposits queries all deposits of a single proposal.*/ + /*TallyResult queries the tally of a proposal vote.*/ TallyResult(request: QueryTallyResultRequest): Promise; - /*TallyResult queries the tally of a proposal vote.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index 0b5ab7f8..ab4192e4 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -598,22 +598,22 @@ export const MsgDepositResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the bank Msg service. */ export interface Msg { - SubmitProposal(request: MsgSubmitProposal): Promise; /*SubmitProposal defines a method to create new proposal given a content.*/ - - Vote(request: MsgVote): Promise; + SubmitProposal(request: MsgSubmitProposal): Promise; /*Vote defines a method to add a vote on a specific proposal.*/ - VoteWeighted(request: MsgVoteWeighted): Promise; + Vote(request: MsgVote): Promise; /*VoteWeighted defines a method to add a weighted vote on a specific proposal. Since: cosmos-sdk 0.43*/ - Deposit(request: MsgDeposit): Promise; + VoteWeighted(request: MsgVoteWeighted): 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; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index ad61ea11..2aab8da9 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -346,17 +346,17 @@ export const QueryAnnualProvisionsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service. */ export interface Query { - Params(request?: QueryParamsRequest): Promise; /*Params returns the total set of minting parameters.*/ + Params(request?: QueryParamsRequest): Promise; + /*Inflation returns the current minting inflation value.*/ Inflation(request?: QueryInflationRequest): Promise; - /*Inflation returns the current minting inflation value.*/ + /*AnnualProvisions current minting annual provisions value.*/ AnnualProvisions(request?: QueryAnnualProvisionsRequest): Promise; - /*AnnualProvisions current minting annual provisions value.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index b290298b..ee5c5460 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -144,12 +144,12 @@ export const QueryParamsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Params(request: QueryParamsRequest): Promise; /*Params queries a specific parameter of a module, given its subspace and key.*/ + Params(request: QueryParamsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 0c894902..7d009f9f 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -411,17 +411,17 @@ export const QuerySigningInfosResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service */ export interface Query { - Params(request?: QueryParamsRequest): Promise; /*Params queries the parameters of slashing module*/ + Params(request?: QueryParamsRequest): Promise; + /*SigningInfo queries the signing info of given cons address*/ SigningInfo(request: QuerySigningInfoRequest): Promise; - /*SigningInfo queries the signing info of given cons address*/ + /*SigningInfos queries signing info of all validators*/ SigningInfos(request?: QuerySigningInfosRequest): Promise; - /*SigningInfos queries signing info of all validators*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 1ef3807b..116a82a1 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -108,13 +108,13 @@ export const MsgUnjailResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the slashing Msg service. */ export interface Msg { - Unjail(request: MsgUnjail): Promise; /*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; diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index a20814f9..42f45bbe 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -2248,58 +2248,58 @@ export const QueryParamsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC querier service. */ export interface Query { - Validators(request: QueryValidatorsRequest): Promise; /*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; - /*Validator queries validator info for given validator address.*/ + /*ValidatorDelegations queries delegate info for given validator.*/ ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /*ValidatorDelegations queries delegate info for given validator.*/ + /*ValidatorUnbondingDelegations queries unbonding delegations of a validator.*/ ValidatorUnbondingDelegations( request: QueryValidatorUnbondingDelegationsRequest, ): Promise; - /*ValidatorUnbondingDelegations queries unbonding delegations of a validator.*/ - - Delegation(request: QueryDelegationRequest): Promise; /*Delegation queries delegate info for given validator delegator pair.*/ - UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; + Delegation(request: QueryDelegationRequest): Promise; /*UnbondingDelegation queries unbonding info for given validator delegator pair.*/ - DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; + UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; /*DelegatorDelegations queries all delegations of a given delegator address.*/ - DelegatorUnbondingDelegations( - request: QueryDelegatorUnbondingDelegationsRequest, - ): Promise; + DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; /*DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address.*/ - Redelegations(request: QueryRedelegationsRequest): Promise; + DelegatorUnbondingDelegations( + request: QueryDelegatorUnbondingDelegationsRequest, + ): Promise; /*Redelegations queries redelegations of given address.*/ - DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; + Redelegations(request: QueryRedelegationsRequest): Promise; /*DelegatorValidators queries all validators info for given delegator address.*/ - DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; + DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; /*DelegatorValidator queries validator info for given delegator validator pair.*/ - HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; + DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; /*HistoricalInfo queries the historical info for given height.*/ - Pool(request?: QueryPoolRequest): Promise; + HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; /*Pool queries the pool info.*/ - Params(request?: QueryParamsRequest): Promise; + Pool(request?: QueryPoolRequest): Promise; /*Parameters queries the staking parameters.*/ + + Params(request?: QueryParamsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 3aaf6138..65a14dbb 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -819,26 +819,26 @@ export const MsgUndelegateResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the staking Msg service. */ export interface Msg { - CreateValidator(request: MsgCreateValidator): Promise; /*CreateValidator defines a method for creating a new validator.*/ - - EditValidator(request: MsgEditValidator): Promise; + CreateValidator(request: MsgCreateValidator): Promise; /*EditValidator defines a method for editing an existing validator.*/ - Delegate(request: MsgDelegate): Promise; + EditValidator(request: MsgEditValidator): Promise; /*Delegate defines a method for performing a delegation of coins from a delegator to a validator.*/ - BeginRedelegate(request: MsgBeginRedelegate): Promise; + Delegate(request: MsgDelegate): Promise; /*BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator.*/ - Undelegate(request: MsgUndelegate): Promise; + 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; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 86ece859..17c820c0 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1017,25 +1017,25 @@ export const GetBlockWithTxsResponse = { return message; }, }; -/** Service defines the RPC service */ +/** Service defines a gRPC service for interacting with transactions. */ export interface Service { - Simulate(request: SimulateRequest): Promise; /*Simulate simulates executing a transaction for estimating gas usage.*/ - - GetTx(request: GetTxRequest): Promise; + Simulate(request: SimulateRequest): Promise; /*GetTx fetches a tx by hash.*/ - BroadcastTx(request: BroadcastTxRequest): Promise; + GetTx(request: GetTxRequest): Promise; /*BroadcastTx broadcast transaction.*/ - GetTxsEvent(request: GetTxsEventRequest): Promise; + BroadcastTx(request: BroadcastTxRequest): Promise; /*GetTxsEvent fetches txs by event.*/ - GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; + GetTxsEvent(request: GetTxsEventRequest): Promise; /*GetBlockWithTxs fetches a block with decoded txs. Since: cosmos-sdk 0.45.2*/ + + GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; } export class QueryClientImpl implements Service { private readonly rpc: Rpc; diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index bcd3d519..3e89178b 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -551,18 +551,14 @@ export const QueryModuleVersionsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query defines the gRPC upgrade querier service. */ export interface Query { - CurrentPlan(request?: QueryCurrentPlanRequest): Promise; /*CurrentPlan queries the current upgrade plan.*/ - - AppliedPlan(request: QueryAppliedPlanRequest): Promise; + CurrentPlan(request?: QueryCurrentPlanRequest): Promise; /*AppliedPlan queries a previously applied upgrade plan by its name.*/ - UpgradedConsensusState( - request: QueryUpgradedConsensusStateRequest, - ): Promise; + AppliedPlan(request: QueryAppliedPlanRequest): Promise; /*UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. @@ -570,10 +566,14 @@ export interface Query { This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)*/ - ModuleVersions(request: QueryModuleVersionsRequest): Promise; + UpgradedConsensusState( + request: QueryUpgradedConsensusStateRequest, + ): Promise; /*ModuleVersions queries the list of module versions from state. Since: cosmos-sdk 0.43*/ + + ModuleVersions(request: QueryModuleVersionsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 17dec3ac..a6d2ba97 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -173,12 +173,12 @@ export const MsgCreateVestingAccountResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the bank Msg service. */ export interface Msg { - CreateVestingAccount(request: MsgCreateVestingAccount): Promise; /*CreateVestingAccount defines a method that enables creating a vesting account.*/ + CreateVestingAccount(request: MsgCreateVestingAccount): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index d19efcd3..a5a5a1ee 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1553,35 +1553,35 @@ export const QueryPinnedCodesResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service */ export interface Query { - ContractInfo(request: QueryContractInfoRequest): Promise; /*ContractInfo gets the contract meta data*/ + ContractInfo(request: QueryContractInfoRequest): Promise; + /*ContractHistory gets the contract code history*/ ContractHistory(request: QueryContractHistoryRequest): Promise; - /*ContractHistory gets the contract code history*/ + /*ContractsByCode lists all smart contracts for a code id*/ ContractsByCode(request: QueryContractsByCodeRequest): Promise; - /*ContractsByCode lists all smart contracts for a code id*/ + /*AllContractState gets all raw store data for a single contract*/ AllContractState(request: QueryAllContractStateRequest): Promise; - /*AllContractState gets all raw store data for a single contract*/ + /*RawContractState gets single key from the raw store data of a contract*/ RawContractState(request: QueryRawContractStateRequest): Promise; - /*RawContractState gets single key from the raw store data of a contract*/ + /*SmartContractState get smart query result from the contract*/ SmartContractState(request: QuerySmartContractStateRequest): Promise; - /*SmartContractState get smart query result from the contract*/ + /*Code gets the binary code and metadata for a singe wasm code*/ Code(request: QueryCodeRequest): Promise; - /*Code gets the binary code and metadata for a singe wasm code*/ + /*Codes gets the metadata for all stored wasm codes*/ Codes(request?: QueryCodesRequest): Promise; - /*Codes gets the metadata for all stored wasm codes*/ + /*PinnedCodes gets the pinned code ids*/ PinnedCodes(request?: QueryPinnedCodesRequest): Promise; - /*PinnedCodes gets the pinned code ids*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index c95ab4ce..c413f788 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1016,26 +1016,26 @@ export const MsgClearAdminResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the wasm Msg service. */ export interface Msg { - StoreCode(request: MsgStoreCode): Promise; /*StoreCode to submit Wasm code to the system*/ + StoreCode(request: MsgStoreCode): Promise; + /*Instantiate creates a new smart contract instance for the given code id.*/ InstantiateContract(request: MsgInstantiateContract): Promise; - /*Instantiate creates a new smart contract instance for the given code id.*/ + /*Execute submits the given message data to a smart contract*/ ExecuteContract(request: MsgExecuteContract): Promise; - /*Execute submits the given message data to a smart contract*/ + /*Migrate runs a code upgrade/ downgrade for a smart contract*/ MigrateContract(request: MsgMigrateContract): Promise; - /*Migrate runs a code upgrade/ downgrade for a smart contract*/ + /*UpdateAdmin sets a new admin for a smart contract*/ UpdateAdmin(request: MsgUpdateAdmin): Promise; - /*UpdateAdmin sets a new admin for a smart contract*/ + /*ClearAdmin removes any admin stored for a smart contract*/ ClearAdmin(request: MsgClearAdmin): Promise; - /*ClearAdmin removes any admin stored for a smart contract*/ } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/helpers.ts b/src/helpers.ts index 6a46225e..e0d7adc5 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.47.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.50.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index f1d559cb..ab346718 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -409,17 +409,17 @@ export const QueryParamsResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service. */ export interface Query { - DenomTrace(request: QueryDenomTraceRequest): Promise; /*DenomTrace queries a denomination trace information.*/ + DenomTrace(request: QueryDenomTraceRequest): Promise; + /*DenomTraces queries all denomination traces.*/ DenomTraces(request?: QueryDenomTracesRequest): Promise; - /*DenomTraces queries all denomination traces.*/ + /*Params queries all parameters of the ibc-transfer module.*/ Params(request?: QueryParamsRequest): Promise; - /*Params queries all parameters of the ibc-transfer module.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index 42f77273..94dedb92 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -220,11 +220,11 @@ export const MsgTransferResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the ibc/transfer Msg service. */ export interface Msg { - Transfer(request: MsgTransfer): Promise; /*Transfer defines a rpc handler method for MsgTransfer.*/ + Transfer(request: MsgTransfer): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index de20cc62..fc70a08c 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -2692,61 +2692,61 @@ export const QueryNextSequenceReceiveResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service */ export interface Query { - Channel(request: QueryChannelRequest): Promise; /*Channel queries an IBC Channel.*/ - - Channels(request?: QueryChannelsRequest): Promise; + Channel(request: QueryChannelRequest): Promise; /*Channels queries all the IBC channels of a chain.*/ - ConnectionChannels(request: QueryConnectionChannelsRequest): Promise; + Channels(request?: QueryChannelsRequest): Promise; /*ConnectionChannels queries all the channels associated with a connection end.*/ - ChannelClientState(request: QueryChannelClientStateRequest): Promise; + ConnectionChannels(request: QueryConnectionChannelsRequest): Promise; /*ChannelClientState queries for the client state for the channel associated with the provided channel identifiers.*/ - ChannelConsensusState( - request: QueryChannelConsensusStateRequest, - ): Promise; + ChannelClientState(request: QueryChannelClientStateRequest): Promise; /*ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers.*/ - PacketCommitment(request: QueryPacketCommitmentRequest): Promise; + ChannelConsensusState( + request: QueryChannelConsensusStateRequest, + ): Promise; /*PacketCommitment queries a stored packet commitment hash.*/ - PacketCommitments(request: QueryPacketCommitmentsRequest): Promise; + PacketCommitment(request: QueryPacketCommitmentRequest): Promise; /*PacketCommitments returns all the packet commitments hashes associated with a channel.*/ - PacketReceipt(request: QueryPacketReceiptRequest): Promise; + 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; - /*PacketAcknowledgement queries a stored packet acknowledgement hash.*/ + /*PacketAcknowledgements returns all the packet acknowledgements associated + with a channel.*/ PacketAcknowledgements( request: QueryPacketAcknowledgementsRequest, ): Promise; - /*PacketAcknowledgements returns all the packet acknowledgements associated - with a channel.*/ - - UnreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; /*UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences.*/ - UnreceivedAcks(request: QueryUnreceivedAcksRequest): Promise; + UnreceivedPackets(request: QueryUnreceivedPacketsRequest): Promise; /*UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences.*/ - NextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; + 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; diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index c3f83b55..bbe3d86a 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1706,39 +1706,39 @@ export const MsgAcknowledgementResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the ibc/channel Msg service. */ export interface Msg { - ChannelOpenInit(request: MsgChannelOpenInit): Promise; /*ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit.*/ - - ChannelOpenTry(request: MsgChannelOpenTry): Promise; + ChannelOpenInit(request: MsgChannelOpenInit): Promise; /*ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry.*/ - ChannelOpenAck(request: MsgChannelOpenAck): Promise; + ChannelOpenTry(request: MsgChannelOpenTry): Promise; /*ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck.*/ - ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; + ChannelOpenAck(request: MsgChannelOpenAck): Promise; /*ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm.*/ - ChannelCloseInit(request: MsgChannelCloseInit): Promise; + ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; /*ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit.*/ - ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; + ChannelCloseInit(request: MsgChannelCloseInit): Promise; /*ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm.*/ - RecvPacket(request: MsgRecvPacket): Promise; + ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; /*RecvPacket defines a rpc handler method for MsgRecvPacket.*/ - Timeout(request: MsgTimeout): Promise; + RecvPacket(request: MsgRecvPacket): Promise; /*Timeout defines a rpc handler method for MsgTimeout.*/ - TimeoutOnClose(request: MsgTimeoutOnClose): Promise; + Timeout(request: MsgTimeout): Promise; /*TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose.*/ - Acknowledgement(request: MsgAcknowledgement): Promise; + 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; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index 8b9cc8ec..af408b08 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1254,36 +1254,36 @@ export const QueryUpgradedConsensusStateResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service */ export interface Query { - ClientState(request: QueryClientStateRequest): Promise; /*ClientState queries an IBC light client.*/ - - ClientStates(request?: QueryClientStatesRequest): Promise; + ClientState(request: QueryClientStateRequest): Promise; /*ClientStates queries all the IBC light clients of a chain.*/ - ConsensusState(request: QueryConsensusStateRequest): Promise; + ClientStates(request?: QueryClientStatesRequest): Promise; /*ConsensusState queries a consensus state associated with a client state at a given height.*/ - ConsensusStates(request: QueryConsensusStatesRequest): Promise; + ConsensusState(request: QueryConsensusStateRequest): Promise; /*ConsensusStates queries all the consensus state associated with a given client.*/ - ClientStatus(request: QueryClientStatusRequest): Promise; + ConsensusStates(request: QueryConsensusStatesRequest): Promise; /*Status queries the status of an IBC client.*/ - ClientParams(request?: QueryClientParamsRequest): Promise; + ClientStatus(request: QueryClientStatusRequest): Promise; /*ClientParams queries all parameters of the ibc client.*/ - UpgradedClientState(request?: QueryUpgradedClientStateRequest): Promise; + ClientParams(request?: QueryClientParamsRequest): Promise; /*UpgradedClientState queries an Upgraded IBC light client.*/ + UpgradedClientState(request?: QueryUpgradedClientStateRequest): Promise; + /*UpgradedConsensusState queries an Upgraded IBC consensus state.*/ + UpgradedConsensusState( request?: QueryUpgradedConsensusStateRequest, ): Promise; - /*UpgradedConsensusState queries an Upgraded IBC consensus state.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 4f4f7283..984c57b4 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -649,20 +649,20 @@ export const MsgSubmitMisbehaviourResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the ibc/client Msg service. */ export interface Msg { - CreateClient(request: MsgCreateClient): Promise; /*CreateClient defines a rpc handler method for MsgCreateClient.*/ + CreateClient(request: MsgCreateClient): Promise; + /*UpdateClient defines a rpc handler method for MsgUpdateClient.*/ UpdateClient(request: MsgUpdateClient): Promise; - /*UpdateClient defines a rpc handler method for MsgUpdateClient.*/ + /*UpgradeClient defines a rpc handler method for MsgUpgradeClient.*/ UpgradeClient(request: MsgUpgradeClient): Promise; - /*UpgradeClient defines a rpc handler method for MsgUpgradeClient.*/ + /*SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour.*/ SubmitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; - /*SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour.*/ } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 5405f86c..8b0eac50 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -936,30 +936,30 @@ export const QueryConnectionConsensusStateResponse = { return message; }, }; -/** Query defines the RPC service */ +/** Query provides defines the gRPC querier service */ export interface Query { - Connection(request: QueryConnectionRequest): Promise; /*Connection queries an IBC connection end.*/ - - Connections(request?: QueryConnectionsRequest): Promise; + Connection(request: QueryConnectionRequest): Promise; /*Connections queries all the IBC connections of a chain.*/ - ClientConnections(request: QueryClientConnectionsRequest): Promise; + 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; - /*ConnectionClientState queries the client state associated with the + /*ConnectionConsensusState queries the consensus state associated with the connection.*/ ConnectionConsensusState( request: QueryConnectionConsensusStateRequest, ): Promise; - /*ConnectionConsensusState queries the consensus state associated with the - connection.*/ } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index ceef0b85..b2cd8a98 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -915,21 +915,21 @@ export const MsgConnectionOpenConfirmResponse = { return message; }, }; -/** Msg defines the RPC service */ +/** Msg defines the ibc/connection Msg service. */ export interface Msg { - ConnectionOpenInit(request: MsgConnectionOpenInit): Promise; /*ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit.*/ - - ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; + ConnectionOpenInit(request: MsgConnectionOpenInit): Promise; /*ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry.*/ - ConnectionOpenAck(request: MsgConnectionOpenAck): Promise; + ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; /*ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck.*/ - ConnectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; + 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; From 52ce6a0719968dcd807d298fe82362ef4de44839 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 5 Oct 2022 01:01:23 -0500 Subject: [PATCH 19/38] RPC comments --- package-lock.json | 30 +++++------ package.json | 2 +- src/cosmos/auth/v1beta1/query.ts | 12 +++-- src/cosmos/authz/v1beta1/query.ts | 18 ++++--- src/cosmos/authz/v1beta1/tx.ts | 24 +++++---- src/cosmos/bank/v1beta1/query.ts | 20 +++---- src/cosmos/bank/v1beta1/tx.ts | 4 +- src/cosmos/base/tendermint/v1beta1/query.ts | 12 ++--- src/cosmos/crisis/v1beta1/tx.ts | 2 +- src/cosmos/distribution/v1beta1/query.ts | 22 ++++---- src/cosmos/distribution/v1beta1/tx.ts | 24 ++++++--- src/cosmos/evidence/v1beta1/query.ts | 4 +- src/cosmos/evidence/v1beta1/tx.ts | 6 ++- src/cosmos/feegrant/v1beta1/query.ts | 4 +- src/cosmos/feegrant/v1beta1/tx.ts | 12 +++-- src/cosmos/gov/v1beta1/query.ts | 16 +++--- src/cosmos/gov/v1beta1/tx.ts | 14 ++--- src/cosmos/mint/v1beta1/query.ts | 6 +-- src/cosmos/params/v1beta1/query.ts | 6 ++- src/cosmos/slashing/v1beta1/query.ts | 6 +-- src/cosmos/slashing/v1beta1/tx.ts | 8 +-- src/cosmos/staking/v1beta1/query.ts | 44 +++++++++------- src/cosmos/staking/v1beta1/tx.ts | 22 +++++--- src/cosmos/tx/v1beta1/service.ts | 16 +++--- src/cosmos/upgrade/v1beta1/query.ts | 26 +++++---- src/cosmos/vesting/v1beta1/tx.ts | 6 ++- src/cosmwasm/wasm/v1/query.ts | 18 +++---- src/cosmwasm/wasm/v1/tx.ts | 12 ++--- src/helpers.ts | 2 +- src/ibc/applications/transfer/v1/query.ts | 6 +-- src/ibc/applications/transfer/v1/tx.ts | 2 +- src/ibc/core/channel/v1/query.ts | 58 +++++++++++++-------- src/ibc/core/channel/v1/tx.ts | 24 +++++---- src/ibc/core/client/v1/query.ts | 24 +++++---- src/ibc/core/client/v1/tx.ts | 8 +-- src/ibc/core/connection/v1/query.ts | 22 +++++--- src/ibc/core/connection/v1/tx.ts | 12 +++-- 37 files changed, 321 insertions(+), 233 deletions(-) diff --git a/package-lock.json b/package-lock.json index da419982..971d6ad2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.50.0", + "@osmonauts/telescope": "^0.52.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,9 +2142,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.45.0.tgz", - "integrity": "sha512-zJQhVJGHIfQEzd2oVcBU/rhjUjpqDH4bXxopsQKkrbCOtiEQ7T7dL2Pli+Gr3r+keZ6nzC4XLkPPamg4Hdg8sA==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.47.0.tgz", + "integrity": "sha512-MHItv1ZixjfKpL1L9cEnTO3JCrs0/+ZC8niCTcZj+dpoBjiTbcaIwH1eFvgY3QNZEOtNNRLbZvimil9OFmiEew==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.50.0.tgz", - "integrity": "sha512-3tkci0Te6omyaAUIS2wTgHbK/bL11MXHWvbgXh0cpJr9OudhIrXeHio4Y0XmqacSdePhUpc4iHTcrvoT5/xTHw==", + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.52.0.tgz", + "integrity": "sha512-jxk3cSQIRo7C4WR/HWVyxl2bBERpKVHyc5X82XJNPUZNoK+Isye0tEtUCcdIvcSER7VewBkQJ8nF8PgxlRwCKQ==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,7 +2189,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.45.0", + "@osmonauts/ast": "^0.47.0", "@osmonauts/proto-parser": "^0.24.0", "@osmonauts/types": "^0.19.0", "@osmonauts/utils": "^0.6.0", @@ -6490,9 +6490,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.45.0.tgz", - "integrity": "sha512-zJQhVJGHIfQEzd2oVcBU/rhjUjpqDH4bXxopsQKkrbCOtiEQ7T7dL2Pli+Gr3r+keZ6nzC4XLkPPamg4Hdg8sA==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.47.0.tgz", + "integrity": "sha512-MHItv1ZixjfKpL1L9cEnTO3JCrs0/+ZC8niCTcZj+dpoBjiTbcaIwH1eFvgY3QNZEOtNNRLbZvimil9OFmiEew==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.50.0.tgz", - "integrity": "sha512-3tkci0Te6omyaAUIS2wTgHbK/bL11MXHWvbgXh0cpJr9OudhIrXeHio4Y0XmqacSdePhUpc4iHTcrvoT5/xTHw==", + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.52.0.tgz", + "integrity": "sha512-jxk3cSQIRo7C4WR/HWVyxl2bBERpKVHyc5X82XJNPUZNoK+Isye0tEtUCcdIvcSER7VewBkQJ8nF8PgxlRwCKQ==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,7 +6537,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.45.0", + "@osmonauts/ast": "^0.47.0", "@osmonauts/proto-parser": "^0.24.0", "@osmonauts/types": "^0.19.0", "@osmonauts/utils": "^0.6.0", diff --git a/package.json b/package.json index 11ae3bd4..a076b7fc 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.50.0", + "@osmonauts/telescope": "^0.52.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 5c29d5e9..853b8195 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -403,14 +403,16 @@ export const QueryParamsResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Accounts returns all the existing accounts - - Since: cosmos-sdk 0.43*/ + /** + * Accounts returns all the existing accounts + * + * Since: cosmos-sdk 0.43 + */ Accounts(request?: QueryAccountsRequest): Promise; - /*Account returns account details based on address.*/ + /** Account returns account details based on address. */ Account(request: QueryAccountRequest): Promise; - /*Params queries all parameters.*/ + /** Params queries all parameters. */ Params(request?: QueryParamsRequest): Promise; } diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 4ae40673..04a7984f 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -548,16 +548,20 @@ export const QueryGranteeGrantsResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Returns list of `Authorization`, granted to the grantee by the granter.*/ + /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: QueryGrantsRequest): Promise; - /*GranterGrants returns list of `GrantAuthorization`, granted by granter. - - Since: cosmos-sdk 0.45.2*/ + /** + * GranterGrants returns list of `GrantAuthorization`, granted by granter. + * + * Since: cosmos-sdk 0.45.2 + */ GranterGrants(request: QueryGranterGrantsRequest): Promise; - /*GranteeGrants returns a list of `GrantAuthorization` by grantee. - - Since: cosmos-sdk 0.45.2*/ + /** + * GranteeGrants returns a list of `GrantAuthorization` by grantee. + * + * Since: cosmos-sdk 0.45.2 + */ GranteeGrants(request: QueryGranteeGrantsRequest): Promise; } diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index ed624217..a4aec0bc 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -435,18 +435,24 @@ export const MsgRevokeResponse = { /** Msg defines the authz Msg service. */ export interface Msg { - /*Grant grants the provided authorization to the grantee on the granter's - account with the provided expiration time. If there is already a grant - for the given (granter, grantee, Authorization) triple, then the grant - will be overwritten.*/ + /** + * Grant grants the provided authorization to the grantee on the granter's + * account with the provided expiration time. If there is already a grant + * for the given (granter, grantee, Authorization) triple, then the grant + * will be overwritten. + */ Grant(request: MsgGrant): Promise; - /*Exec attempts to execute the provided messages using - authorizations granted to the grantee. Each message should have only - one signer corresponding to the granter of the authorization.*/ + /** + * Exec attempts to execute the provided messages using + * authorizations granted to the grantee. Each message should have only + * one signer corresponding to the granter of the authorization. + */ Exec(request: MsgExec): Promise; - /*Revoke revokes any authorization corresponding to the provided method name on the - granter's account that has been granted to the grantee.*/ + /** + * Revoke revokes any authorization corresponding to the provided method name on the + * granter's account that has been granted to the grantee. + */ Revoke(request: MsgRevoke): Promise; } diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index e66e371f..fa3ebe4b 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1198,28 +1198,30 @@ export const QueryDenomMetadataResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Balance queries the balance of a single coin for a single account.*/ + /** 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 queries the balance of all coins for a single account. */ AllBalances(request: QueryAllBalancesRequest): Promise; - /*SpendableBalances queries the spenable balance of all coins for a single - account.*/ + /** + * SpendableBalances queries the spenable balance of all coins for a single + * account. + */ SpendableBalances(request: QuerySpendableBalancesRequest): Promise; - /*TotalSupply queries the total supply of all coins.*/ + /** TotalSupply queries the total supply of all coins. */ TotalSupply(request?: QueryTotalSupplyRequest): Promise; - /*SupplyOf queries the supply of a single coin.*/ + /** SupplyOf queries the supply of a single coin. */ SupplyOf(request: QuerySupplyOfRequest): Promise; - /*Params queries the parameters of x/bank module.*/ + /** Params queries the parameters of x/bank module. */ Params(request?: QueryParamsRequest): Promise; - /*DenomsMetadata queries the client metadata of a given coin denomination.*/ + /** 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 queries the client metadata for all registered coin denominations. */ DenomsMetadata(request?: QueryDenomsMetadataRequest): Promise; } diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 395fb032..5f8823f5 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -275,9 +275,9 @@ export const MsgMultiSendResponse = { /** Msg defines the bank Msg service. */ export interface Msg { - /*Send defines a method for sending coins from one account to another account.*/ + /** 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 defines a method for sending coins from some accounts to other accounts. */ MultiSend(request: MsgMultiSend): Promise; } diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index d221a1f7..5cb0ac20 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1241,21 +1241,21 @@ export const Module = { /** Service defines the gRPC querier service for tendermint queries. */ export interface Service { - /*GetNodeInfo queries the current node info.*/ + /** GetNodeInfo queries the current node info. */ GetNodeInfo(request?: GetNodeInfoRequest): Promise; - /*GetSyncing queries node syncing.*/ + /** GetSyncing queries node syncing. */ GetSyncing(request?: GetSyncingRequest): Promise; - /*GetLatestBlock returns the latest block.*/ + /** GetLatestBlock returns the latest block. */ GetLatestBlock(request?: GetLatestBlockRequest): Promise; - /*GetBlockByHeight queries block for given height.*/ + /** GetBlockByHeight queries block for given height. */ GetBlockByHeight(request: GetBlockByHeightRequest): Promise; - /*GetLatestValidatorSet queries latest validator-set.*/ + /** GetLatestValidatorSet queries latest validator-set. */ GetLatestValidatorSet(request?: GetLatestValidatorSetRequest): Promise; - /*GetValidatorSetByHeight queries validator-set at a given height.*/ + /** GetValidatorSetByHeight queries validator-set at a given height. */ GetValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise; } diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index 504463b1..1edc3dd1 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -137,7 +137,7 @@ export const MsgVerifyInvariantResponse = { /** Msg defines the bank Msg service. */ export interface Msg { - /*VerifyInvariant defines a method to verify a particular invariance.*/ + /** VerifyInvariant defines a method to verify a particular invariance. */ VerifyInvariant(request: MsgVerifyInvariant): Promise; } export class MsgClientImpl implements Msg { diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index b4854840..9dba55b1 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1343,37 +1343,39 @@ export const QueryCommunityPoolResponse = { /** Query defines the gRPC querier service for distribution module. */ export interface Query { - /*Params queries params of the distribution module.*/ + /** Params queries params of the distribution module. */ Params(request?: QueryParamsRequest): Promise; - /*ValidatorOutstandingRewards queries rewards of a validator address.*/ + /** ValidatorOutstandingRewards queries rewards of a validator address. */ ValidatorOutstandingRewards( request: QueryValidatorOutstandingRewardsRequest, ): Promise; - /*ValidatorCommission queries accumulated commission for a validator.*/ + /** ValidatorCommission queries accumulated commission for a validator. */ ValidatorCommission(request: QueryValidatorCommissionRequest): Promise; - /*ValidatorSlashes queries slash events of a validator.*/ + /** ValidatorSlashes queries slash events of a validator. */ ValidatorSlashes(request: QueryValidatorSlashesRequest): Promise; - /*DelegationRewards queries the total rewards accrued by a delegation.*/ + /** DelegationRewards queries the total rewards accrued by a delegation. */ DelegationRewards(request: QueryDelegationRewardsRequest): Promise; - /*DelegationTotalRewards queries the total rewards accrued by a each - validator.*/ + /** + * DelegationTotalRewards queries the total rewards accrued by a each + * validator. + */ DelegationTotalRewards( request: QueryDelegationTotalRewardsRequest, ): Promise; - /*DelegatorValidators queries the validators of a delegator.*/ + /** DelegatorValidators queries the validators of a delegator. */ DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /*DelegatorWithdrawAddress queries withdraw address of a delegator.*/ + /** DelegatorWithdrawAddress queries withdraw address of a delegator. */ DelegatorWithdrawAddress( request: QueryDelegatorWithdrawAddressRequest, ): Promise; - /*CommunityPool queries the community pool coins.*/ + /** CommunityPool queries the community pool coins. */ CommunityPool(request?: QueryCommunityPoolRequest): Promise; } diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index 70706357..62b84e9b 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -499,21 +499,29 @@ export const 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 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 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 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 defines a method to allow an account to directly + * fund the community pool. + */ FundCommunityPool(request: MsgFundCommunityPool): Promise; } diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 9992eddf..fca0dff2 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -299,9 +299,9 @@ export const QueryAllEvidenceResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Evidence queries evidence based on evidence hash.*/ + /** Evidence queries evidence based on evidence hash. */ Evidence(request: QueryEvidenceRequest): Promise; - /*AllEvidence queries all evidence.*/ + /** AllEvidence queries all evidence. */ AllEvidence(request?: QueryAllEvidenceRequest): Promise; } diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 01ca656e..1f1322b7 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -152,8 +152,10 @@ export const MsgSubmitEvidenceResponse = { /** Msg defines the evidence Msg service. */ export interface Msg { - /*SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - counterfactual signing.*/ + /** + * SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or + * counterfactual signing. + */ SubmitEvidence(request: MsgSubmitEvidence): Promise; } export class MsgClientImpl implements Msg { diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 4ca2cd87..c93798d0 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -319,9 +319,9 @@ export const QueryAllowancesResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Allowance returns fee granted to the grantee by the granter.*/ + /** Allowance returns fee granted to the grantee by the granter. */ Allowance(request: QueryAllowanceRequest): Promise; - /*Allowances returns all the grants for address.*/ + /** Allowances returns all the grants for address. */ Allowances(request: QueryAllowancesRequest): Promise; } diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index e68bf288..9dbecc35 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -272,11 +272,15 @@ export const MsgRevokeAllowanceResponse = { /** Msg defines the feegrant msg service. */ export interface Msg { - /*GrantAllowance grants fee allowance to the grantee on the granter's - account with the provided expiration time.*/ + /** + * GrantAllowance grants fee allowance to the grantee on the granter's + * account with the provided expiration time. + */ GrantAllowance(request: MsgGrantAllowance): Promise; - /*RevokeAllowance revokes any fee allowance of granter's account that - has been granted to the grantee.*/ + /** + * RevokeAllowance revokes any fee allowance of granter's account that + * has been granted to the grantee. + */ RevokeAllowance(request: MsgRevokeAllowance): Promise; } diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 297d0731..6a1a0934 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1281,27 +1281,27 @@ export const QueryTallyResultResponse = { /** Query defines the gRPC querier service for gov module */ export interface Query { - /*Proposal queries proposal details based on ProposalID.*/ + /** Proposal queries proposal details based on ProposalID. */ Proposal(request: QueryProposalRequest): Promise; - /*Proposals queries all proposals based on given status.*/ + /** Proposals queries all proposals based on given status. */ Proposals(request: QueryProposalsRequest): Promise; - /*Vote queries voted information based on proposalID, voterAddr.*/ + /** Vote queries voted information based on proposalID, voterAddr. */ Vote(request: QueryVoteRequest): Promise; - /*Votes queries votes of a given proposal.*/ + /** Votes queries votes of a given proposal. */ Votes(request: QueryVotesRequest): Promise; - /*Params queries all parameters of the gov module.*/ + /** Params queries all parameters of the gov module. */ Params(request: QueryParamsRequest): Promise; - /*Deposit queries single deposit information based proposalID, depositAddr.*/ + /** Deposit queries single deposit information based proposalID, depositAddr. */ Deposit(request: QueryDepositRequest): Promise; - /*Deposits queries all deposits of a single proposal.*/ + /** Deposits queries all deposits of a single proposal. */ Deposits(request: QueryDepositsRequest): Promise; - /*TallyResult queries the tally of a proposal vote.*/ + /** TallyResult queries the tally of a proposal vote. */ TallyResult(request: QueryTallyResultRequest): Promise; } diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index ab4192e4..264ba01c 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -601,17 +601,19 @@ export const MsgDepositResponse = { /** Msg defines the bank Msg service. */ export interface Msg { - /*SubmitProposal defines a method to create new proposal given a content.*/ + /** 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 defines a method to add a vote on a specific proposal. */ Vote(request: MsgVote): Promise; - /*VoteWeighted defines a method to add a weighted vote on a specific proposal. - - Since: cosmos-sdk 0.43*/ + /** + * VoteWeighted defines a method to add a weighted vote on a specific proposal. + * + * Since: cosmos-sdk 0.43 + */ VoteWeighted(request: MsgVoteWeighted): Promise; - /*Deposit defines a method to add deposit on a specific proposal.*/ + /** Deposit defines a method to add deposit on a specific proposal. */ Deposit(request: MsgDeposit): Promise; } diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index 2aab8da9..7ea23715 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -349,12 +349,12 @@ export const QueryAnnualProvisionsResponse = { /** Query provides defines the gRPC querier service. */ export interface Query { - /*Params returns the total set of minting parameters.*/ + /** Params returns the total set of minting parameters. */ Params(request?: QueryParamsRequest): Promise; - /*Inflation returns the current minting inflation value.*/ + /** Inflation returns the current minting inflation value. */ Inflation(request?: QueryInflationRequest): Promise; - /*AnnualProvisions current minting annual provisions value.*/ + /** AnnualProvisions current minting annual provisions value. */ AnnualProvisions(request?: QueryAnnualProvisionsRequest): Promise; } diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index ee5c5460..99b85caa 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -147,8 +147,10 @@ export const QueryParamsResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Params queries a specific parameter of a module, given its subspace and - key.*/ + /** + * Params queries a specific parameter of a module, given its subspace and + * key. + */ Params(request: QueryParamsRequest): Promise; } export class QueryClientImpl implements Query { diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 7d009f9f..0d843635 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -414,12 +414,12 @@ export const QuerySigningInfosResponse = { /** Query provides defines the gRPC querier service */ export interface Query { - /*Params queries the parameters of slashing module*/ + /** Params queries the parameters of slashing module */ Params(request?: QueryParamsRequest): Promise; - /*SigningInfo queries the signing info of given cons address*/ + /** SigningInfo queries the signing info of given cons address */ SigningInfo(request: QuerySigningInfoRequest): Promise; - /*SigningInfos queries signing info of all validators*/ + /** SigningInfos queries signing info of all validators */ SigningInfos(request?: QuerySigningInfosRequest): Promise; } diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 116a82a1..e665505f 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -111,9 +111,11 @@ export const 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 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 { diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index 42f45bbe..8fc4a178 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -2251,53 +2251,61 @@ export const QueryParamsResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /*Validators queries all validators that match the given status.*/ + /** Validators queries all validators that match the given status. */ Validators(request: QueryValidatorsRequest): Promise; - /*Validator queries validator info for given validator address.*/ + /** Validator queries validator info for given validator address. */ Validator(request: QueryValidatorRequest): Promise; - /*ValidatorDelegations queries delegate info for given validator.*/ + /** ValidatorDelegations queries delegate info for given validator. */ ValidatorDelegations(request: QueryValidatorDelegationsRequest): Promise; - /*ValidatorUnbondingDelegations queries unbonding delegations of a validator.*/ + /** ValidatorUnbondingDelegations queries unbonding delegations of a validator. */ ValidatorUnbondingDelegations( request: QueryValidatorUnbondingDelegationsRequest, ): Promise; - /*Delegation queries delegate info for given validator delegator pair.*/ + /** Delegation queries delegate info for given validator delegator pair. */ Delegation(request: QueryDelegationRequest): Promise; - /*UnbondingDelegation queries unbonding info for given validator delegator - pair.*/ + /** + * UnbondingDelegation queries unbonding info for given validator delegator + * pair. + */ UnbondingDelegation(request: QueryUnbondingDelegationRequest): Promise; - /*DelegatorDelegations queries all delegations of a given delegator address.*/ + /** DelegatorDelegations queries all delegations of a given delegator address. */ DelegatorDelegations(request: QueryDelegatorDelegationsRequest): Promise; - /*DelegatorUnbondingDelegations queries all unbonding delegations of a given - delegator address.*/ + /** + * DelegatorUnbondingDelegations queries all unbonding delegations of a given + * delegator address. + */ DelegatorUnbondingDelegations( request: QueryDelegatorUnbondingDelegationsRequest, ): Promise; - /*Redelegations queries redelegations of given address.*/ + /** Redelegations queries redelegations of given address. */ Redelegations(request: QueryRedelegationsRequest): Promise; - /*DelegatorValidators queries all validators info for given delegator - address.*/ + /** + * DelegatorValidators queries all validators info for given delegator + * address. + */ DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise; - /*DelegatorValidator queries validator info for given delegator validator - pair.*/ + /** + * DelegatorValidator queries validator info for given delegator validator + * pair. + */ DelegatorValidator(request: QueryDelegatorValidatorRequest): Promise; - /*HistoricalInfo queries the historical info for given height.*/ + /** HistoricalInfo queries the historical info for given height. */ HistoricalInfo(request: QueryHistoricalInfoRequest): Promise; - /*Pool queries the pool info.*/ + /** Pool queries the pool info. */ Pool(request?: QueryPoolRequest): Promise; - /*Parameters queries the staking parameters.*/ + /** Parameters queries the staking parameters. */ Params(request?: QueryParamsRequest): Promise; } diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 65a14dbb..ed1d722d 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -822,21 +822,27 @@ export const MsgUndelegateResponse = { /** Msg defines the staking Msg service. */ export interface Msg { - /*CreateValidator defines a method for creating a new validator.*/ + /** CreateValidator defines a method for creating a new validator. */ CreateValidator(request: MsgCreateValidator): Promise; - /*EditValidator defines a method for editing an existing validator.*/ + /** 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 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 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 defines a method for performing an undelegation from a + * delegate and a validator. + */ Undelegate(request: MsgUndelegate): Promise; } diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 17c820c0..bae3446d 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1020,20 +1020,22 @@ export const GetBlockWithTxsResponse = { /** Service defines a gRPC service for interacting with transactions. */ export interface Service { - /*Simulate simulates executing a transaction for estimating gas usage.*/ + /** Simulate simulates executing a transaction for estimating gas usage. */ Simulate(request: SimulateRequest): Promise; - /*GetTx fetches a tx by hash.*/ + /** GetTx fetches a tx by hash. */ GetTx(request: GetTxRequest): Promise; - /*BroadcastTx broadcast transaction.*/ + /** BroadcastTx broadcast transaction. */ BroadcastTx(request: BroadcastTxRequest): Promise; - /*GetTxsEvent fetches txs by event.*/ + /** GetTxsEvent fetches txs by event. */ GetTxsEvent(request: GetTxsEventRequest): Promise; - /*GetBlockWithTxs fetches a block with decoded txs. - - Since: cosmos-sdk 0.45.2*/ + /** + * GetBlockWithTxs fetches a block with decoded txs. + * + * Since: cosmos-sdk 0.45.2 + */ GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; } diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index 3e89178b..21feafaa 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -554,24 +554,28 @@ export const QueryModuleVersionsResponse = { /** Query defines the gRPC upgrade querier service. */ export interface Query { - /*CurrentPlan queries the current upgrade plan.*/ + /** CurrentPlan queries the current upgrade plan. */ CurrentPlan(request?: QueryCurrentPlanRequest): Promise; - /*AppliedPlan queries a previously applied upgrade plan by its name.*/ + /** AppliedPlan queries a previously applied upgrade plan by its name. */ AppliedPlan(request: QueryAppliedPlanRequest): Promise; - /*UpgradedConsensusState queries the consensus state that will serve - as a trusted kernel for the next version of this chain. It will only be - stored at the last height of this chain. - UpgradedConsensusState RPC not supported with legacy querier - This rpc is deprecated now that IBC has its own replacement - (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)*/ + /** + * UpgradedConsensusState queries the consensus state that will serve + * as a trusted kernel for the next version of this chain. It will only be + * stored at the last height of this chain. + * UpgradedConsensusState RPC not supported with legacy querier + * This rpc is deprecated now that IBC has its own replacement + * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + */ UpgradedConsensusState( request: QueryUpgradedConsensusStateRequest, ): Promise; - /*ModuleVersions queries the list of module versions from state. - - Since: cosmos-sdk 0.43*/ + /** + * ModuleVersions queries the list of module versions from state. + * + * Since: cosmos-sdk 0.43 + */ ModuleVersions(request: QueryModuleVersionsRequest): Promise; } diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index a6d2ba97..9a43c7e4 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -176,8 +176,10 @@ export const MsgCreateVestingAccountResponse = { /** Msg defines the bank Msg service. */ export interface Msg { - /*CreateVestingAccount defines a method that enables creating a vesting - account.*/ + /** + * CreateVestingAccount defines a method that enables creating a vesting + * account. + */ CreateVestingAccount(request: MsgCreateVestingAccount): Promise; } export class MsgClientImpl implements Msg { diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index a5a5a1ee..9c576b75 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1556,30 +1556,30 @@ export const QueryPinnedCodesResponse = { /** Query provides defines the gRPC querier service */ export interface Query { - /*ContractInfo gets the contract meta data*/ + /** ContractInfo gets the contract meta data */ ContractInfo(request: QueryContractInfoRequest): Promise; - /*ContractHistory gets the contract code history*/ + /** ContractHistory gets the contract code history */ ContractHistory(request: QueryContractHistoryRequest): Promise; - /*ContractsByCode lists all smart contracts for a code id*/ + /** ContractsByCode lists all smart contracts for a code id */ ContractsByCode(request: QueryContractsByCodeRequest): Promise; - /*AllContractState gets all raw store data for a single contract*/ + /** AllContractState gets all raw store data for a single contract */ AllContractState(request: QueryAllContractStateRequest): Promise; - /*RawContractState gets single key from the raw store data of a contract*/ + /** RawContractState gets single key from the raw store data of a contract */ RawContractState(request: QueryRawContractStateRequest): Promise; - /*SmartContractState get smart query result from the contract*/ + /** SmartContractState get smart query result from the contract */ SmartContractState(request: QuerySmartContractStateRequest): Promise; - /*Code gets the binary code and metadata for a singe wasm code*/ + /** Code gets the binary code and metadata for a singe wasm code */ Code(request: QueryCodeRequest): Promise; - /*Codes gets the metadata for all stored wasm codes*/ + /** Codes gets the metadata for all stored wasm codes */ Codes(request?: QueryCodesRequest): Promise; - /*PinnedCodes gets the pinned code ids*/ + /** PinnedCodes gets the pinned code ids */ PinnedCodes(request?: QueryPinnedCodesRequest): Promise; } diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index c413f788..2729069d 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1019,21 +1019,21 @@ export const MsgClearAdminResponse = { /** Msg defines the wasm Msg service. */ export interface Msg { - /*StoreCode to submit Wasm code to the system*/ + /** StoreCode to submit Wasm code to the system */ StoreCode(request: MsgStoreCode): Promise; - /*Instantiate creates a new smart contract instance for the given code id.*/ + /** Instantiate creates a new smart contract instance for the given code id. */ InstantiateContract(request: MsgInstantiateContract): Promise; - /*Execute submits the given message data to a smart contract*/ + /** Execute submits the given message data to a smart contract */ ExecuteContract(request: MsgExecuteContract): Promise; - /*Migrate runs a code upgrade/ downgrade for a smart contract*/ + /** Migrate runs a code upgrade/ downgrade for a smart contract */ MigrateContract(request: MsgMigrateContract): Promise; - /*UpdateAdmin sets a new admin for a smart contract*/ + /** UpdateAdmin sets a new admin for a smart contract */ UpdateAdmin(request: MsgUpdateAdmin): Promise; - /*ClearAdmin removes any admin stored for a smart contract*/ + /** ClearAdmin removes any admin stored for a smart contract */ ClearAdmin(request: MsgClearAdmin): Promise; } diff --git a/src/helpers.ts b/src/helpers.ts index e0d7adc5..8a5fb8e2 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.50.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.52.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index ab346718..ec5d0be1 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -412,12 +412,12 @@ export const QueryParamsResponse = { /** Query provides defines the gRPC querier service. */ export interface Query { - /*DenomTrace queries a denomination trace information.*/ + /** DenomTrace queries a denomination trace information. */ DenomTrace(request: QueryDenomTraceRequest): Promise; - /*DenomTraces queries all denomination traces.*/ + /** DenomTraces queries all denomination traces. */ DenomTraces(request?: QueryDenomTracesRequest): Promise; - /*Params queries all parameters of the ibc-transfer module.*/ + /** Params queries all parameters of the ibc-transfer module. */ Params(request?: QueryParamsRequest): Promise; } diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index 94dedb92..dcfe94fe 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -223,7 +223,7 @@ export const MsgTransferResponse = { /** Msg defines the ibc/transfer Msg service. */ export interface Msg { - /*Transfer defines a rpc handler method for MsgTransfer.*/ + /** Transfer defines a rpc handler method for MsgTransfer. */ Transfer(request: MsgTransfer): Promise; } export class MsgClientImpl implements Msg { diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index fc70a08c..82bdd8e1 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -2695,56 +2695,72 @@ export const QueryNextSequenceReceiveResponse = { /** Query provides defines the gRPC querier service */ export interface Query { - /*Channel queries an IBC Channel.*/ + /** Channel queries an IBC Channel. */ Channel(request: QueryChannelRequest): Promise; - /*Channels queries all the IBC channels of a chain.*/ + /** Channels queries all the IBC channels of a chain. */ Channels(request?: QueryChannelsRequest): Promise; - /*ConnectionChannels queries all the channels associated with a connection - end.*/ + /** + * 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 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 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 queries a stored packet commitment hash. */ PacketCommitment(request: QueryPacketCommitmentRequest): Promise; - /*PacketCommitments returns all the packet commitments hashes associated - with a channel.*/ + /** + * 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 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 queries a stored packet acknowledgement hash. */ PacketAcknowledgement( request: QueryPacketAcknowledgementRequest, ): Promise; - /*PacketAcknowledgements returns all the packet acknowledgements associated - with a channel.*/ + /** + * 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 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 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 returns the next receive sequence for a given channel. */ NextSequenceReceive(request: QueryNextSequenceReceiveRequest): Promise; } diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index bbe3d86a..398cc092 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1709,34 +1709,36 @@ export const MsgAcknowledgementResponse = { /** Msg defines the ibc/channel Msg service. */ export interface Msg { - /*ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit.*/ + /** ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. */ ChannelOpenInit(request: MsgChannelOpenInit): Promise; - /*ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry.*/ + /** ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. */ ChannelOpenTry(request: MsgChannelOpenTry): Promise; - /*ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck.*/ + /** ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. */ ChannelOpenAck(request: MsgChannelOpenAck): Promise; - /*ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm.*/ + /** ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. */ ChannelOpenConfirm(request: MsgChannelOpenConfirm): Promise; - /*ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit.*/ + /** ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. */ ChannelCloseInit(request: MsgChannelCloseInit): Promise; - /*ChannelCloseConfirm defines a rpc handler method for - MsgChannelCloseConfirm.*/ + /** + * ChannelCloseConfirm defines a rpc handler method for + * MsgChannelCloseConfirm. + */ ChannelCloseConfirm(request: MsgChannelCloseConfirm): Promise; - /*RecvPacket defines a rpc handler method for MsgRecvPacket.*/ + /** RecvPacket defines a rpc handler method for MsgRecvPacket. */ RecvPacket(request: MsgRecvPacket): Promise; - /*Timeout defines a rpc handler method for MsgTimeout.*/ + /** Timeout defines a rpc handler method for MsgTimeout. */ Timeout(request: MsgTimeout): Promise; - /*TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose.*/ + /** TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. */ TimeoutOnClose(request: MsgTimeoutOnClose): Promise; - /*Acknowledgement defines a rpc handler method for MsgAcknowledgement.*/ + /** Acknowledgement defines a rpc handler method for MsgAcknowledgement. */ Acknowledgement(request: MsgAcknowledgement): Promise; } diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index af408b08..b58e7255 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1257,29 +1257,33 @@ export const QueryUpgradedConsensusStateResponse = { /** Query provides defines the gRPC querier service */ export interface Query { - /*ClientState queries an IBC light client.*/ + /** ClientState queries an IBC light client. */ ClientState(request: QueryClientStateRequest): Promise; - /*ClientStates queries all the IBC light clients of a chain.*/ + /** 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 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 queries all the consensus state associated with a given + * client. + */ ConsensusStates(request: QueryConsensusStatesRequest): Promise; - /*Status queries the status of an IBC client.*/ + /** Status queries the status of an IBC client. */ ClientStatus(request: QueryClientStatusRequest): Promise; - /*ClientParams queries all parameters of the ibc client.*/ + /** ClientParams queries all parameters of the ibc client. */ ClientParams(request?: QueryClientParamsRequest): Promise; - /*UpgradedClientState queries an Upgraded IBC light client.*/ + /** UpgradedClientState queries an Upgraded IBC light client. */ UpgradedClientState(request?: QueryUpgradedClientStateRequest): Promise; - /*UpgradedConsensusState queries an Upgraded IBC consensus state.*/ + /** UpgradedConsensusState queries an Upgraded IBC consensus state. */ UpgradedConsensusState( request?: QueryUpgradedConsensusStateRequest, diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 984c57b4..1193628e 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -652,15 +652,15 @@ export const MsgSubmitMisbehaviourResponse = { /** Msg defines the ibc/client Msg service. */ export interface Msg { - /*CreateClient defines a rpc handler method for MsgCreateClient.*/ + /** CreateClient defines a rpc handler method for MsgCreateClient. */ CreateClient(request: MsgCreateClient): Promise; - /*UpdateClient defines a rpc handler method for MsgUpdateClient.*/ + /** UpdateClient defines a rpc handler method for MsgUpdateClient. */ UpdateClient(request: MsgUpdateClient): Promise; - /*UpgradeClient defines a rpc handler method for MsgUpgradeClient.*/ + /** UpgradeClient defines a rpc handler method for MsgUpgradeClient. */ UpgradeClient(request: MsgUpgradeClient): Promise; - /*SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour.*/ + /** SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. */ SubmitMisbehaviour(request: MsgSubmitMisbehaviour): Promise; } diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 8b0eac50..d0578f46 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -939,23 +939,29 @@ export const QueryConnectionConsensusStateResponse = { /** Query provides defines the gRPC querier service */ export interface Query { - /*Connection queries an IBC connection end.*/ + /** Connection queries an IBC connection end. */ Connection(request: QueryConnectionRequest): Promise; - /*Connections queries all the IBC connections of a chain.*/ + /** Connections queries all the IBC connections of a chain. */ Connections(request?: QueryConnectionsRequest): Promise; - /*ClientConnections queries the connection paths associated with a client - state.*/ + /** + * ClientConnections queries the connection paths associated with a client + * state. + */ ClientConnections(request: QueryClientConnectionsRequest): Promise; - /*ConnectionClientState queries the client state associated with the - connection.*/ + /** + * ConnectionClientState queries the client state associated with the + * connection. + */ ConnectionClientState( request: QueryConnectionClientStateRequest, ): Promise; - /*ConnectionConsensusState queries the consensus state associated with the - connection.*/ + /** + * ConnectionConsensusState queries the consensus state associated with the + * connection. + */ ConnectionConsensusState( request: QueryConnectionConsensusStateRequest, diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index b2cd8a98..71bd9985 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -918,16 +918,18 @@ export const MsgConnectionOpenConfirmResponse = { /** Msg defines the ibc/connection Msg service. */ export interface Msg { - /*ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit.*/ + /** ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. */ ConnectionOpenInit(request: MsgConnectionOpenInit): Promise; - /*ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry.*/ + /** ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. */ ConnectionOpenTry(request: MsgConnectionOpenTry): Promise; - /*ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck.*/ + /** ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. */ ConnectionOpenAck(request: MsgConnectionOpenAck): Promise; - /*ConnectionOpenConfirm defines a rpc handler method for - MsgConnectionOpenConfirm.*/ + /** + * ConnectionOpenConfirm defines a rpc handler method for + * MsgConnectionOpenConfirm. + */ ConnectionOpenConfirm(request: MsgConnectionOpenConfirm): Promise; } From aa20326c549aa200f3c14b7c88026bd63565c564 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 10 Oct 2022 22:01:26 -0700 Subject: [PATCH 20/38] tslint disable --- package.json | 2 +- scripts/codegen.js | 3 +++ src/confio/proofs.ts | 1 + src/cosmos/auth/v1beta1/auth.ts | 1 + src/cosmos/auth/v1beta1/genesis.ts | 1 + src/cosmos/auth/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/authz.ts | 1 + src/cosmos/authz/v1beta1/genesis.ts | 1 + src/cosmos/authz/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/tx.ts | 1 + src/cosmos/bank/v1beta1/authz.ts | 1 + src/cosmos/bank/v1beta1/bank.ts | 1 + src/cosmos/bank/v1beta1/genesis.ts | 1 + src/cosmos/bank/v1beta1/query.ts | 1 + src/cosmos/bank/v1beta1/tx.ts | 1 + src/cosmos/base/abci/v1beta1/abci.ts | 1 + src/cosmos/base/kv/v1beta1/kv.ts | 1 + src/cosmos/base/query/v1beta1/pagination.ts | 1 + src/cosmos/base/reflection/v1beta1/reflection.ts | 1 + src/cosmos/base/snapshots/v1beta1/snapshot.ts | 1 + src/cosmos/base/store/v1beta1/commit_info.ts | 1 + src/cosmos/base/store/v1beta1/listening.ts | 1 + src/cosmos/base/store/v1beta1/snapshot.ts | 1 + src/cosmos/base/tendermint/v1beta1/query.ts | 1 + src/cosmos/base/v1beta1/coin.ts | 1 + src/cosmos/capability/v1beta1/capability.ts | 1 + src/cosmos/capability/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/tx.ts | 1 + src/cosmos/crypto/ed25519/keys.ts | 1 + src/cosmos/crypto/multisig/keys.ts | 1 + src/cosmos/crypto/multisig/v1beta1/multisig.ts | 1 + src/cosmos/crypto/secp256k1/keys.ts | 1 + src/cosmos/distribution/v1beta1/distribution.ts | 1 + src/cosmos/distribution/v1beta1/genesis.ts | 1 + src/cosmos/distribution/v1beta1/query.ts | 1 + src/cosmos/distribution/v1beta1/tx.ts | 1 + src/cosmos/evidence/v1beta1/evidence.ts | 1 + src/cosmos/evidence/v1beta1/genesis.ts | 1 + src/cosmos/evidence/v1beta1/query.ts | 1 + src/cosmos/evidence/v1beta1/tx.ts | 1 + src/cosmos/feegrant/v1beta1/feegrant.ts | 1 + src/cosmos/feegrant/v1beta1/genesis.ts | 1 + src/cosmos/feegrant/v1beta1/query.ts | 1 + src/cosmos/feegrant/v1beta1/tx.ts | 1 + src/cosmos/genutil/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/gov.ts | 1 + src/cosmos/gov/v1beta1/query.ts | 1 + src/cosmos/gov/v1beta1/tx.ts | 1 + src/cosmos/mint/v1beta1/genesis.ts | 1 + src/cosmos/mint/v1beta1/mint.ts | 1 + src/cosmos/mint/v1beta1/query.ts | 1 + src/cosmos/params/v1beta1/params.ts | 1 + src/cosmos/params/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/genesis.ts | 1 + src/cosmos/slashing/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/slashing.ts | 1 + src/cosmos/slashing/v1beta1/tx.ts | 1 + src/cosmos/staking/v1beta1/authz.ts | 1 + src/cosmos/staking/v1beta1/genesis.ts | 1 + src/cosmos/staking/v1beta1/query.ts | 1 + src/cosmos/staking/v1beta1/staking.ts | 1 + src/cosmos/staking/v1beta1/tx.ts | 1 + src/cosmos/tx/signing/v1beta1/signing.ts | 1 + src/cosmos/tx/v1beta1/service.ts | 1 + src/cosmos/tx/v1beta1/tx.ts | 1 + src/cosmos/upgrade/v1beta1/query.ts | 1 + src/cosmos/upgrade/v1beta1/upgrade.ts | 1 + src/cosmos/vesting/v1beta1/tx.ts | 1 + src/cosmos/vesting/v1beta1/vesting.ts | 1 + src/cosmwasm/wasm/v1/genesis.ts | 1 + src/cosmwasm/wasm/v1/ibc.ts | 1 + src/cosmwasm/wasm/v1/proposal.ts | 1 + src/cosmwasm/wasm/v1/query.ts | 1 + src/cosmwasm/wasm/v1/tx.ts | 1 + src/cosmwasm/wasm/v1/types.ts | 1 + src/google/api/http.ts | 1 + src/google/protobuf/any.ts | 1 + src/google/protobuf/descriptor.ts | 1 + src/google/protobuf/duration.ts | 1 + src/google/protobuf/timestamp.ts | 1 + src/helpers.ts | 3 ++- src/ibc/applications/transfer/v1/genesis.ts | 1 + src/ibc/applications/transfer/v1/query.ts | 1 + src/ibc/applications/transfer/v1/transfer.ts | 1 + src/ibc/applications/transfer/v1/tx.ts | 1 + src/ibc/applications/transfer/v2/packet.ts | 1 + src/ibc/core/channel/v1/channel.ts | 1 + src/ibc/core/channel/v1/genesis.ts | 1 + src/ibc/core/channel/v1/query.ts | 1 + src/ibc/core/channel/v1/tx.ts | 1 + src/ibc/core/client/v1/client.ts | 1 + src/ibc/core/client/v1/genesis.ts | 1 + src/ibc/core/client/v1/query.ts | 1 + src/ibc/core/client/v1/tx.ts | 1 + src/ibc/core/commitment/v1/commitment.ts | 1 + src/ibc/core/connection/v1/connection.ts | 1 + src/ibc/core/connection/v1/genesis.ts | 1 + src/ibc/core/connection/v1/query.ts | 1 + src/ibc/core/connection/v1/tx.ts | 1 + src/ibc/core/types/v1/genesis.ts | 1 + src/ibc/lightclients/localhost/v1/localhost.ts | 1 + src/ibc/lightclients/solomachine/v1/solomachine.ts | 1 + src/ibc/lightclients/tendermint/v1/tendermint.ts | 1 + src/tendermint/abci/types.ts | 1 + src/tendermint/crypto/keys.ts | 1 + src/tendermint/crypto/proof.ts | 1 + src/tendermint/p2p/types.ts | 1 + src/tendermint/types/block.ts | 1 + src/tendermint/types/evidence.ts | 1 + src/tendermint/types/params.ts | 1 + src/tendermint/types/types.ts | 1 + src/tendermint/types/validator.ts | 1 + src/tendermint/version/types.ts | 1 + 115 files changed, 118 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a076b7fc..073458bb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.52.0", + "@osmonauts/telescope": "^0.53.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 17f2eb7e..3d61eb50 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -13,6 +13,9 @@ telescope({ outPath: join(__dirname, '/../src'), options: { useSDKTypes: false, + tsDisable: { + disableAll: true + }, eslintDisable: { disableAll: true }, diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 146fdc0a..faa832cf 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index a59fbd00..cfcf09a6 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 0dfbee2d..733c0565 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 853b8195..9a85d3c9 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 46ba74b8..f95920b7 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 72ac8771..ec5d3a5f 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 04a7984f..dfa720cf 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index a4aec0bc..f0afa78c 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index 9eb22de7..b61ae105 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 24ee7489..278208a0 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index 9892e9fd..86c58b91 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index fa3ebe4b..34fb7a95 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 5f8823f5..4beb0925 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 0f90b6a4..f74f9798 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index c6e9c045..7751aa40 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 93c14e80..9109ff39 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 74820ddb..14ea6f61 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index a375fb6b..c213f4f5 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 0eae5106..a54f2524 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index 245d4e26..fb494237 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index d76843e6..5c32497b 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 5cb0ac20..5bcae9b8 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index 25a1eaee..c111ef98 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index 87575e04..df39bfe3 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index b9719305..8ebe510f 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index 75ead867..c441fdf0 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index 1edc3dd1..a35456b7 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index d3b3b7aa..5d91bf77 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index 69404109..bf5fce2e 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index d8fea648..78cf2176 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index e15d3612..f09457fe 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 07ee82f8..462786d4 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 8daef586..d07e6279 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DecCoin } from "../../base/v1beta1/coin"; import { diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index 9dba55b1..eaee4db4 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index 62b84e9b..a39d2de4 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index 76991821..b125189d 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index d5e26fbc..5794e677 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index fca0dff2..2e1d5cc1 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 1f1322b7..10580dc4 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index e6246bcc..50ac9cd8 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 35ab4b27..0a28e052 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index c93798d0..75fdea9c 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index 9dbecc35..4d8809a0 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 24e0b6ad..4b35676c 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index b87e9cff..5b80d2ea 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 6fcd2294..ecb17c8a 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 6a1a0934..4e18206d 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { ProposalStatus, diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index 264ba01c..40b1094c 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 9149d5f5..293e4990 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index e48598ba..a1b084f8 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index 7ea23715..cbea87fd 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index d5f58d05..07deeaad 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 99b85caa..f6417800 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index ce59d489..5148ba1e 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 0d843635..0eaf636f 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index c6245e6b..85c5f47f 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index e665505f..80678571 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 728949e6..2017145c 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 10f331ef..00e64641 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index 8fc4a178..cf04bad8 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index d7b8a647..f05828a8 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Header } from "../../../tendermint/types/types"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index ed1d722d..54d0b3e6 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 7dada4c7..4d04a73a 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index bae3446d..7db99b5f 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 67624ecc..3c14088a 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index 21feafaa..168b8c98 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index 8ef2d1e1..e9211d56 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 9a43c7e4..2e62ae5c 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index c47872db..859132ea 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index 4c71488e..4f396261 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index 0e6424ac..c6505e0a 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index eda8da35..795f1cc0 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 9c576b75..61d071c3 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model } from "./types"; diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index 2729069d..7942524f 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 90ff6340..f6466186 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/google/api/http.ts b/src/google/api/http.ts index a5c7bdf6..20526a16 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 429edd39..8b573384 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index abc22575..9c0e93ed 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 4d2e7dd6..75c515ee 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index 334db22b..d37b1148 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/helpers.ts b/src/helpers.ts index 8a5fb8e2..94060404 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,7 @@ +//@ts-nocheck /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.52.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.53.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index af39dad6..4b250d3b 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index ec5d0be1..ce23c672 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index b6ef5e45..a199ac13 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index dcfe94fe..b63e8878 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index 7d27d7e2..ab7b519e 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index b639fc05..0274adb4 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 8d462562..5e98b394 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 82bdd8e1..adbd40e5 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index 398cc092..5e9d7614 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index e629a294..9820fbcd 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index ae6e9742..8b3d5259 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index b58e7255..a7cda68c 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 1193628e..13b0be3e 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index a62fc23a..8e10fb6d 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 6fd81990..dbf721ac 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 7ea87895..976f0224 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index d0578f46..22abb34d 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 71bd9985..8de8666a 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 652631a4..0a35b0bf 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index ec76ff20..2614013b 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 0ca878d7..4f317217 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index dbd1e7ee..96dacacf 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Duration } from "../../../../google/protobuf/duration"; import { Height } from "../../../core/client/v1/client"; diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 2a1fb212..fcf0e158 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../google/protobuf/timestamp"; import { Header } from "../types/types"; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index a3c2806e..0e934fb4 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 0e0cb420..120cbfdb 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 17719df3..426d84d4 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 86596dad..f0a327a4 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 296ca6d5..18656989 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 1fa1a1f2..5e5a3297 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index 6e71250d..7cb1a444 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 46a8b81c..e44893ab 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index d72ca96a..42e909cb 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; From 4faa92c1e8a88777639a63bba7e4a9a5eeec15aa Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 11 Oct 2022 14:37:00 -0700 Subject: [PATCH 21/38] optionality --- package.json | 7 ++-- scripts/codegen.js | 4 +- src/confio/proofs.ts | 17 ++++----- src/cosmos/auth/v1beta1/auth.ts | 5 +-- src/cosmos/auth/v1beta1/genesis.ts | 3 +- src/cosmos/auth/v1beta1/query.ts | 5 +-- src/cosmos/authz/v1beta1/authz.ts | 9 ++--- src/cosmos/authz/v1beta1/genesis.ts | 1 - src/cosmos/authz/v1beta1/query.ts | 1 - src/cosmos/authz/v1beta1/tx.ts | 3 +- src/cosmos/bank/v1beta1/authz.ts | 1 - src/cosmos/bank/v1beta1/bank.ts | 1 - src/cosmos/bank/v1beta1/genesis.ts | 3 +- src/cosmos/bank/v1beta1/query.ts | 9 ++--- src/cosmos/bank/v1beta1/tx.ts | 1 - src/cosmos/base/abci/v1beta1/abci.ts | 7 ++-- src/cosmos/base/kv/v1beta1/kv.ts | 1 - src/cosmos/base/query/v1beta1/pagination.ts | 1 - .../base/reflection/v1beta1/reflection.ts | 1 - src/cosmos/base/snapshots/v1beta1/snapshot.ts | 3 +- src/cosmos/base/store/v1beta1/commit_info.ts | 3 +- src/cosmos/base/store/v1beta1/listening.ts | 1 - src/cosmos/base/store/v1beta1/snapshot.ts | 1 - src/cosmos/base/tendermint/v1beta1/query.ts | 15 ++++---- src/cosmos/base/v1beta1/coin.ts | 1 - src/cosmos/capability/v1beta1/capability.ts | 1 - src/cosmos/capability/v1beta1/genesis.ts | 3 +- src/cosmos/crisis/v1beta1/genesis.ts | 3 +- src/cosmos/crisis/v1beta1/tx.ts | 1 - src/cosmos/crypto/ed25519/keys.ts | 1 - src/cosmos/crypto/multisig/keys.ts | 1 - .../crypto/multisig/v1beta1/multisig.ts | 1 - src/cosmos/crypto/secp256k1/keys.ts | 1 - .../distribution/v1beta1/distribution.ts | 1 - src/cosmos/distribution/v1beta1/genesis.ts | 15 ++++---- src/cosmos/distribution/v1beta1/query.ts | 7 ++-- src/cosmos/distribution/v1beta1/tx.ts | 1 - src/cosmos/evidence/v1beta1/evidence.ts | 3 +- src/cosmos/evidence/v1beta1/genesis.ts | 1 - src/cosmos/evidence/v1beta1/query.ts | 3 +- src/cosmos/evidence/v1beta1/tx.ts | 3 +- src/cosmos/feegrant/v1beta1/feegrant.ts | 13 +++---- src/cosmos/feegrant/v1beta1/genesis.ts | 1 - src/cosmos/feegrant/v1beta1/query.ts | 3 +- src/cosmos/feegrant/v1beta1/tx.ts | 3 +- src/cosmos/genutil/v1beta1/genesis.ts | 1 - src/cosmos/gov/v1beta1/genesis.ts | 7 ++-- src/cosmos/gov/v1beta1/gov.ts | 17 ++++----- src/cosmos/gov/v1beta1/query.ts | 15 ++++---- src/cosmos/gov/v1beta1/tx.ts | 3 +- src/cosmos/mint/v1beta1/genesis.ts | 5 +-- src/cosmos/mint/v1beta1/mint.ts | 1 - src/cosmos/mint/v1beta1/query.ts | 3 +- src/cosmos/params/v1beta1/params.ts | 1 - src/cosmos/params/v1beta1/query.ts | 3 +- src/cosmos/slashing/v1beta1/genesis.ts | 5 +-- src/cosmos/slashing/v1beta1/query.ts | 5 +-- src/cosmos/slashing/v1beta1/slashing.ts | 5 +-- src/cosmos/slashing/v1beta1/tx.ts | 1 - src/cosmos/staking/v1beta1/authz.ts | 3 +- src/cosmos/staking/v1beta1/genesis.ts | 3 +- src/cosmos/staking/v1beta1/query.ts | 15 ++++---- src/cosmos/staking/v1beta1/staking.ts | 29 +++++++-------- src/cosmos/staking/v1beta1/tx.ts | 21 +++++------ src/cosmos/tx/signing/v1beta1/signing.ts | 7 ++-- src/cosmos/tx/v1beta1/service.ts | 17 ++++----- src/cosmos/tx/v1beta1/tx.ts | 13 +++---- src/cosmos/upgrade/v1beta1/query.ts | 3 +- src/cosmos/upgrade/v1beta1/upgrade.ts | 7 ++-- src/cosmos/vesting/v1beta1/tx.ts | 1 - src/cosmos/vesting/v1beta1/vesting.ts | 11 +++--- src/cosmwasm/wasm/v1/genesis.ts | 7 ++-- src/cosmwasm/wasm/v1/ibc.ts | 1 - src/cosmwasm/wasm/v1/proposal.ts | 3 +- src/cosmwasm/wasm/v1/query.ts | 5 +-- src/cosmwasm/wasm/v1/tx.ts | 3 +- src/cosmwasm/wasm/v1/types.ts | 11 +++--- src/google/api/http.ts | 1 - src/google/protobuf/any.ts | 1 - src/google/protobuf/descriptor.ts | 21 +++++------ src/google/protobuf/duration.ts | 1 - src/google/protobuf/timestamp.ts | 1 - src/helpers.ts | 5 +-- src/ibc/applications/transfer/v1/genesis.ts | 3 +- src/ibc/applications/transfer/v1/query.ts | 5 +-- src/ibc/applications/transfer/v1/transfer.ts | 1 - src/ibc/applications/transfer/v1/tx.ts | 5 +-- src/ibc/applications/transfer/v2/packet.ts | 1 - src/ibc/core/channel/v1/channel.ts | 7 ++-- src/ibc/core/channel/v1/genesis.ts | 1 - src/ibc/core/channel/v1/query.ts | 33 ++++++++--------- src/ibc/core/channel/v1/tx.ts | 29 +++++++-------- src/ibc/core/client/v1/client.ts | 11 +++--- src/ibc/core/client/v1/genesis.ts | 3 +- src/ibc/core/client/v1/query.ts | 15 ++++---- src/ibc/core/client/v1/tx.ts | 13 +++---- src/ibc/core/commitment/v1/commitment.ts | 1 - src/ibc/core/connection/v1/connection.ts | 7 ++-- src/ibc/core/connection/v1/genesis.ts | 3 +- src/ibc/core/connection/v1/query.ts | 17 ++++----- src/ibc/core/connection/v1/tx.ts | 23 ++++++------ src/ibc/core/types/v1/genesis.ts | 7 ++-- .../lightclients/localhost/v1/localhost.ts | 3 +- .../solomachine/v1/solomachine.ts | 21 +++++------ .../lightclients/tendermint/v1/tendermint.ts | 29 +++++++-------- src/tendermint/abci/types.ts | 35 +++++++++--------- src/tendermint/crypto/keys.ts | 1 - src/tendermint/crypto/proof.ts | 3 +- src/tendermint/p2p/types.ts | 5 +-- src/tendermint/types/block.ts | 9 ++--- src/tendermint/types/evidence.ts | 11 +++--- src/tendermint/types/params.ts | 11 +++--- src/tendermint/types/types.ts | 37 +++++++++---------- src/tendermint/types/validator.ts | 7 ++-- src/tendermint/version/types.ts | 1 - 115 files changed, 339 insertions(+), 451 deletions(-) diff --git a/package.json b/package.json index 073458bb..204b635c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "0.5.1", "description": "JS and TS types relating to Protocol Buffers used by Cosmos-SDK and other related projects", "contributors": [ - "Will Clark " + "Will Clark ", + "Dan Lynch " ], "license": "Apache-2.0", "repository": { @@ -28,7 +29,7 @@ ], "scripts": { "format": "prettier --write --loglevel warn \"./src/**/*.ts\"", - "codegen": "rm -rf ./src && ./scripts/codegen.js && yarn format", + "codegen": "rm -rf ./src && ./scripts/codegen.js && npm run format", "prepare-publishing": "./scripts/prepare-publishing.sh", "build": "rm -rf ./build && tsc && npm run prepare-publishing" }, @@ -37,7 +38,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.53.0", + "@osmonauts/telescope": "^0.55.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 3d61eb50..97762aab 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -14,7 +14,7 @@ telescope({ options: { useSDKTypes: false, tsDisable: { - disableAll: true + disableAll: false }, eslintDisable: { disableAll: true @@ -64,4 +64,4 @@ telescope({ }, (e) => { console.error(e); process.exit(1); -}); \ No newline at end of file +}); diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index faa832cf..ffe1f9e4 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; @@ -211,7 +210,7 @@ export function lengthOpToJSON(object: LengthOp): string { export interface ExistenceProof { key: Uint8Array; value: Uint8Array; - leaf: LeafOp; + leaf?: LeafOp; path: InnerOp[]; } /** @@ -223,8 +222,8 @@ export interface ExistenceProof { export interface NonExistenceProof { /** TODO: remove this as unnecessary??? we prove a range */ key: Uint8Array; - left: ExistenceProof; - right: ExistenceProof; + left?: ExistenceProof; + right?: ExistenceProof; } /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */ @@ -304,8 +303,8 @@ 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; - innerSpec: InnerSpec; + leafSpec?: LeafOp; + innerSpec?: InnerSpec; /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */ maxDepth: number; @@ -365,7 +364,7 @@ export interface CompressedBatchEntry { export interface CompressedExistenceProof { key: Uint8Array; value: Uint8Array; - leaf: LeafOp; + leaf?: LeafOp; /** these are indexes into the lookup_inners table in CompressedBatchProof */ path: number[]; @@ -373,8 +372,8 @@ export interface CompressedExistenceProof { export interface CompressedNonExistenceProof { /** TODO: remove this as unnecessary??? we prove a range */ key: Uint8Array; - left: CompressedExistenceProof; - right: CompressedExistenceProof; + left?: CompressedExistenceProof; + right?: CompressedExistenceProof; } function createBaseExistenceProof(): ExistenceProof { diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index cfcf09a6..7c189c07 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; @@ -12,14 +11,14 @@ export const protobufPackage = "cosmos.auth.v1beta1"; export interface BaseAccount { address: string; - pubKey: Any; + pubKey?: Any; accountNumber: Long; sequence: Long; } /** ModuleAccount defines an account for modules that holds coins on a pool. */ export interface ModuleAccount { - baseAccount: BaseAccount; + baseAccount?: BaseAccount; name: string; permissions: string[]; } diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 733c0565..e167d9c7 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; @@ -9,7 +8,7 @@ export const protobufPackage = "cosmos.auth.v1beta1"; export interface GenesisState { /** params defines all the paramaters of the module. */ - params: Params; + params?: Params; /** accounts are the accounts present at genesis. */ accounts: Any[]; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 9a85d3c9..2626ba2b 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; @@ -39,7 +38,7 @@ export interface QueryAccountRequest { export interface QueryAccountResponse { /** account defines the account of the corresponding address. */ - account: Any; + account?: Any; } /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -48,7 +47,7 @@ export interface QueryParamsRequest {} export interface QueryParamsResponse { /** params defines the parameters of the module. */ - params: Params; + params?: Params; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index f95920b7..8a3ad8a0 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; @@ -20,8 +19,8 @@ export interface GenericAuthorization { */ export interface Grant { - authorization: Any; - expiration: Timestamp; + authorization?: Any; + expiration?: Timestamp; } /** * GrantAuthorization extends a grant with both the addresses of the grantee and granter. @@ -33,8 +32,8 @@ export interface Grant { export interface GrantAuthorization { granter: string; grantee: string; - authorization: Any; - expiration: Timestamp; + authorization?: Any; + expiration?: Timestamp; } function createBaseGenericAuthorization(): GenericAuthorization { diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index ec5d3a5f..72ac8771 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index dfa720cf..04a7984f 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index f0afa78c..9071ecc8 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; @@ -13,7 +12,7 @@ export const protobufPackage = "cosmos.authz.v1beta1"; export interface MsgGrant { granter: string; grantee: string; - grant: Grant; + grant?: Grant; } /** MsgExecResponse defines the Msg/MsgExecResponse response type. */ diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index b61ae105..9eb22de7 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 278208a0..24ee7489 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index 86c58b91..70766eef 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; @@ -9,7 +8,7 @@ export const protobufPackage = "cosmos.bank.v1beta1"; export interface GenesisState { /** params defines all the paramaters of the module. */ - params: Params; + params?: Params; /** balances is an array containing the balances of all the accounts. */ balances: Balance[]; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 34fb7a95..973a87f3 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; @@ -19,7 +18,7 @@ export interface QueryBalanceRequest { export interface QueryBalanceResponse { /** balance is the balance of the coin. */ - balance: Coin; + balance?: Coin; } /** QueryBalanceRequest is the request type for the Query/AllBalances RPC method. */ @@ -105,7 +104,7 @@ export interface QuerySupplyOfRequest { export interface QuerySupplyOfResponse { /** amount is the supply of the coin. */ - amount: Coin; + amount?: Coin; } /** QueryParamsRequest defines the request type for querying x/bank parameters. */ @@ -113,7 +112,7 @@ export interface QueryParamsRequest {} /** QueryParamsResponse defines the response type for querying x/bank parameters. */ export interface QueryParamsResponse { - params: Params; + params?: Params; } /** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */ @@ -146,7 +145,7 @@ export interface QueryDenomMetadataRequest { export interface QueryDenomMetadataResponse { /** metadata describes and provides all the client information for the requested token. */ - metadata: Metadata; + metadata?: Metadata; } function createBaseQueryBalanceRequest(): QueryBalanceRequest { diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 4beb0925..5f8823f5 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index f74f9798..332aee17 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; @@ -45,7 +44,7 @@ export interface TxResponse { gasUsed: Long; /** The request transaction bytes. */ - tx: Any; + tx?: Any; /** * 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, @@ -127,8 +126,8 @@ export interface Result { */ export interface SimulationResponse { - gasInfo: GasInfo; - result: Result; + gasInfo?: GasInfo; + result?: Result; } /** * MsgData defines the data returned in a Result object during message diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index 7751aa40..c6e9c045 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 9109ff39..93c14e80 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 14ea6f61..74820ddb 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index c213f4f5..d2422aa7 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; @@ -10,7 +9,7 @@ export interface Snapshot { format: number; chunks: number; hash: Uint8Array; - metadata: Metadata; + metadata?: Metadata; } /** Metadata contains SDK-specific snapshot metadata. */ diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index a54f2524..78009abc 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; @@ -19,7 +18,7 @@ export interface CommitInfo { export interface StoreInfo { name: string; - commitId: CommitID; + commitId?: CommitID; } /** * CommitID defines the committment information when a specific store is diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index fb494237..245d4e26 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 5c32497b..d76843e6 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 5bcae9b8..9b18f02c 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; @@ -44,7 +43,7 @@ export interface GetLatestValidatorSetResponse { export interface Validator { address: string; - pubKey: Any; + pubKey?: Any; votingPower: Long; proposerPriority: Long; } @@ -56,8 +55,8 @@ export interface GetBlockByHeightRequest { /** GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. */ export interface GetBlockByHeightResponse { - blockId: BlockID; - block: Block; + blockId?: BlockID; + block?: Block; } /** GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. */ @@ -65,8 +64,8 @@ export interface GetLatestBlockRequest {} /** GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. */ export interface GetLatestBlockResponse { - blockId: BlockID; - block: Block; + blockId?: BlockID; + block?: Block; } /** GetSyncingRequest is the request type for the Query/GetSyncing RPC method. */ @@ -82,8 +81,8 @@ export interface GetNodeInfoRequest {} /** GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. */ export interface GetNodeInfoResponse { - defaultNodeInfo: DefaultNodeInfo; - applicationVersion: VersionInfo; + defaultNodeInfo?: DefaultNodeInfo; + applicationVersion?: VersionInfo; } /** VersionInfo is the type for the GetNodeInfoResponse message. */ diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index c111ef98..25a1eaee 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index df39bfe3..87575e04 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 8ebe510f..14aa860a 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; @@ -11,7 +10,7 @@ export interface GenesisOwners { index: Long; /** index_owners are the owners at the given index. */ - indexOwners: CapabilityOwners; + indexOwners?: CapabilityOwners; } /** GenesisState defines the capability module's genesis state. */ diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index c441fdf0..5b6d4edf 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; @@ -11,7 +10,7 @@ export interface GenesisState { * constant_fee is the fee used to verify the invariant in the crisis * module. */ - constantFee: Coin; + constantFee?: Coin; } function createBaseGenesisState(): GenesisState { diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index a35456b7..1edc3dd1 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index 5d91bf77..d3b3b7aa 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index bf5fce2e..69404109 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 78cf2176..d8fea648 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index f09457fe..e15d3612 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 462786d4..07ee82f8 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index d07e6279..1306cfd5 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { DecCoin } from "../../base/v1beta1/coin"; import { @@ -45,7 +44,7 @@ export interface ValidatorAccumulatedCommissionRecord { validatorAddress: string; /** accumulated is the accumulated commission of a validator. */ - accumulated: ValidatorAccumulatedCommission; + accumulated?: ValidatorAccumulatedCommission; } /** * ValidatorHistoricalRewardsRecord is used for import / export via genesis @@ -60,7 +59,7 @@ export interface ValidatorHistoricalRewardsRecord { period: Long; /** rewards defines the historical rewards of a validator. */ - rewards: ValidatorHistoricalRewards; + rewards?: ValidatorHistoricalRewards; } /** ValidatorCurrentRewardsRecord is used for import / export via genesis json. */ @@ -69,7 +68,7 @@ export interface ValidatorCurrentRewardsRecord { validatorAddress: string; /** rewards defines the current rewards of a validator. */ - rewards: ValidatorCurrentRewards; + rewards?: ValidatorCurrentRewards; } /** DelegatorStartingInfoRecord used for import / export via genesis json. */ @@ -81,7 +80,7 @@ export interface DelegatorStartingInfoRecord { validatorAddress: string; /** starting_info defines the starting info of a delegator. */ - startingInfo: DelegatorStartingInfo; + startingInfo?: DelegatorStartingInfo; } /** ValidatorSlashEventRecord is used for import / export via genesis json. */ @@ -96,16 +95,16 @@ export interface ValidatorSlashEventRecord { period: Long; /** validator_slash_event describes the slash event. */ - validatorSlashEvent: ValidatorSlashEvent; + validatorSlashEvent?: ValidatorSlashEvent; } /** GenesisState defines the distribution module's genesis state. */ export interface GenesisState { /** params defines all the paramaters of the module. */ - params: Params; + params?: Params; /** fee_pool defines the fee pool at genesis. */ - feePool: FeePool; + feePool?: FeePool; /** fee_pool defines the delegator withdraw infos at genesis. */ delegatorWithdrawInfos: DelegatorWithdrawInfo[]; diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index eaee4db4..49bdc7f4 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { @@ -19,7 +18,7 @@ export interface QueryParamsRequest {} export interface QueryParamsResponse { /** params defines the parameters of the module. */ - params: Params; + params?: Params; } /** * QueryValidatorOutstandingRewardsRequest is the request type for the @@ -36,7 +35,7 @@ export interface QueryValidatorOutstandingRewardsRequest { */ export interface QueryValidatorOutstandingRewardsResponse { - rewards: ValidatorOutstandingRewards; + rewards?: ValidatorOutstandingRewards; } /** * QueryValidatorCommissionRequest is the request type for the @@ -54,7 +53,7 @@ export interface QueryValidatorCommissionRequest { export interface QueryValidatorCommissionResponse { /** commission defines the commision the validator received. */ - commission: ValidatorAccumulatedCommission; + commission?: ValidatorAccumulatedCommission; } /** * QueryValidatorSlashesRequest is the request type for the diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index a39d2de4..62b84e9b 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index b125189d..e20b1ddc 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; @@ -11,7 +10,7 @@ export const protobufPackage = "cosmos.evidence.v1beta1"; export interface Equivocation { height: Long; - time: Timestamp; + time?: Timestamp; power: Long; consensusAddress: string; } diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index 5794e677..d5e26fbc 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 2e1d5cc1..6d9c0b44 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; @@ -15,7 +14,7 @@ export interface QueryEvidenceRequest { export interface QueryEvidenceResponse { /** evidence returns the requested evidence. */ - evidence: Any; + evidence?: Any; } /** * QueryEvidenceRequest is the request type for the Query/AllEvidence RPC diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 10580dc4..cc6a4b31 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; @@ -11,7 +10,7 @@ export const protobufPackage = "cosmos.evidence.v1beta1"; export interface MsgSubmitEvidence { submitter: string; - evidence: Any; + evidence?: Any; } /** MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. */ diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index 50ac9cd8..39e9866f 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; @@ -21,7 +20,7 @@ export interface BasicAllowance { spendLimit: Coin[]; /** expiration specifies an optional time when this allowance expires */ - expiration: Timestamp; + expiration?: Timestamp; } /** * PeriodicAllowance extends Allowance to allow for both a maximum cap, @@ -30,13 +29,13 @@ export interface BasicAllowance { export interface PeriodicAllowance { /** basic specifies a struct of `BasicAllowance` */ - basic: BasicAllowance; + basic?: BasicAllowance; /** * period specifies the time duration in which period_spend_limit coins can * be spent before that allowance is reset */ - period: Duration; + period?: Duration; /** * period_spend_limit specifies the maximum number of coins that can be spent * in the period @@ -52,13 +51,13 @@ export interface PeriodicAllowance { * last period ended */ - periodReset: Timestamp; + periodReset?: Timestamp; } /** AllowedMsgAllowance creates allowance only for specified message types. */ export interface AllowedMsgAllowance { /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any; + allowance?: Any; /** allowed_messages are the messages for which the grantee has the access. */ allowedMessages: string[]; @@ -73,7 +72,7 @@ export interface Grant { grantee: string; /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any; + allowance?: Any; } function createBaseBasicAllowance(): BasicAllowance { diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 0a28e052..35ab4b27 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 75fdea9c..6a0df834 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; @@ -18,7 +17,7 @@ export interface QueryAllowanceRequest { export interface QueryAllowanceResponse { /** allowance is a allowance granted for grantee by granter. */ - allowance: Grant; + allowance?: Grant; } /** QueryAllowancesRequest is the request type for the Query/Allowances RPC method. */ diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index 4d8809a0..828c1c05 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; @@ -17,7 +16,7 @@ export interface MsgGrantAllowance { grantee: string; /** allowance can be any of basic and filtered fee allowance. */ - allowance: Any; + allowance?: Any; } /** MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. */ diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 4b35676c..24e0b6ad 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index 5b80d2ea..fa7da1d9 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; @@ -20,13 +19,13 @@ export interface GenesisState { proposals: Proposal[]; /** params defines all the paramaters of related to deposit. */ - depositParams: DepositParams; + depositParams?: DepositParams; /** params defines all the paramaters of related to voting. */ - votingParams: VotingParams; + votingParams?: VotingParams; /** params defines all the paramaters of related to tally. */ - tallyParams: TallyParams; + tallyParams?: TallyParams; } function createBaseGenesisState(): GenesisState { diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index ecb17c8a..4dd490bc 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; @@ -212,14 +211,14 @@ export interface Deposit { export interface Proposal { proposalId: Long; - content: Any; + content?: Any; status: ProposalStatus; - finalTallyResult: TallyResult; - submitTime: Timestamp; - depositEndTime: Timestamp; + finalTallyResult?: TallyResult; + submitTime?: Timestamp; + depositEndTime?: Timestamp; totalDeposit: Coin[]; - votingStartTime: Timestamp; - votingEndTime: Timestamp; + votingStartTime?: Timestamp; + votingEndTime?: Timestamp; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -260,13 +259,13 @@ export interface DepositParams { * months. */ - maxDepositPeriod: Duration; + maxDepositPeriod?: Duration; } /** VotingParams defines the params for voting on governance proposals. */ export interface VotingParams { /** Length of the voting period. */ - votingPeriod: Duration; + votingPeriod?: Duration; } /** TallyParams defines the params for tallying votes on governance proposals. */ diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 4e18206d..23713ba3 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { ProposalStatus, @@ -25,7 +24,7 @@ export interface QueryProposalRequest { /** QueryProposalResponse is the response type for the Query/Proposal RPC method. */ export interface QueryProposalResponse { - proposal: Proposal; + proposal?: Proposal; } /** QueryProposalsRequest is the request type for the Query/Proposals RPC method. */ @@ -66,7 +65,7 @@ export interface QueryVoteRequest { export interface QueryVoteResponse { /** vote defined the queried vote. */ - vote: Vote; + vote?: Vote; } /** QueryVotesRequest is the request type for the Query/Votes RPC method. */ @@ -99,13 +98,13 @@ export interface QueryParamsRequest { export interface QueryParamsResponse { /** voting_params defines the parameters related to voting. */ - votingParams: VotingParams; + votingParams?: VotingParams; /** deposit_params defines the parameters related to deposit. */ - depositParams: DepositParams; + depositParams?: DepositParams; /** tally_params defines the parameters related to tally. */ - tallyParams: TallyParams; + tallyParams?: TallyParams; } /** QueryDepositRequest is the request type for the Query/Deposit RPC method. */ @@ -120,7 +119,7 @@ export interface QueryDepositRequest { export interface QueryDepositResponse { /** deposit defines the requested deposit. */ - deposit: Deposit; + deposit?: Deposit; } /** QueryDepositsRequest is the request type for the Query/Deposits RPC method. */ @@ -149,7 +148,7 @@ export interface QueryTallyResultRequest { export interface QueryTallyResultResponse { /** tally defines the requested tally. */ - tally: TallyResult; + tally?: TallyResult; } function createBaseQueryProposalRequest(): QueryProposalRequest { diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index 40b1094c..f732e3b4 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; @@ -12,7 +11,7 @@ export const protobufPackage = "cosmos.gov.v1beta1"; */ export interface MsgSubmitProposal { - content: Any; + content?: Any; initialDeposit: Coin[]; proposer: string; } diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 293e4990..6703ade5 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; @@ -8,10 +7,10 @@ export const protobufPackage = "cosmos.mint.v1beta1"; export interface GenesisState { /** minter is a space for holding current inflation information. */ - minter: Minter; + minter?: Minter; /** params defines all the paramaters of the module. */ - params: Params; + params?: Params; } function createBaseGenesisState(): GenesisState { diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index a1b084f8..e48598ba 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index cbea87fd..dc4c07fb 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; @@ -11,7 +10,7 @@ export interface QueryParamsRequest {} export interface QueryParamsResponse { /** params defines the parameters of the module. */ - params: Params; + params?: Params; } /** QueryInflationRequest is the request type for the Query/Inflation RPC method. */ diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index 07deeaad..d5f58d05 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index f6417800..e703786f 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; @@ -17,7 +16,7 @@ export interface QueryParamsRequest { export interface QueryParamsResponse { /** param defines the queried parameter. */ - param: ParamChange; + param?: ParamChange; } function createBaseQueryParamsRequest(): QueryParamsRequest { diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index 5148ba1e..c07ebb1b 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; @@ -8,7 +7,7 @@ export const protobufPackage = "cosmos.slashing.v1beta1"; export interface GenesisState { /** params defines all the paramaters of related to deposit. */ - params: Params; + params?: Params; /** * signing_infos represents a map between validator addresses and their * signing infos. @@ -29,7 +28,7 @@ export interface SigningInfo { address: string; /** validator_signing_info represents the signing info of this validator. */ - validatorSigningInfo: ValidatorSigningInfo; + validatorSigningInfo?: ValidatorSigningInfo; } /** * ValidatorMissedBlocks contains array of missed blocks of corresponding diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 0eaf636f..5e1387e5 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; @@ -11,7 +10,7 @@ export interface QueryParamsRequest {} /** QueryParamsResponse is the response type for the Query/Params RPC method */ export interface QueryParamsResponse { - params: Params; + params?: Params; } /** * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC @@ -29,7 +28,7 @@ export interface QuerySigningInfoRequest { export interface QuerySigningInfoResponse { /** val_signing_info is the signing info of requested val cons address */ - valSigningInfo: ValidatorSigningInfo; + valSigningInfo?: ValidatorSigningInfo; } /** * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 85c5f47f..3315ded2 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; @@ -33,7 +32,7 @@ export interface ValidatorSigningInfo { indexOffset: Long; /** Timestamp until which the validator is jailed due to liveness downtime. */ - jailedUntil: Timestamp; + jailedUntil?: Timestamp; /** * Whether or not a validator has been tombstoned (killed out of validator set). It is set * once the validator commits an equivocation or for any other configured misbehiavor. @@ -52,7 +51,7 @@ export interface ValidatorSigningInfo { export interface Params { signedBlocksWindow: Long; minSignedPerWindow: Uint8Array; - downtimeJailDuration: Duration; + downtimeJailDuration?: Duration; slashFractionDoubleSign: Uint8Array; slashFractionDowntime: Uint8Array; } diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 80678571..e665505f 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 2017145c..1d91155d 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; @@ -78,7 +77,7 @@ export interface StakeAuthorization { * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is * empty, there is no spend limit and any amount of coins can be delegated. */ - maxTokens: Coin; + maxTokens?: Coin; /** * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's * account. diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 00e64641..3bc8a9c5 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; @@ -8,7 +7,7 @@ export const protobufPackage = "cosmos.staking.v1beta1"; export interface GenesisState { /** params defines all the paramaters of related to deposit. */ - params: Params; + params?: Params; /** * last_total_power tracks the total amounts of bonded tokens recorded during * the previous end block. diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index cf04bad8..abe7aa62 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { @@ -41,7 +40,7 @@ export interface QueryValidatorRequest { export interface QueryValidatorResponse { /** validator defines the the validator info. */ - validator: Validator; + validator?: Validator; } /** * QueryValidatorDelegationsRequest is request type for the @@ -102,7 +101,7 @@ export interface QueryDelegationRequest { export interface QueryDelegationResponse { /** delegation_responses defines the delegation info of a delegation. */ - delegationResponse: DelegationResponse; + delegationResponse?: DelegationResponse; } /** * QueryUnbondingDelegationRequest is request type for the @@ -123,7 +122,7 @@ export interface QueryUnbondingDelegationRequest { export interface QueryUnbondingDelegationResponse { /** unbond defines the unbonding information of a delegation. */ - unbond: UnbondingDelegation; + unbond?: UnbondingDelegation; } /** * QueryDelegatorDelegationsRequest is request type for the @@ -244,7 +243,7 @@ export interface QueryDelegatorValidatorRequest { export interface QueryDelegatorValidatorResponse { /** validator defines the the validator info. */ - validator: Validator; + validator?: Validator; } /** * QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC @@ -262,7 +261,7 @@ export interface QueryHistoricalInfoRequest { export interface QueryHistoricalInfoResponse { /** hist defines the historical info at the given height. */ - hist: HistoricalInfo; + hist?: HistoricalInfo; } /** QueryPoolRequest is request type for the Query/Pool RPC method. */ @@ -271,7 +270,7 @@ export interface QueryPoolRequest {} export interface QueryPoolResponse { /** pool defines the pool info. */ - pool: Pool; + pool?: Pool; } /** QueryParamsRequest is request type for the Query/Params RPC method. */ @@ -280,7 +279,7 @@ export interface QueryParamsRequest {} export interface QueryParamsResponse { /** params holds all the parameters of this module. */ - params: Params; + params?: Params; } function createBaseQueryValidatorsRequest(): QueryValidatorsRequest { diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index f05828a8..b2a1fba2 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Header } from "../../../tendermint/types/types"; import { Timestamp } from "../../../google/protobuf/timestamp"; @@ -75,7 +74,7 @@ export function bondStatusToJSON(object: BondStatus): string { */ export interface HistoricalInfo { - header: Header; + header?: Header; valset: Validator[]; } /** @@ -97,10 +96,10 @@ export interface CommissionRates { export interface Commission { /** commission_rates defines the initial commission rates to be used for creating a validator. */ - commissionRates: CommissionRates; + commissionRates?: CommissionRates; /** update_time is the last time the commission rate was changed. */ - updateTime: Timestamp; + updateTime?: Timestamp; } /** Description defines a validator description. */ @@ -136,7 +135,7 @@ export interface Validator { operatorAddress: string; /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ - consensusPubkey: Any; + consensusPubkey?: Any; /** jailed defined whether the validator has been jailed from bonded status or not. */ jailed: boolean; @@ -151,16 +150,16 @@ export interface Validator { delegatorShares: string; /** description defines the description terms for the validator. */ - description: Description; + description?: Description; /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */ unbondingHeight: Long; /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */ - unbondingTime: Timestamp; + unbondingTime?: Timestamp; /** commission defines the commission parameters. */ - commission: Commission; + commission?: Commission; /** min_self_delegation is the validator's self declared minimum self delegation. */ minSelfDelegation: string; @@ -240,7 +239,7 @@ export interface UnbondingDelegationEntry { creationHeight: Long; /** completion_time is the unix time for unbonding completion. */ - completionTime: Timestamp; + completionTime?: Timestamp; /** initial_balance defines the tokens initially scheduled to receive at completion. */ initialBalance: string; @@ -255,7 +254,7 @@ export interface RedelegationEntry { creationHeight: Long; /** completion_time defines the unix time for redelegation completion. */ - completionTime: Timestamp; + completionTime?: Timestamp; /** initial_balance defines the initial balance when redelegation started. */ initialBalance: string; @@ -285,7 +284,7 @@ export interface Redelegation { export interface Params { /** unbonding_time is the time duration of unbonding. */ - unbondingTime: Duration; + unbondingTime?: Duration; /** max_validators is the maximum number of validators. */ maxValidators: number; @@ -305,8 +304,8 @@ export interface Params { */ export interface DelegationResponse { - delegation: Delegation; - balance: Coin; + delegation?: Delegation; + balance?: Coin; } /** * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it @@ -315,7 +314,7 @@ export interface DelegationResponse { */ export interface RedelegationEntryResponse { - redelegationEntry: RedelegationEntry; + redelegationEntry?: RedelegationEntry; balance: string; } /** @@ -325,7 +324,7 @@ export interface RedelegationEntryResponse { */ export interface RedelegationResponse { - redelegation: Redelegation; + redelegation?: Redelegation; entries: RedelegationEntryResponse[]; } /** diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 54d0b3e6..70191e45 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; @@ -10,13 +9,13 @@ export const protobufPackage = "cosmos.staking.v1beta1"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ export interface MsgCreateValidator { - description: Description; - commission: CommissionRates; + description?: Description; + commission?: CommissionRates; minSelfDelegation: string; delegatorAddress: string; validatorAddress: string; - pubkey: Any; - value: Coin; + pubkey?: Any; + value?: Coin; } /** MsgCreateValidatorResponse defines the Msg/CreateValidator response type. */ @@ -24,7 +23,7 @@ export interface MsgCreateValidatorResponse {} /** MsgEditValidator defines a SDK message for editing an existing validator. */ export interface MsgEditValidator { - description: Description; + description?: Description; validatorAddress: string; /** * We pass a reference to the new commission rate and min self delegation as @@ -47,7 +46,7 @@ export interface MsgEditValidatorResponse {} export interface MsgDelegate { delegatorAddress: string; validatorAddress: string; - amount: Coin; + amount?: Coin; } /** MsgDelegateResponse defines the Msg/Delegate response type. */ @@ -61,12 +60,12 @@ export interface MsgBeginRedelegate { delegatorAddress: string; validatorSrcAddress: string; validatorDstAddress: string; - amount: Coin; + amount?: Coin; } /** MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. */ export interface MsgBeginRedelegateResponse { - completionTime: Timestamp; + completionTime?: Timestamp; } /** * MsgUndelegate defines a SDK message for performing an undelegation from a @@ -76,12 +75,12 @@ export interface MsgBeginRedelegateResponse { export interface MsgUndelegate { delegatorAddress: string; validatorAddress: string; - amount: Coin; + amount?: Coin; } /** MsgUndelegateResponse defines the Msg/Undelegate response type. */ export interface MsgUndelegateResponse { - completionTime: Timestamp; + completionTime?: Timestamp; } function createBaseMsgCreateValidator(): MsgCreateValidator { diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 4d04a73a..e620a02a 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; @@ -113,8 +112,8 @@ export interface SignatureDescriptors { export interface SignatureDescriptor { /** public_key is the public key of the signer */ - publicKey: Any; - data: SignatureDescriptor_Data; + publicKey?: Any; + data?: SignatureDescriptor_Data; /** * sequence is the sequence of the account, which describes the * number of committed transactions signed by a given address. It is used to prevent @@ -145,7 +144,7 @@ export interface SignatureDescriptor_Data_Single { export interface SignatureDescriptor_Data_Multi { /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray; + bitarray?: CompactBitArray; /** signatures is the signatures of the multi-signature */ signatures: SignatureDescriptor_Data[]; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 7db99b5f..3a2450fb 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; @@ -170,7 +169,7 @@ export interface BroadcastTxRequest { export interface BroadcastTxResponse { /** tx_response is the queried TxResponses. */ - txResponse: TxResponse; + txResponse?: TxResponse; } /** * SimulateRequest is the request type for the Service.Simulate @@ -184,7 +183,7 @@ export interface SimulateRequest { */ /** @deprecated */ - tx: Tx; + tx?: Tx; /** * tx_bytes is the raw transaction. * @@ -200,10 +199,10 @@ export interface SimulateRequest { export interface SimulateResponse { /** gas_info is the information about gas used in the simulation. */ - gasInfo: GasInfo; + gasInfo?: GasInfo; /** result is the result of the simulation. */ - result: Result; + result?: Result; } /** * GetTxRequest is the request type for the Service.GetTx @@ -218,10 +217,10 @@ export interface GetTxRequest { export interface GetTxResponse { /** tx is the queried transaction. */ - tx: Tx; + tx?: Tx; /** tx_response is the queried TxResponses. */ - txResponse: TxResponse; + txResponse?: TxResponse; } /** * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs @@ -246,8 +245,8 @@ export interface GetBlockWithTxsRequest { export interface GetBlockWithTxsResponse { /** txs are the transactions in the block. */ txs: Tx[]; - blockId: BlockID; - block: Block; + blockId?: BlockID; + block?: Block; /** pagination defines a pagination for the response. */ pagination?: PageResponse; diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 3c14088a..70b08f6d 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; @@ -11,13 +10,13 @@ export const protobufPackage = "cosmos.tx.v1beta1"; export interface Tx { /** body is the processable content of the transaction */ - body: TxBody; + body?: TxBody; /** * auth_info is the authorization related content of the transaction, * specifically signers, signer modes and fee */ - authInfo: AuthInfo; + authInfo?: AuthInfo; /** * signatures is a list of signatures that matches the length and order of * AuthInfo's signer_infos to allow connecting signature meta information like @@ -140,7 +139,7 @@ export interface AuthInfo { * of the signers. This can be estimated via simulation. */ - fee: Fee; + fee?: Fee; } /** * SignerInfo describes the public key and signing mode of a single top-level @@ -153,13 +152,13 @@ export interface SignerInfo { * that already exist in state. If unset, the verifier can use the required \ * signer address for this position and lookup the public key. */ - publicKey: Any; + publicKey?: Any; /** * mode_info describes the signing mode of the signer and is a nested * structure to support nested multisig pubkey's */ - modeInfo: ModeInfo; + modeInfo?: ModeInfo; /** * sequence is the sequence of the account, which describes the * number of committed transactions signed by a given address. It is used to @@ -191,7 +190,7 @@ export interface ModeInfo_Single { export interface ModeInfo_Multi { /** bitarray specifies which keys within the multisig are signing */ - bitarray: CompactBitArray; + bitarray?: CompactBitArray; /** * mode_infos is the corresponding modes of the signers of the multisig * which could include nested multisig public keys diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index 168b8c98..ee465660 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; @@ -17,7 +16,7 @@ export interface QueryCurrentPlanRequest {} export interface QueryCurrentPlanResponse { /** plan is the current upgrade plan. */ - plan: Plan; + plan?: Plan; } /** * QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index e9211d56..eaf766bc 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; @@ -26,7 +25,7 @@ export interface Plan { /** @deprecated */ - time: Timestamp; + time?: Timestamp; /** * The height at which the upgrade must be performed. * Only used if Time is not set. @@ -47,7 +46,7 @@ export interface Plan { /** @deprecated */ - upgradedClientState: Any; + upgradedClientState?: Any; } /** * SoftwareUpgradeProposal is a gov Content type for initiating a software @@ -57,7 +56,7 @@ export interface Plan { export interface SoftwareUpgradeProposal { title: string; description: string; - plan: Plan; + plan?: Plan; } /** * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 2e62ae5c..9a43c7e4 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index 859132ea..d9d09a32 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; @@ -11,7 +10,7 @@ export const protobufPackage = "cosmos.vesting.v1beta1"; */ export interface BaseVestingAccount { - baseAccount: BaseAccount; + baseAccount?: BaseAccount; originalVesting: Coin[]; delegatedFree: Coin[]; delegatedVesting: Coin[]; @@ -23,7 +22,7 @@ export interface BaseVestingAccount { */ export interface ContinuousVestingAccount { - baseVestingAccount: BaseVestingAccount; + baseVestingAccount?: BaseVestingAccount; startTime: Long; } /** @@ -33,7 +32,7 @@ export interface ContinuousVestingAccount { */ export interface DelayedVestingAccount { - baseVestingAccount: BaseVestingAccount; + baseVestingAccount?: BaseVestingAccount; } /** Period defines a length of time and amount of coins that will vest. */ @@ -47,7 +46,7 @@ export interface Period { */ export interface PeriodicVestingAccount { - baseVestingAccount: BaseVestingAccount; + baseVestingAccount?: BaseVestingAccount; startTime: Long; vestingPeriods: Period[]; } @@ -60,7 +59,7 @@ export interface PeriodicVestingAccount { */ export interface PermanentLockedAccount { - baseVestingAccount: BaseVestingAccount; + baseVestingAccount?: BaseVestingAccount; } function createBaseBaseVestingAccount(): BaseVestingAccount { diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index 4f396261..e86ed05c 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; @@ -8,7 +7,7 @@ export const protobufPackage = "cosmwasm.wasm.v1"; /** GenesisState - genesis state of x/wasm */ export interface GenesisState { - params: Params; + params?: Params; codes: Code[]; contracts: Contract[]; sequences: Sequence[]; @@ -28,7 +27,7 @@ export interface GenesisState_GenMsgs { export interface Code { codeId: Long; - codeInfo: CodeInfo; + codeInfo?: CodeInfo; codeBytes: Uint8Array; /** Pinned to wasmvm cache */ @@ -38,7 +37,7 @@ export interface Code { export interface Contract { contractAddress: string; - contractInfo: ContractInfo; + contractInfo?: ContractInfo; contractState: Model[]; } /** Sequence key and value of an id generation counter */ diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index c6505e0a..0e6424ac 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 795f1cc0..e708bfa6 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; @@ -21,7 +20,7 @@ export interface StoreCodeProposal { wasmByteCode: Uint8Array; /** InstantiatePermission to apply on contract creation, optional */ - instantiatePermission: AccessConfig; + instantiatePermission?: AccessConfig; } /** * InstantiateContractProposal gov proposal content type to instantiate a diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 61d071c3..51682ddf 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model } from "./types"; @@ -22,7 +21,7 @@ export interface QueryContractInfoRequest { export interface QueryContractInfoResponse { /** address is the address of the contract */ address: string; - contractInfo: ContractInfo; + contractInfo?: ContractInfo; } /** * QueryContractHistoryRequest is the request type for the Query/ContractHistory @@ -151,7 +150,7 @@ export interface CodeInfoResponse { /** QueryCodeResponse is the response type for the Query/Code RPC method */ export interface QueryCodeResponse { - codeInfo: CodeInfoResponse; + codeInfo?: CodeInfoResponse; data: Uint8Array; } /** QueryCodesRequest is the request type for the Query/Codes RPC method */ diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index 7942524f..ec947638 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; @@ -18,7 +17,7 @@ export interface MsgStoreCode { * optional */ - instantiatePermission: AccessConfig; + instantiatePermission?: AccessConfig; } /** MsgStoreCodeResponse returns store result data. */ diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index f6466186..d2cc955a 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; @@ -136,7 +135,7 @@ export interface AccessConfig { /** Params defines the set of wasm parameters. */ export interface Params { - codeUploadAccess: AccessConfig; + codeUploadAccess?: AccessConfig; instantiateDefaultPermission: AccessType; maxWasmCodeSize: Long; } @@ -150,7 +149,7 @@ export interface CodeInfo { creator: string; /** InstantiateConfig access control to apply on contract creation, optional */ - instantiateConfig: AccessConfig; + instantiateConfig?: AccessConfig; } /** ContractInfo stores a WASM contract instance */ @@ -172,14 +171,14 @@ export interface ContractInfo { * use for sorting */ - created: AbsoluteTxPosition; + created?: AbsoluteTxPosition; ibcPortId: string; /** * Extension is an extension point to store custom metadata within the * persistence model. */ - extension: Any; + extension?: Any; } /** ContractCodeHistoryEntry metadata to a contract. */ @@ -190,7 +189,7 @@ export interface ContractCodeHistoryEntry { codeId: Long; /** Updated Tx position when the operation was executed. */ - updated: AbsoluteTxPosition; + updated?: AbsoluteTxPosition; msg: Uint8Array; } /** diff --git a/src/google/api/http.ts b/src/google/api/http.ts index 20526a16..a5c7bdf6 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 8b573384..429edd39 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 9c0e93ed..564134d1 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; @@ -461,7 +460,7 @@ export interface FileDescriptorProto { enumType: EnumDescriptorProto[]; service: ServiceDescriptorProto[]; extension: FieldDescriptorProto[]; - options: FileOptions; + options?: FileOptions; /** * This field contains optional information about the original source code. * You may safely remove this entire field without harming runtime @@ -469,7 +468,7 @@ export interface FileDescriptorProto { * development tools. */ - sourceCodeInfo: SourceCodeInfo; + sourceCodeInfo?: SourceCodeInfo; /** * The syntax of the proto file. * The supported values are "proto2" and "proto3". @@ -487,7 +486,7 @@ export interface DescriptorProto { enumType: EnumDescriptorProto[]; extensionRange: DescriptorProto_ExtensionRange[]; oneofDecl: OneofDescriptorProto[]; - options: MessageOptions; + options?: MessageOptions; reservedRange: DescriptorProto_ReservedRange[]; /** * Reserved field names, which may not be used by fields in the same message. @@ -502,7 +501,7 @@ export interface DescriptorProto_ExtensionRange { /** Exclusive. */ end: number; - options: ExtensionRangeOptions; + options?: ExtensionRangeOptions; } /** * Range of reserved tag numbers. Reserved tag numbers may not be used by @@ -571,20 +570,20 @@ export interface FieldDescriptorProto { */ jsonName: string; - options: FieldOptions; + options?: FieldOptions; } /** Describes a oneof. */ export interface OneofDescriptorProto { name: string; - options: OneofOptions; + options?: OneofOptions; } /** Describes an enum type. */ export interface EnumDescriptorProto { name: string; value: EnumValueDescriptorProto[]; - options: EnumOptions; + options?: EnumOptions; /** * Range of reserved numeric values. Reserved numeric values may not be used * by enum values in the same enum declaration. Reserved ranges may not @@ -620,14 +619,14 @@ export interface EnumDescriptorProto_EnumReservedRange { export interface EnumValueDescriptorProto { name: string; number: number; - options: EnumValueOptions; + options?: EnumValueOptions; } /** Describes a service. */ export interface ServiceDescriptorProto { name: string; method: MethodDescriptorProto[]; - options: ServiceOptions; + options?: ServiceOptions; } /** Describes a method of a service. */ @@ -640,7 +639,7 @@ export interface MethodDescriptorProto { inputType: string; outputType: string; - options: MethodOptions; + options?: MethodOptions; /** Identifies if client streams multiple client messages */ clientStreaming: boolean; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 75c515ee..4d2e7dd6 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index d37b1148..334db22b 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/helpers.ts b/src/helpers.ts index 94060404..ed524b8f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,13 +1,12 @@ -//@ts-nocheck /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.53.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.55.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ import * as _m0 from "protobufjs/minimal"; -import Long from "long"; +import * as Long from "long"; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index 4b250d3b..40ba8a05 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; @@ -9,7 +8,7 @@ export const protobufPackage = "ibc.applications.transfer.v1"; export interface GenesisState { portId: string; denomTraces: DenomTrace[]; - params: Params; + params?: Params; } function createBaseGenesisState(): GenesisState { diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index ce23c672..5f624c60 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; @@ -21,7 +20,7 @@ export interface QueryDenomTraceRequest { export interface QueryDenomTraceResponse { /** denom_trace returns the requested denomination trace information. */ - denomTrace: DenomTrace; + denomTrace?: DenomTrace; } /** * QueryConnectionsRequest is the request type for the Query/DenomTraces RPC @@ -51,7 +50,7 @@ export interface QueryParamsRequest {} export interface QueryParamsResponse { /** params defines the parameters of the module. */ - params: Params; + params?: Params; } function createBaseQueryDenomTraceRequest(): QueryDenomTraceRequest { diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index a199ac13..b6ef5e45 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index b63e8878..4a0f3630 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; @@ -19,7 +18,7 @@ export interface MsgTransfer { sourceChannel: string; /** the tokens to be transferred */ - token: Coin; + token?: Coin; /** the sender address */ sender: string; @@ -31,7 +30,7 @@ export interface MsgTransfer { * The timeout is disabled when set to 0. */ - timeoutHeight: Height; + timeoutHeight?: Height; /** * Timeout timestamp (in nanoseconds) relative to the current block timestamp. * The timeout is disabled when set to 0. diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index ab7b519e..7d27d7e2 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index 0274adb4..bd7ae4df 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; @@ -148,7 +147,7 @@ export interface Channel { ordering: Order; /** counterparty channel end */ - counterparty: Counterparty; + counterparty?: Counterparty; /** * list of connection identifiers, in order, along which packets sent on * this channel will travel @@ -172,7 +171,7 @@ export interface IdentifiedChannel { ordering: Order; /** counterparty channel end */ - counterparty: Counterparty; + counterparty?: Counterparty; /** * list of connection identifiers, in order, along which packets sent on * this channel will travel @@ -224,7 +223,7 @@ export interface Packet { data: Uint8Array; /** block height after which the packet times out */ - timeoutHeight: Height; + timeoutHeight?: Height; /** block timestamp (in nanoseconds) after which the packet times out */ timeoutTimestamp: Long; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 5e98b394..8d462562 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index adbd40e5..22c6b2e3 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; @@ -24,13 +23,13 @@ export interface QueryChannelRequest { export interface QueryChannelResponse { /** channel associated with the request identifiers */ - channel: Channel; + channel?: Channel; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** QueryChannelsRequest is the request type for the Query/Channels RPC method */ @@ -48,7 +47,7 @@ export interface QueryChannelsResponse { pagination?: PageResponse; /** query block height */ - height: Height; + height?: Height; } /** * QueryConnectionChannelsRequest is the request type for the @@ -75,7 +74,7 @@ export interface QueryConnectionChannelsResponse { pagination?: PageResponse; /** query block height */ - height: Height; + height?: Height; } /** * QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -96,13 +95,13 @@ export interface QueryChannelClientStateRequest { export interface QueryChannelClientStateResponse { /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState; + identifiedClientState?: IdentifiedClientState; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryChannelConsensusStateRequest is the request type for the @@ -129,7 +128,7 @@ export interface QueryChannelConsensusStateRequest { export interface QueryChannelConsensusStateResponse { /** consensus state associated with the channel */ - consensusState: Any; + consensusState?: Any; /** client ID associated with the consensus state */ clientId: string; @@ -138,7 +137,7 @@ export interface QueryChannelConsensusStateResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryPacketCommitmentRequest is the request type for the @@ -169,7 +168,7 @@ export interface QueryPacketCommitmentResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryPacketCommitmentsRequest is the request type for the @@ -198,7 +197,7 @@ export interface QueryPacketCommitmentsResponse { pagination?: PageResponse; /** query block height */ - height: Height; + height?: Height; } /** * QueryPacketReceiptRequest is the request type for the @@ -229,7 +228,7 @@ export interface QueryPacketReceiptResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryPacketAcknowledgementRequest is the request type for the @@ -260,7 +259,7 @@ export interface QueryPacketAcknowledgementResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryPacketAcknowledgementsRequest is the request type for the @@ -292,7 +291,7 @@ export interface QueryPacketAcknowledgementsResponse { pagination?: PageResponse; /** query block height */ - height: Height; + height?: Height; } /** * QueryUnreceivedPacketsRequest is the request type for the @@ -319,7 +318,7 @@ export interface QueryUnreceivedPacketsResponse { sequences: Long[]; /** query block height */ - height: Height; + height?: Height; } /** * QueryUnreceivedAcks is the request type for the @@ -346,7 +345,7 @@ export interface QueryUnreceivedAcksResponse { sequences: Long[]; /** query block height */ - height: Height; + height?: Height; } /** * QueryNextSequenceReceiveRequest is the request type for the @@ -373,7 +372,7 @@ export interface QueryNextSequenceReceiveResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } function createBaseQueryChannelRequest(): QueryChannelRequest { diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index 5e9d7614..4039b545 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; @@ -12,7 +11,7 @@ export const protobufPackage = "ibc.core.channel.v1"; export interface MsgChannelOpenInit { portId: string; - channel: Channel; + channel?: Channel; signer: string; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ @@ -31,10 +30,10 @@ export interface MsgChannelOpenTry { */ previousChannelId: string; - channel: Channel; + channel?: Channel; counterpartyVersion: string; proofInit: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ @@ -51,7 +50,7 @@ export interface MsgChannelOpenAck { counterpartyChannelId: string; counterpartyVersion: string; proofTry: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ @@ -66,7 +65,7 @@ export interface MsgChannelOpenConfirm { portId: string; channelId: string; proofAck: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** @@ -97,7 +96,7 @@ export interface MsgChannelCloseConfirm { portId: string; channelId: string; proofInit: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** @@ -109,9 +108,9 @@ export interface MsgChannelCloseConfirmResponse {} /** MsgRecvPacket receives incoming IBC packet */ export interface MsgRecvPacket { - packet: Packet; + packet?: Packet; proofCommitment: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ @@ -120,9 +119,9 @@ export interface MsgRecvPacketResponse {} /** MsgTimeout receives timed-out packet */ export interface MsgTimeout { - packet: Packet; + packet?: Packet; proofUnreceived: Uint8Array; - proofHeight: Height; + proofHeight?: Height; nextSequenceRecv: Long; signer: string; } @@ -132,10 +131,10 @@ export interface MsgTimeoutResponse {} /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ export interface MsgTimeoutOnClose { - packet: Packet; + packet?: Packet; proofUnreceived: Uint8Array; proofClose: Uint8Array; - proofHeight: Height; + proofHeight?: Height; nextSequenceRecv: Long; signer: string; } @@ -145,10 +144,10 @@ export interface MsgTimeoutOnCloseResponse {} /** MsgAcknowledgement receives incoming IBC acknowledgement */ export interface MsgAcknowledgement { - packet: Packet; + packet?: Packet; acknowledgement: Uint8Array; proofAcked: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 9820fbcd..f7dc4ed9 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; @@ -15,7 +14,7 @@ export interface IdentifiedClientState { clientId: string; /** client state */ - clientState: Any; + clientState?: Any; } /** * ConsensusStateWithHeight defines a consensus state with an additional height @@ -24,10 +23,10 @@ export interface IdentifiedClientState { export interface ConsensusStateWithHeight { /** consensus state height */ - height: Height; + height?: Height; /** consensus state */ - consensusState: Any; + consensusState?: Any; } /** * ClientConsensusStates defines all the stored consensus states for a given @@ -72,7 +71,7 @@ export interface ClientUpdateProposal { export interface UpgradeProposal { title: string; description: string; - plan: Plan; + plan?: Plan; /** * An UpgradedClientState must be provided to perform an IBC breaking upgrade. * This will make the chain commit to the correct upgraded (self) client state @@ -82,7 +81,7 @@ export interface UpgradeProposal { * planned chain upgrades */ - upgradedClientState: Any; + upgradedClientState?: Any; } /** * Height is a monotonically increasing data type diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index 8b3d5259..bcb242ac 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; @@ -15,7 +14,7 @@ export interface GenesisState { /** metadata from each client */ clientsMetadata: IdentifiedGenesisMetadata[]; - params: Params; + params?: Params; /** create localhost on initialization */ createLocalhost: boolean; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index a7cda68c..a1278574 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; @@ -23,13 +22,13 @@ export interface QueryClientStateRequest { export interface QueryClientStateResponse { /** client state associated with the request identifier */ - clientState: Any; + clientState?: Any; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -81,13 +80,13 @@ export interface QueryConsensusStateRequest { export interface QueryConsensusStateResponse { /** consensus state associated with the client identifier at the given height */ - consensusState: Any; + consensusState?: Any; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryConsensusStatesRequest is the request type for the Query/ConsensusStates @@ -143,7 +142,7 @@ export interface QueryClientParamsRequest {} export interface QueryClientParamsResponse { /** params defines the parameters of the module. */ - params: Params; + params?: Params; } /** * QueryUpgradedClientStateRequest is the request type for the @@ -158,7 +157,7 @@ export interface QueryUpgradedClientStateRequest {} export interface QueryUpgradedClientStateResponse { /** client state associated with the request identifier */ - upgradedClientState: Any; + upgradedClientState?: Any; } /** * QueryUpgradedConsensusStateRequest is the request type for the @@ -173,7 +172,7 @@ export interface QueryUpgradedConsensusStateRequest {} export interface QueryUpgradedConsensusStateResponse { /** Consensus state associated with the request identifier */ - upgradedConsensusState: Any; + upgradedConsensusState?: Any; } function createBaseQueryClientStateRequest(): QueryClientStateRequest { diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 13b0be3e..be1f4b39 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; @@ -8,13 +7,13 @@ export const protobufPackage = "ibc.core.client.v1"; export interface MsgCreateClient { /** light client state */ - clientState: Any; + clientState?: Any; /** * consensus state associated with the client that corresponds to a given * height. */ - consensusState: Any; + consensusState?: Any; /** signer address */ signer: string; @@ -32,7 +31,7 @@ export interface MsgUpdateClient { clientId: string; /** header to update the light client */ - header: Any; + header?: Any; /** signer address */ signer: string; @@ -50,13 +49,13 @@ export interface MsgUpgradeClient { clientId: string; /** upgraded client state */ - clientState: Any; + clientState?: Any; /** * upgraded consensus state, only contains enough information to serve as a * basis of trust in update logic */ - consensusState: Any; + consensusState?: Any; /** proof that old chain committed to new client */ proofUpgradeClient: Uint8Array; @@ -80,7 +79,7 @@ export interface MsgSubmitMisbehaviour { clientId: string; /** misbehaviour used for freezing the light client */ - misbehaviour: Any; + misbehaviour?: Any; /** signer address */ signer: string; diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index 8e10fb6d..a62fc23a 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index dbf721ac..fb3c8c11 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; @@ -90,7 +89,7 @@ export interface ConnectionEnd { state: State; /** counterparty chain associated with this connection. */ - counterparty: Counterparty; + counterparty?: Counterparty; /** * delay period that must pass before a consensus state can be used for * packet-verification NOTE: delay period logic is only implemented by some @@ -121,7 +120,7 @@ export interface IdentifiedConnection { state: State; /** counterparty chain associated with this connection. */ - counterparty: Counterparty; + counterparty?: Counterparty; /** delay period associated with this connection. */ delayPeriod: Long; @@ -142,7 +141,7 @@ export interface Counterparty { connectionId: string; /** commitment merkle prefix of the counterparty chain. */ - prefix: MerklePrefix; + prefix?: MerklePrefix; } /** ClientPaths define all the connection paths for a client state. */ diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 976f0224..6ef3ebc7 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; @@ -12,7 +11,7 @@ export interface GenesisState { /** the sequence for the next generated connection identifier */ nextConnectionSequence: Long; - params: Params; + params?: Params; } function createBaseGenesisState(): GenesisState { diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 22abb34d..efa89727 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; @@ -24,13 +23,13 @@ export interface QueryConnectionRequest { export interface QueryConnectionResponse { /** connection associated with the request identifier */ - connection: ConnectionEnd; + connection?: ConnectionEnd; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -53,7 +52,7 @@ export interface QueryConnectionsResponse { pagination?: PageResponse; /** query block height */ - height: Height; + height?: Height; } /** * QueryClientConnectionsRequest is the request type for the @@ -77,7 +76,7 @@ export interface QueryClientConnectionsResponse { proof: Uint8Array; /** height at which the proof was generated */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryConnectionClientStateRequest is the request type for the @@ -95,13 +94,13 @@ export interface QueryConnectionClientStateRequest { export interface QueryConnectionClientStateResponse { /** client state associated with the channel */ - identifiedClientState: IdentifiedClientState; + identifiedClientState?: IdentifiedClientState; /** merkle proof of existence */ proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } /** * QueryConnectionConsensusStateRequest is the request type for the @@ -121,7 +120,7 @@ export interface QueryConnectionConsensusStateRequest { export interface QueryConnectionConsensusStateResponse { /** consensus state associated with the channel */ - consensusState: Any; + consensusState?: Any; /** client ID associated with the consensus state */ clientId: string; @@ -130,7 +129,7 @@ export interface QueryConnectionConsensusStateResponse { proof: Uint8Array; /** height at which the proof was retrieved */ - proofHeight: Height; + proofHeight?: Height; } function createBaseQueryConnectionRequest(): QueryConnectionRequest { diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 8de8666a..efe9174b 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; @@ -13,8 +12,8 @@ export const protobufPackage = "ibc.core.connection.v1"; export interface MsgConnectionOpenInit { clientId: string; - counterparty: Counterparty; - version: Version; + counterparty?: Counterparty; + version?: Version; delayPeriod: Long; signer: string; } @@ -37,11 +36,11 @@ export interface MsgConnectionOpenTry { */ previousConnectionId: string; - clientState: Any; - counterparty: Counterparty; + clientState?: Any; + counterparty?: Counterparty; delayPeriod: Long; counterpartyVersions: Version[]; - proofHeight: Height; + proofHeight?: Height; /** * proof of the initialization the connection on Chain A: `UNITIALIZED -> * INIT` @@ -54,7 +53,7 @@ export interface MsgConnectionOpenTry { /** proof of client consensus state */ proofConsensus: Uint8Array; - consensusHeight: Height; + consensusHeight?: Height; signer: string; } /** MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. */ @@ -68,9 +67,9 @@ export interface MsgConnectionOpenTryResponse {} export interface MsgConnectionOpenAck { connectionId: string; counterpartyConnectionId: string; - version: Version; - clientState: Any; - proofHeight: Height; + version?: Version; + clientState?: Any; + proofHeight?: Height; /** * proof of the initialization the connection on Chain B: `UNITIALIZED -> * TRYOPEN` @@ -83,7 +82,7 @@ export interface MsgConnectionOpenAck { /** proof of client consensus state */ proofConsensus: Uint8Array; - consensusHeight: Height; + consensusHeight?: Height; signer: string; } /** MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. */ @@ -99,7 +98,7 @@ export interface MsgConnectionOpenConfirm { /** proof for the change of the connection state on Chain A: `INIT -> OPEN` */ proofAck: Uint8Array; - proofHeight: Height; + proofHeight?: Height; signer: string; } /** diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 0a35b0bf..5b4b3de7 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; @@ -10,13 +9,13 @@ export const protobufPackage = "ibc.core.types.v1"; export interface GenesisState { /** ICS002 - Clients genesis state */ - clientGenesis: GenesisState1; + clientGenesis?: GenesisState1; /** ICS003 - Connections genesis state */ - connectionGenesis: GenesisState2; + connectionGenesis?: GenesisState2; /** ICS004 - Channel genesis state */ - channelGenesis: GenesisState3; + channelGenesis?: GenesisState3; } function createBaseGenesisState(): GenesisState { diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index 2614013b..ade6eae2 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; @@ -14,7 +13,7 @@ export interface ClientState { chainId: string; /** self latest block height */ - height: Height; + height?: Height; } function createBaseClientState(): ClientState { diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 4f317217..4570e3b8 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; @@ -139,7 +138,7 @@ export interface ClientState { /** frozen sequence of the solo machine */ frozenSequence: Long; - consensusState: ConsensusState; + consensusState?: ConsensusState; /** * when set to true, will allow governance to update a solo machine client. * The client will be unfrozen if it is frozen. @@ -155,7 +154,7 @@ export interface ClientState { export interface ConsensusState { /** public key of the solo machine */ - publicKey: Any; + publicKey?: Any; /** * diversifier allows the same public key to be re-used across different solo * machine clients (potentially on different chains) without being considered @@ -172,7 +171,7 @@ export interface Header { sequence: Long; timestamp: Long; signature: Uint8Array; - newPublicKey: Any; + newPublicKey?: Any; newDiversifier: string; } /** @@ -183,8 +182,8 @@ export interface Header { export interface Misbehaviour { clientId: string; sequence: Long; - signatureOne: SignatureAndData; - signatureTwo: SignatureAndData; + signatureOne?: SignatureAndData; + signatureTwo?: SignatureAndData; } /** * SignatureAndData contains a signature and the data signed over to create that @@ -223,7 +222,7 @@ export interface SignBytes { export interface HeaderData { /** header public key */ - newPubKey: Any; + newPubKey?: Any; /** header diversifier */ newDiversifier: string; @@ -232,7 +231,7 @@ export interface HeaderData { export interface ClientStateData { path: Uint8Array; - clientState: Any; + clientState?: Any; } /** * ConsensusStateData returns the SignBytes data for consensus state @@ -241,7 +240,7 @@ export interface ClientStateData { export interface ConsensusStateData { path: Uint8Array; - consensusState: Any; + consensusState?: Any; } /** * ConnectionStateData returns the SignBytes data for connection state @@ -250,7 +249,7 @@ export interface ConsensusStateData { export interface ConnectionStateData { path: Uint8Array; - connection: ConnectionEnd; + connection?: ConnectionEnd; } /** * ChannelStateData returns the SignBytes data for channel state @@ -259,7 +258,7 @@ export interface ConnectionStateData { export interface ChannelStateData { path: Uint8Array; - channel: Channel; + channel?: Channel; } /** * PacketCommitmentData returns the SignBytes data for packet commitment diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 96dacacf..ba167cde 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Duration } from "../../../../google/protobuf/duration"; import { Height } from "../../../core/client/v1/client"; @@ -26,25 +25,25 @@ export const protobufPackage = "ibc.lightclients.tendermint.v1"; export interface ClientState { chainId: string; - trustLevel: Fraction; + trustLevel?: Fraction; /** * duration of the period since the LastestTimestamp during which the * submitted headers are valid for upgrade */ - trustingPeriod: Duration; + trustingPeriod?: Duration; /** duration of the staking unbonding period */ - unbondingPeriod: Duration; + unbondingPeriod?: Duration; /** defines how much new (untrusted) header's Time can drift into the future. */ - maxClockDrift: Duration; + maxClockDrift?: Duration; /** Block height when the client was frozen due to a misbehaviour */ - frozenHeight: Height; + frozenHeight?: Height; /** Latest height the client was updated to */ - latestHeight: Height; + latestHeight?: Height; /** Proof specifications used in verifying counterparty state */ proofSpecs: ProofSpec[]; @@ -79,10 +78,10 @@ export interface ConsensusState { * timestamp that corresponds to the block height in which the ConsensusState * was stored. */ - timestamp: Timestamp; + timestamp?: Timestamp; /** commitment root (i.e app hash) */ - root: MerkleRoot; + root?: MerkleRoot; nextValidatorsHash: Uint8Array; } /** @@ -92,8 +91,8 @@ export interface ConsensusState { export interface Misbehaviour { clientId: string; - header_1: Header; - header_2: Header; + header_1?: Header; + header_2?: Header; } /** * Header defines the Tendermint client consensus Header. @@ -111,10 +110,10 @@ export interface Misbehaviour { */ export interface Header { - signedHeader: SignedHeader; - validatorSet: ValidatorSet; - trustedHeight: Height; - trustedValidators: ValidatorSet; + signedHeader?: SignedHeader; + validatorSet?: ValidatorSet; + trustedHeight?: Height; + trustedValidators?: ValidatorSet; } /** * Fraction defines the protobuf message type for tmmath.Fraction that only diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index fcf0e158..7313585c 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../google/protobuf/timestamp"; import { Header } from "../types/types"; @@ -280,9 +279,9 @@ export interface RequestSetOption { value: string; } export interface RequestInitChain { - time: Timestamp; + time?: Timestamp; chainId: string; - consensusParams: ConsensusParams; + consensusParams?: ConsensusParams; validators: ValidatorUpdate[]; appStateBytes: Uint8Array; initialHeight: Long; @@ -295,8 +294,8 @@ export interface RequestQuery { } export interface RequestBeginBlock { hash: Uint8Array; - header: Header; - lastCommitInfo: LastCommitInfo; + header?: Header; + lastCommitInfo?: LastCommitInfo; byzantineValidators: Evidence[]; } export interface RequestCheckTx { @@ -317,7 +316,7 @@ export interface RequestListSnapshots {} export interface RequestOfferSnapshot { /** snapshot offered by peers */ - snapshot: Snapshot; + snapshot?: Snapshot; /** light client-verified app hash for snapshot height */ appHash: Uint8Array; @@ -380,7 +379,7 @@ export interface ResponseSetOption { info: string; } export interface ResponseInitChain { - consensusParams: ConsensusParams; + consensusParams?: ConsensusParams; validators: ValidatorUpdate[]; appHash: Uint8Array; } @@ -395,7 +394,7 @@ export interface ResponseQuery { index: Long; key: Uint8Array; value: Uint8Array; - proofOps: ProofOps; + proofOps?: ProofOps; height: Long; codespace: string; } @@ -432,7 +431,7 @@ export interface ResponseDeliverTx { } export interface ResponseEndBlock { validatorUpdates: ValidatorUpdate[]; - consensusParamUpdates: ConsensusParams; + consensusParamUpdates?: ConsensusParams; events: Event[]; } export interface ResponseCommit { @@ -464,10 +463,10 @@ export interface ResponseApplySnapshotChunk { */ export interface ConsensusParams { - block: BlockParams; - evidence: EvidenceParams; - validator: ValidatorParams; - version: VersionParams; + block?: BlockParams; + evidence?: EvidenceParams; + validator?: ValidatorParams; + version?: VersionParams; } /** BlockParams contains limits on the block size. */ @@ -511,7 +510,7 @@ export interface TxResult { height: Long; index: number; tx: Uint8Array; - result: ResponseDeliverTx; + result?: ResponseDeliverTx; } /** Validator */ @@ -528,26 +527,26 @@ export interface Validator { /** ValidatorUpdate */ export interface ValidatorUpdate { - pubKey: PublicKey; + pubKey?: PublicKey; power: Long; } /** VoteInfo */ export interface VoteInfo { - validator: Validator; + validator?: Validator; signedLastBlock: boolean; } export interface Evidence { type: EvidenceType; /** The offending validator */ - validator: Validator; + validator?: Validator; /** The height when the offense occurred */ height: Long; /** The corresponding time where the offense occurred */ - time: Timestamp; + time?: Timestamp; /** * Total voting power of the validator set in case the ABCI application does * not store historical validators. diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index 0e934fb4..a3c2806e 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 120cbfdb..90786c0f 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; @@ -14,7 +13,7 @@ export interface ValueOp { key: Uint8Array; /** To encode in ProofOp.Data */ - proof: Proof; + proof?: Proof; } export interface DominoOp { key: string; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 426d84d4..fd58739b 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; @@ -14,14 +13,14 @@ export interface ProtocolVersion { app: Long; } export interface DefaultNodeInfo { - protocolVersion: ProtocolVersion; + protocolVersion?: ProtocolVersion; defaultNodeId: string; listenAddr: string; network: string; version: string; channels: Uint8Array; moniker: string; - other: DefaultNodeInfoOther; + other?: DefaultNodeInfoOther; } export interface DefaultNodeInfoOther { txIndex: string; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index f0a327a4..4861981c 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; @@ -6,10 +5,10 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Block { - header: Header; - data: Data; - evidence: EvidenceList; - lastCommit: Commit; + header?: Header; + data?: Data; + evidence?: EvidenceList; + lastCommit?: Commit; } function createBaseBlock(): Block { diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 18656989..ff7c0ded 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; @@ -13,20 +12,20 @@ export interface Evidence { /** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */ export interface DuplicateVoteEvidence { - voteA: Vote; - voteB: Vote; + voteA?: Vote; + voteB?: Vote; totalVotingPower: Long; validatorPower: Long; - timestamp: Timestamp; + timestamp?: Timestamp; } /** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */ export interface LightClientAttackEvidence { - conflictingBlock: LightBlock; + conflictingBlock?: LightBlock; commonHeight: Long; byzantineValidators: Validator[]; totalVotingPower: Long; - timestamp: Timestamp; + timestamp?: Timestamp; } export interface EvidenceList { evidence: Evidence[]; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 5e5a3297..88f83276 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; @@ -10,10 +9,10 @@ export const protobufPackage = "tendermint.types"; */ export interface ConsensusParams { - block: BlockParams; - evidence: EvidenceParams; - validator: ValidatorParams; - version: VersionParams; + block?: BlockParams; + evidence?: EvidenceParams; + validator?: ValidatorParams; + version?: VersionParams; } /** BlockParams contains limits on the block size. */ @@ -56,7 +55,7 @@ export interface EvidenceParams { * 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; + maxAgeDuration?: Duration; /** * 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. diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index 7cb1a444..c81c9bb4 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; @@ -133,25 +132,25 @@ export interface PartSetHeader { export interface Part { index: number; bytes: Uint8Array; - proof: Proof; + proof?: Proof; } /** BlockID */ export interface BlockID { hash: Uint8Array; - partSetHeader: PartSetHeader; + partSetHeader?: PartSetHeader; } /** Header defines the structure of a Tendermint block header. */ export interface Header { /** basic block info */ - version: Consensus; + version?: Consensus; chainId: string; height: Long; - time: Timestamp; + time?: Timestamp; /** prev block info */ - lastBlockId: BlockID; + lastBlockId?: BlockID; /** hashes of block data */ lastCommitHash: Uint8Array; @@ -195,8 +194,8 @@ export interface Vote { type: SignedMsgType; height: Long; round: number; - blockId: BlockID; - timestamp: Timestamp; + blockId?: BlockID; + timestamp?: Timestamp; validatorAddress: Uint8Array; validatorIndex: number; signature: Uint8Array; @@ -206,7 +205,7 @@ export interface Vote { export interface Commit { height: Long; round: number; - blockId: BlockID; + blockId?: BlockID; signatures: CommitSig[]; } /** CommitSig is a part of the Vote included in a Commit. */ @@ -214,7 +213,7 @@ export interface Commit { export interface CommitSig { blockIdFlag: BlockIDFlag; validatorAddress: Uint8Array; - timestamp: Timestamp; + timestamp?: Timestamp; signature: Uint8Array; } export interface Proposal { @@ -222,22 +221,22 @@ export interface Proposal { height: Long; round: number; polRound: number; - blockId: BlockID; - timestamp: Timestamp; + blockId?: BlockID; + timestamp?: Timestamp; signature: Uint8Array; } export interface SignedHeader { - header: Header; - commit: Commit; + header?: Header; + commit?: Commit; } export interface LightBlock { - signedHeader: SignedHeader; - validatorSet: ValidatorSet; + signedHeader?: SignedHeader; + validatorSet?: ValidatorSet; } export interface BlockMeta { - blockId: BlockID; + blockId?: BlockID; blockSize: Long; - header: Header; + header?: Header; numTxs: Long; } /** TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. */ @@ -245,7 +244,7 @@ export interface BlockMeta { export interface TxProof { rootHash: Uint8Array; data: Uint8Array; - proof: Proof; + proof?: Proof; } function createBasePartSetHeader(): PartSetHeader { diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index e44893ab..74bf8737 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; @@ -6,17 +5,17 @@ import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } fro export const protobufPackage = "tendermint.types"; export interface ValidatorSet { validators: Validator[]; - proposer: Validator; + proposer?: Validator; totalVotingPower: Long; } export interface Validator { address: Uint8Array; - pubKey: PublicKey; + pubKey?: PublicKey; votingPower: Long; proposerPriority: Long; } export interface SimpleValidator { - pubKey: PublicKey; + pubKey?: PublicKey; votingPower: Long; } diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index 42e909cb..d72ca96a 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; From adbc5e945e3acbe3bdfbf04ebd54b1317d3fb91c Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 11 Oct 2022 15:17:02 -0700 Subject: [PATCH 22/38] field optionality --- package-lock.json | 98 ++++++++++++------------ package.json | 2 +- src/cosmos/authz/v1beta1/query.ts | 6 +- src/cosmos/bank/v1beta1/query.ts | 2 +- src/cosmos/distribution/v1beta1/query.ts | 4 +- src/cosmos/gov/v1beta1/query.ts | 6 +- src/cosmos/staking/v1beta1/query.ts | 6 +- src/cosmos/tx/v1beta1/service.ts | 4 +- src/cosmos/upgrade/v1beta1/query.ts | 2 +- src/helpers.ts | 2 +- src/ibc/core/channel/v1/query.ts | 2 +- src/ibc/core/client/v1/query.ts | 2 +- 12 files changed, 68 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index 971d6ad2..bad23168 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.52.0", + "@osmonauts/telescope": "^0.56.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.47.0.tgz", - "integrity": "sha512-MHItv1ZixjfKpL1L9cEnTO3JCrs0/+ZC8niCTcZj+dpoBjiTbcaIwH1eFvgY3QNZEOtNNRLbZvimil9OFmiEew==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.51.0.tgz", + "integrity": "sha512-UsR3gJhz6H8X2kB9xWO8T8a88NlkEXb7htwFqLV+bl2KyYAa9aZzmJnXp1FVRoBEAKcsDWGyZjuhuwTUULPnDg==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.24.0", - "@osmonauts/types": "^0.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/proto-parser": "^0.26.0", + "@osmonauts/types": "^0.20.0", + "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.24.0.tgz", - "integrity": "sha512-pOywSBzv5pRlAbgISoybyq5SFiL05/ab2lThS2zSIs14QLv9g3tCtRqeGaxTO061hSuxuaI6Du2xKBzxahb05w==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.26.0.tgz", + "integrity": "sha512-rNXFU/Fg3Ql25/UwtREQHCrvjRZqCi2PoOOcBggAJu12HAdwgfmX+Y66/1rvii/Lszix/3hifb5fuK+1goKCAw==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.19.0", + "@osmonauts/types": "^0.20.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.52.0.tgz", - "integrity": "sha512-jxk3cSQIRo7C4WR/HWVyxl2bBERpKVHyc5X82XJNPUZNoK+Isye0tEtUCcdIvcSER7VewBkQJ8nF8PgxlRwCKQ==", + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.56.0.tgz", + "integrity": "sha512-a52D17cbqs1e/xD8CLnoXbDtuJ8zN+M4rIm6AWFspWmCCy203Kfc4Nomcdxu68qpyUhGCukYh/4zVmeA5jV9sw==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,10 +2189,10 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.47.0", - "@osmonauts/proto-parser": "^0.24.0", - "@osmonauts/types": "^0.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/ast": "^0.51.0", + "@osmonauts/proto-parser": "^0.26.0", + "@osmonauts/types": "^0.20.0", + "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -2342,20 +2342,20 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.19.0.tgz", - "integrity": "sha512-2iSpTR8swnYefG5AavzbkwMw0256wygj2RwmM+NSvxpt9zLmdXvYrF5OJoizYTNqEX+p7XxBPV5BEN7SPsW6kg==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.20.0.tgz", + "integrity": "sha512-aQ0IDvj26lI98mwiHXI4MPxovyFpMEUHv+UyfQsg6AM8PVGGWdcbP/dVH3bdG/5Gjd82vX9dOzjbVpFerqDxFg==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/utils": "^0.7.0", "case": "1.6.3" } }, "node_modules/@osmonauts/utils": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.6.0.tgz", - "integrity": "sha512-Os+2YlPi/Y7Rp/z9WimDOH8PcwYKJLyoQvauMs0Dyir+RioKKFUzQ3S3Bptc3pUIb/4+/OEYAChKAHgiWpS3hw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.7.0.tgz", + "integrity": "sha512-pGt1oAFgRYWporTcrSjRa0i51PqQ8K1vYb8BjDdTdF/b+Kb+UHUGZXUpbR+kAmIiBMTsRYoYzHjktxGlECIWaQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0" @@ -6490,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.47.0.tgz", - "integrity": "sha512-MHItv1ZixjfKpL1L9cEnTO3JCrs0/+ZC8niCTcZj+dpoBjiTbcaIwH1eFvgY3QNZEOtNNRLbZvimil9OFmiEew==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.51.0.tgz", + "integrity": "sha512-UsR3gJhz6H8X2kB9xWO8T8a88NlkEXb7htwFqLV+bl2KyYAa9aZzmJnXp1FVRoBEAKcsDWGyZjuhuwTUULPnDg==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.24.0", - "@osmonauts/types": "^0.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/proto-parser": "^0.26.0", + "@osmonauts/types": "^0.20.0", + "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.24.0.tgz", - "integrity": "sha512-pOywSBzv5pRlAbgISoybyq5SFiL05/ab2lThS2zSIs14QLv9g3tCtRqeGaxTO061hSuxuaI6Du2xKBzxahb05w==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.26.0.tgz", + "integrity": "sha512-rNXFU/Fg3Ql25/UwtREQHCrvjRZqCi2PoOOcBggAJu12HAdwgfmX+Y66/1rvii/Lszix/3hifb5fuK+1goKCAw==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.19.0", + "@osmonauts/types": "^0.20.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.52.0.tgz", - "integrity": "sha512-jxk3cSQIRo7C4WR/HWVyxl2bBERpKVHyc5X82XJNPUZNoK+Isye0tEtUCcdIvcSER7VewBkQJ8nF8PgxlRwCKQ==", + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.56.0.tgz", + "integrity": "sha512-a52D17cbqs1e/xD8CLnoXbDtuJ8zN+M4rIm6AWFspWmCCy203Kfc4Nomcdxu68qpyUhGCukYh/4zVmeA5jV9sw==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,10 +6537,10 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.47.0", - "@osmonauts/proto-parser": "^0.24.0", - "@osmonauts/types": "^0.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/ast": "^0.51.0", + "@osmonauts/proto-parser": "^0.26.0", + "@osmonauts/types": "^0.20.0", + "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", "dargs": "7.0.0", @@ -6674,20 +6674,20 @@ } }, "@osmonauts/types": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.19.0.tgz", - "integrity": "sha512-2iSpTR8swnYefG5AavzbkwMw0256wygj2RwmM+NSvxpt9zLmdXvYrF5OJoizYTNqEX+p7XxBPV5BEN7SPsW6kg==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.20.0.tgz", + "integrity": "sha512-aQ0IDvj26lI98mwiHXI4MPxovyFpMEUHv+UyfQsg6AM8PVGGWdcbP/dVH3bdG/5Gjd82vX9dOzjbVpFerqDxFg==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/utils": "^0.6.0", + "@osmonauts/utils": "^0.7.0", "case": "1.6.3" } }, "@osmonauts/utils": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.6.0.tgz", - "integrity": "sha512-Os+2YlPi/Y7Rp/z9WimDOH8PcwYKJLyoQvauMs0Dyir+RioKKFUzQ3S3Bptc3pUIb/4+/OEYAChKAHgiWpS3hw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@osmonauts/utils/-/utils-0.7.0.tgz", + "integrity": "sha512-pGt1oAFgRYWporTcrSjRa0i51PqQ8K1vYb8BjDdTdF/b+Kb+UHUGZXUpbR+kAmIiBMTsRYoYzHjktxGlECIWaQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0" diff --git a/package.json b/package.json index 204b635c..86d9f39c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.55.0", + "@osmonauts/telescope": "^0.56.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 04a7984f..31c51ae2 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -7,11 +7,11 @@ export const protobufPackage = "cosmos.authz.v1beta1"; /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ export interface QueryGrantsRequest { - granter?: string; - grantee?: string; + granter: string; + grantee: string; /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ - msgTypeUrl?: string; + msgTypeUrl: string; /** pagination defines an pagination for the request. */ pagination?: PageRequest; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 973a87f3..e858002d 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -12,7 +12,7 @@ export interface QueryBalanceRequest { address: string; /** denom is the coin denom to query balances for. */ - denom?: string; + denom: string; } /** QueryBalanceResponse is the response type for the Query/Balance RPC method. */ diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index 49bdc7f4..a4e2da88 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -65,10 +65,10 @@ export interface QueryValidatorSlashesRequest { validatorAddress: string; /** starting_height defines the optional starting height to query the slashes. */ - startingHeight?: Long; + startingHeight: Long; /** starting_height defines the optional ending height to query the slashes. */ - endingHeight?: Long; + endingHeight: Long; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 23713ba3..5edecfd1 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -30,13 +30,13 @@ export interface QueryProposalResponse { export interface QueryProposalsRequest { /** proposal_status defines the status of the proposals. */ - proposalStatus?: ProposalStatus; + proposalStatus: ProposalStatus; /** voter defines the voter address for the proposals. */ - voter?: string; + voter: string; /** depositor defines the deposit addresses from the proposals. */ - depositor?: string; + depositor: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index abe7aa62..99dfec9a 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -16,7 +16,7 @@ export const protobufPackage = "cosmos.staking.v1beta1"; export interface QueryValidatorsRequest { /** status enables to query for validators matching a given status. */ - status?: string; + status: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; @@ -181,10 +181,10 @@ export interface QueryRedelegationsRequest { delegatorAddr: string; /** src_validator_addr defines the validator address to redelegate from. */ - srcValidatorAddr?: string; + srcValidatorAddr: string; /** dst_validator_addr defines the validator address to redelegate to. */ - dstValidatorAddr?: string; + dstValidatorAddr: string; /** pagination defines an optional pagination for the request. */ pagination?: PageRequest; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 3a2450fb..eed31135 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -131,11 +131,11 @@ export function broadcastModeToJSON(object: BroadcastMode): string { export interface GetTxsEventRequest { /** events is the list of transaction event type. */ - events?: string[]; + events: string[]; /** pagination defines a pagination for the request. */ pagination?: PageRequest; - orderBy?: OrderBy; + orderBy: OrderBy; } /** * GetTxsEventResponse is the response type for the Service.TxsByEvents diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index ee465660..dddfdf22 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -74,7 +74,7 @@ export interface QueryModuleVersionsRequest { * consensus version from state. Leaving this empty will * fetch the full list of module versions from state */ - moduleName?: string; + moduleName: string; } /** * QueryModuleVersionsResponse is the response type for the Query/ModuleVersions diff --git a/src/helpers.ts b/src/helpers.ts index ed524b8f..ff3dbda9 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.55.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.56.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 22c6b2e3..26e356d8 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -277,7 +277,7 @@ export interface QueryPacketAcknowledgementsRequest { pagination?: PageRequest; /** list of packet sequences */ - packetCommitmentSequences?: Long[]; + packetCommitmentSequences: Long[]; } /** * QueryPacketAcknowledgemetsResponse is the request type for the diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index a1278574..cc6e213b 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -71,7 +71,7 @@ export interface QueryConsensusStateRequest { * ConsensusState */ - latestHeight?: boolean; + latestHeight: boolean; } /** * QueryConsensusStateResponse is the response type for the Query/ConsensusState From e90039261c18c87b8629f4e4e7d796ca3655a6f2 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 11 Oct 2022 16:44:51 -0700 Subject: [PATCH 23/38] pagination --- package-lock.json | 74 ++++++++++----------- package.json | 2 +- src/cosmos/base/query/v1beta1/pagination.ts | 12 ++-- src/helpers.ts | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index bad23168..c310b38e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.56.0", + "@osmonauts/telescope": "^0.57.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.51.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.51.0.tgz", - "integrity": "sha512-UsR3gJhz6H8X2kB9xWO8T8a88NlkEXb7htwFqLV+bl2KyYAa9aZzmJnXp1FVRoBEAKcsDWGyZjuhuwTUULPnDg==", + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.52.0.tgz", + "integrity": "sha512-hxtJPpWDYd3CEsvmV+mbJp/K1ZTstP7bsbpduLsoxgS/Ckkj3xumLQ01XTCaav3SldKdUWqkKMhDeYrDfbNXzQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.26.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.26.0.tgz", - "integrity": "sha512-rNXFU/Fg3Ql25/UwtREQHCrvjRZqCi2PoOOcBggAJu12HAdwgfmX+Y66/1rvii/Lszix/3hifb5fuK+1goKCAw==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.27.0.tgz", + "integrity": "sha512-lRRQlPgG3S8EUQA3KuqhM0OzSvmnmXSWEdICmw+I1ts9C36PTOCJAanWvG4+CFantbka35ijs6eVPbzOG5jiQw==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/types": "^0.21.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.56.0.tgz", - "integrity": "sha512-a52D17cbqs1e/xD8CLnoXbDtuJ8zN+M4rIm6AWFspWmCCy203Kfc4Nomcdxu68qpyUhGCukYh/4zVmeA5jV9sw==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.57.0.tgz", + "integrity": "sha512-3GGnH58pfBYZcstvDyIwROwPVstr9LLrkJrS7m5hRctckQad0fLS0wlt3cSVU6GE1HZBynkIVK2M5EQGFuAj+Q==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,9 +2189,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.51.0", - "@osmonauts/proto-parser": "^0.26.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/ast": "^0.52.0", + "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2342,9 +2342,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.20.0.tgz", - "integrity": "sha512-aQ0IDvj26lI98mwiHXI4MPxovyFpMEUHv+UyfQsg6AM8PVGGWdcbP/dVH3bdG/5Gjd82vX9dOzjbVpFerqDxFg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.21.0.tgz", + "integrity": "sha512-pGjU0YNoEt4XRlpmojofAsdFsX7D65aGfyByoQV7r+rDKUvrTHSl4roTDelw06uoLjORmDYRy7xHSiPdglq67w==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -6490,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.51.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.51.0.tgz", - "integrity": "sha512-UsR3gJhz6H8X2kB9xWO8T8a88NlkEXb7htwFqLV+bl2KyYAa9aZzmJnXp1FVRoBEAKcsDWGyZjuhuwTUULPnDg==", + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.52.0.tgz", + "integrity": "sha512-hxtJPpWDYd3CEsvmV+mbJp/K1ZTstP7bsbpduLsoxgS/Ckkj3xumLQ01XTCaav3SldKdUWqkKMhDeYrDfbNXzQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.26.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.26.0.tgz", - "integrity": "sha512-rNXFU/Fg3Ql25/UwtREQHCrvjRZqCi2PoOOcBggAJu12HAdwgfmX+Y66/1rvii/Lszix/3hifb5fuK+1goKCAw==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.27.0.tgz", + "integrity": "sha512-lRRQlPgG3S8EUQA3KuqhM0OzSvmnmXSWEdICmw+I1ts9C36PTOCJAanWvG4+CFantbka35ijs6eVPbzOG5jiQw==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/types": "^0.21.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.56.0.tgz", - "integrity": "sha512-a52D17cbqs1e/xD8CLnoXbDtuJ8zN+M4rIm6AWFspWmCCy203Kfc4Nomcdxu68qpyUhGCukYh/4zVmeA5jV9sw==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.57.0.tgz", + "integrity": "sha512-3GGnH58pfBYZcstvDyIwROwPVstr9LLrkJrS7m5hRctckQad0fLS0wlt3cSVU6GE1HZBynkIVK2M5EQGFuAj+Q==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,9 +6537,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.51.0", - "@osmonauts/proto-parser": "^0.26.0", - "@osmonauts/types": "^0.20.0", + "@osmonauts/ast": "^0.52.0", + "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6674,9 +6674,9 @@ } }, "@osmonauts/types": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.20.0.tgz", - "integrity": "sha512-aQ0IDvj26lI98mwiHXI4MPxovyFpMEUHv+UyfQsg6AM8PVGGWdcbP/dVH3bdG/5Gjd82vX9dOzjbVpFerqDxFg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.21.0.tgz", + "integrity": "sha512-pGjU0YNoEt4XRlpmojofAsdFsX7D65aGfyByoQV7r+rDKUvrTHSl4roTDelw06uoLjORmDYRy7xHSiPdglq67w==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", diff --git a/package.json b/package.json index 86d9f39c..c9ea62c2 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.56.0", + "@osmonauts/telescope": "^0.57.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 93c14e80..82ef1972 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -18,20 +18,20 @@ export interface PageRequest { * querying the next page most efficiently. Only one of offset or key * should be set. */ - key?: Uint8Array; + 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?: Long; + offset: Long; /** * 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?: Long; + limit: Long; /** * 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. @@ -39,14 +39,14 @@ export interface PageRequest { * is set. */ - countTotal?: boolean; + countTotal: boolean; /** * reverse is set to true if results are to be returned in the descending order. * * Since: cosmos-sdk 0.43 */ - reverse?: boolean; + reverse: boolean; } /** * PageResponse is to be embedded in gRPC response messages where the @@ -63,7 +63,7 @@ export interface PageResponse { * next_key is the key to be passed to PageRequest.key to * query the next page most efficiently */ - nextKey?: Uint8Array; + nextKey: Uint8Array; /** * total is total number of results available if PageRequest.count_total * was set, its value is undefined otherwise diff --git a/src/helpers.ts b/src/helpers.ts index ff3dbda9..e7b9d4f1 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.56.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.57.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From e5b52bb0f5c02ff01a9ce2d5ee5e65f13c1df7a8 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 11 Oct 2022 22:31:37 -0700 Subject: [PATCH 24/38] fix Misbehavior --- package-lock.json | 50 +++++++++---------- package.json | 3 +- src/helpers.ts | 2 +- .../lightclients/tendermint/v1/tendermint.ts | 44 ++++++++-------- 4 files changed, 50 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index c310b38e..877c2610 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.57.0", + "@osmonauts/telescope": "^0.58.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,14 +2142,14 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.52.0.tgz", - "integrity": "sha512-hxtJPpWDYd3CEsvmV+mbJp/K1ZTstP7bsbpduLsoxgS/Ckkj3xumLQ01XTCaav3SldKdUWqkKMhDeYrDfbNXzQ==", + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.53.0.tgz", + "integrity": "sha512-TH6uWe6F88PPvoHTXrQZeGGkMRmRoSwAwoVFJU5cPNRSjDZrVkpaZlUWUIkSrNErBek1JogKBImpxq2An+0JZQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", @@ -2157,9 +2157,9 @@ } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.27.0.tgz", - "integrity": "sha512-lRRQlPgG3S8EUQA3KuqhM0OzSvmnmXSWEdICmw+I1ts9C36PTOCJAanWvG4+CFantbka35ijs6eVPbzOG5jiQw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.28.0.tgz", + "integrity": "sha512-DgEpbMgX5mQsZ9x/svHRSe9wggnbEfEszCYdzdmTKqN4kdxBvl1VjsVgxPoOO2h7LfP1l6cdHt9v10oN2MX+Vw==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.57.0.tgz", - "integrity": "sha512-3GGnH58pfBYZcstvDyIwROwPVstr9LLrkJrS7m5hRctckQad0fLS0wlt3cSVU6GE1HZBynkIVK2M5EQGFuAj+Q==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.58.0.tgz", + "integrity": "sha512-CG+l+7+NyIWAkF/OZHQ5608Ed9P7Tg2QPxAR2OmD7W8Tt59eoxFtfWLGhaQFQnKnxCo3oo1hFSvUyb9SwelvMw==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,8 +2189,8 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.52.0", - "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/ast": "^0.53.0", + "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", @@ -6490,14 +6490,14 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.52.0.tgz", - "integrity": "sha512-hxtJPpWDYd3CEsvmV+mbJp/K1ZTstP7bsbpduLsoxgS/Ckkj3xumLQ01XTCaav3SldKdUWqkKMhDeYrDfbNXzQ==", + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.53.0.tgz", + "integrity": "sha512-TH6uWe6F88PPvoHTXrQZeGGkMRmRoSwAwoVFJU5cPNRSjDZrVkpaZlUWUIkSrNErBek1JogKBImpxq2An+0JZQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", @@ -6505,9 +6505,9 @@ } }, "@osmonauts/proto-parser": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.27.0.tgz", - "integrity": "sha512-lRRQlPgG3S8EUQA3KuqhM0OzSvmnmXSWEdICmw+I1ts9C36PTOCJAanWvG4+CFantbka35ijs6eVPbzOG5jiQw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.28.0.tgz", + "integrity": "sha512-DgEpbMgX5mQsZ9x/svHRSe9wggnbEfEszCYdzdmTKqN4kdxBvl1VjsVgxPoOO2h7LfP1l6cdHt9v10oN2MX+Vw==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.57.0.tgz", - "integrity": "sha512-3GGnH58pfBYZcstvDyIwROwPVstr9LLrkJrS7m5hRctckQad0fLS0wlt3cSVU6GE1HZBynkIVK2M5EQGFuAj+Q==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.58.0.tgz", + "integrity": "sha512-CG+l+7+NyIWAkF/OZHQ5608Ed9P7Tg2QPxAR2OmD7W8Tt59eoxFtfWLGhaQFQnKnxCo3oo1hFSvUyb9SwelvMw==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,8 +6537,8 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.52.0", - "@osmonauts/proto-parser": "^0.27.0", + "@osmonauts/ast": "^0.53.0", + "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", diff --git a/package.json b/package.json index c9ea62c2..32c149e2 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.5.1", "description": "JS and TS types relating to Protocol Buffers used by Cosmos-SDK and other related projects", "contributors": [ + "Simon Warta ", "Will Clark ", "Dan Lynch " ], @@ -38,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.57.0", + "@osmonauts/telescope": "^0.58.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/helpers.ts b/src/helpers.ts index e7b9d4f1..b046a570 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.57.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.58.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index ba167cde..a6432007 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -91,8 +91,8 @@ export interface ConsensusState { export interface Misbehaviour { clientId: string; - header_1?: Header; - header_2?: Header; + header1?: Header; + header2?: Header; } /** * Header defines the Tendermint client consensus Header. @@ -436,8 +436,8 @@ export const ConsensusState = { function createBaseMisbehaviour(): Misbehaviour { return { clientId: "", - header_1: undefined, - header_2: undefined, + header1: undefined, + header2: undefined, }; } @@ -447,12 +447,12 @@ export const Misbehaviour = { writer.uint32(10).string(message.clientId); } - if (message.header_1 !== undefined) { - Header.encode(message.header_1, writer.uint32(18).fork()).ldelim(); + if (message.header1 !== undefined) { + Header.encode(message.header1, writer.uint32(18).fork()).ldelim(); } - if (message.header_2 !== undefined) { - Header.encode(message.header_2, writer.uint32(26).fork()).ldelim(); + if (message.header2 !== undefined) { + Header.encode(message.header2, writer.uint32(26).fork()).ldelim(); } return writer; @@ -472,11 +472,11 @@ export const Misbehaviour = { break; case 2: - message.header_1 = Header.decode(reader, reader.uint32()); + message.header1 = Header.decode(reader, reader.uint32()); break; case 3: - message.header_2 = Header.decode(reader, reader.uint32()); + message.header2 = Header.decode(reader, reader.uint32()); break; default: @@ -491,31 +491,31 @@ export const Misbehaviour = { fromJSON(object: any): Misbehaviour { return { clientId: isSet(object.clientId) ? String(object.clientId) : "", - header_1: isSet(object.header_1) ? Header.fromJSON(object.header_1) : undefined, - header_2: isSet(object.header_2) ? Header.fromJSON(object.header_2) : undefined, + header1: isSet(object.header1) ? Header.fromJSON(object.header1) : undefined, + header2: isSet(object.header2) ? Header.fromJSON(object.header2) : undefined, }; }, toJSON(message: Misbehaviour): unknown { const obj: any = {}; message.clientId !== undefined && (obj.clientId = message.clientId); - message.header_1 !== undefined && - (obj.header_1 = message.header_1 ? Header.toJSON(message.header_1) : undefined); - message.header_2 !== undefined && - (obj.header_2 = message.header_2 ? Header.toJSON(message.header_2) : undefined); + message.header1 !== undefined && + (obj.header1 = message.header1 ? Header.toJSON(message.header1) : undefined); + message.header2 !== undefined && + (obj.header2 = message.header2 ? Header.toJSON(message.header2) : undefined); return obj; }, fromPartial, I>>(object: I): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; - message.header_1 = - object.header_1 !== undefined && object.header_1 !== null - ? Header.fromPartial(object.header_1) + message.header1 = + object.header1 !== undefined && object.header1 !== null + ? Header.fromPartial(object.header1) : undefined; - message.header_2 = - object.header_2 !== undefined && object.header_2 !== null - ? Header.fromPartial(object.header_2) + message.header2 = + object.header2 !== undefined && object.header2 !== null + ? Header.fromPartial(object.header2) : undefined; return message; }, From a95f405195d04ce1eb8e8f323e96081f8a68f740 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Tue, 11 Oct 2022 22:48:19 -0700 Subject: [PATCH 25/38] context fix import as --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- src/helpers.ts | 2 +- src/ibc/core/types/v1/genesis.ts | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 877c2610..53598884 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.58.0", + "@osmonauts/telescope": "^0.59.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,9 +2142,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.53.0.tgz", - "integrity": "sha512-TH6uWe6F88PPvoHTXrQZeGGkMRmRoSwAwoVFJU5cPNRSjDZrVkpaZlUWUIkSrNErBek1JogKBImpxq2An+0JZQ==", + "version": "0.54.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.54.0.tgz", + "integrity": "sha512-hlK1yevZKLzn8LZ9KaDHs6pb4TFw8ca0bLk2+SPYpDWt9DS1BIn+Ad5/d01sEXrReb1esILR1uG8w+8VzyAATQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.58.0.tgz", - "integrity": "sha512-CG+l+7+NyIWAkF/OZHQ5608Ed9P7Tg2QPxAR2OmD7W8Tt59eoxFtfWLGhaQFQnKnxCo3oo1hFSvUyb9SwelvMw==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.59.0.tgz", + "integrity": "sha512-x+eG++roGjQ9xD3gEOQ9Ba7omLUJ8ZsDsb7Q10r7eCgiGljm6C0mkK+aEWuONG0OD8ezcVLrcXKXrOOL6ZfNxQ==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,7 +2189,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.53.0", + "@osmonauts/ast": "^0.54.0", "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", @@ -6490,9 +6490,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.53.0.tgz", - "integrity": "sha512-TH6uWe6F88PPvoHTXrQZeGGkMRmRoSwAwoVFJU5cPNRSjDZrVkpaZlUWUIkSrNErBek1JogKBImpxq2An+0JZQ==", + "version": "0.54.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.54.0.tgz", + "integrity": "sha512-hlK1yevZKLzn8LZ9KaDHs6pb4TFw8ca0bLk2+SPYpDWt9DS1BIn+Ad5/d01sEXrReb1esILR1uG8w+8VzyAATQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.58.0.tgz", - "integrity": "sha512-CG+l+7+NyIWAkF/OZHQ5608Ed9P7Tg2QPxAR2OmD7W8Tt59eoxFtfWLGhaQFQnKnxCo3oo1hFSvUyb9SwelvMw==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.59.0.tgz", + "integrity": "sha512-x+eG++roGjQ9xD3gEOQ9Ba7omLUJ8ZsDsb7Q10r7eCgiGljm6C0mkK+aEWuONG0OD8ezcVLrcXKXrOOL6ZfNxQ==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,7 +6537,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.53.0", + "@osmonauts/ast": "^0.54.0", "@osmonauts/proto-parser": "^0.28.0", "@osmonauts/types": "^0.21.0", "@osmonauts/utils": "^0.7.0", diff --git a/package.json b/package.json index 32c149e2..d496c487 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.58.0", + "@osmonauts/telescope": "^0.59.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/helpers.ts b/src/helpers.ts index b046a570..9015b7ca 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.58.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.59.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 5b4b3de7..bf193adf 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -104,15 +104,15 @@ export const GenesisState = { const message = createBaseGenesisState(); message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null - ? GenesisState.fromPartial(object.clientGenesis) + ? GenesisState1.fromPartial(object.clientGenesis) : undefined; message.connectionGenesis = object.connectionGenesis !== undefined && object.connectionGenesis !== null - ? GenesisState.fromPartial(object.connectionGenesis) + ? GenesisState2.fromPartial(object.connectionGenesis) : undefined; message.channelGenesis = object.channelGenesis !== undefined && object.channelGenesis !== null - ? GenesisState.fromPartial(object.channelGenesis) + ? GenesisState3.fromPartial(object.channelGenesis) : undefined; return message; }, From 18ed7c5ad42a5ff91cdb7daa4445761125fec451 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 12 Oct 2022 16:00:48 -0700 Subject: [PATCH 26/38] telescope with ICA --- scripts/codegen.js | 19 ++- src/cosmos/feegrant/v1beta1/query.ts | 37 ++++- src/cosmwasm/wasm/v1/proposal.ts | 115 ++++--------- src/cosmwasm/wasm/v1/query.ts | 20 +-- src/cosmwasm/wasm/v1/types.ts | 21 +-- .../controller/v1/controller.ts | 48 ++---- .../controller/v1/query.ts | 66 +++----- .../interchain_accounts/host/v1/host.ts | 50 ++---- .../interchain_accounts/host/v1/query.ts | 66 +++----- .../interchain_accounts/v1/account.ts | 47 ++---- .../interchain_accounts/v1/genesis.ts | 157 ++++++++++++------ .../interchain_accounts/v1/metadata.ts | 55 +++--- .../interchain_accounts/v1/packet.ts | 116 ++++--------- src/ibc/applications/transfer/v1/query.ts | 44 +++-- src/ibc/core/channel/v1/tx.ts | 97 ++++++----- 15 files changed, 414 insertions(+), 544 deletions(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index 97762aab..f6e6f855 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -5,8 +5,8 @@ const telescope = require('@osmonauts/telescope').default; telescope({ protoDirs: [ - 'wasmd-0.25/proto', - 'wasmd-0.25/third_party/proto', + 'wasmd-0.28/proto', + 'wasmd-0.28/third_party/proto', 'cosmos-sdk-0.45/proto', 'cosmos-sdk-0.45/third_party/proto' ], @@ -32,7 +32,20 @@ telescope({ 'ibc/core/port/v1/query.proto', 'ibc/lightclients/solomachine/v2/solomachine.proto', 'tendermint/libs/bits/types.proto', - 'google/api/httpbody.proto' + 'google/api/httpbody.proto', + 'tendermint/blockchain/types.proto', + 'tendermint/consensus/types.proto', + 'tendermint/consensus/wal.proto', + 'tendermint/mempool/types.proto', + 'tendermint/p2p/conn.proto', + 'tendermint/p2p/pex.proto', + 'tendermint/privval/types.proto', + 'tendermint/rpc/grpc/types.proto', + 'tendermint/state/types.proto', + 'tendermint/statesync/types.proto', + 'tendermint/store/types.proto', + 'tendermint/types/canonical.proto', + 'tendermint/types/events.proto', ] }, methods: { diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 7f19c1c4..946c70d1 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -36,19 +36,21 @@ export interface QueryAllowancesResponse { pagination?: PageResponse; } - /** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ + export interface QueryAllowancesByGranterRequest { granter: string; /** pagination defines an pagination for the request. */ + pagination?: PageRequest; } - /** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ + export interface QueryAllowancesByGranterResponse { /** allowances that have been issued by the granter. */ allowances: Grant[]; /** pagination defines an pagination for the response. */ + pagination?: PageResponse; } @@ -331,10 +333,12 @@ export const QueryAllowancesResponse = { return message; }, }; -<<<<<<< HEAD function createBaseQueryAllowancesByGranterRequest(): QueryAllowancesByGranterRequest { - return { granter: "", pagination: undefined }; + return { + granter: "", + pagination: undefined, + }; } export const QueryAllowancesByGranterRequest = { @@ -342,9 +346,11 @@ export const QueryAllowancesByGranterRequest = { if (message.granter !== "") { writer.uint32(10).string(message.granter); } + if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -352,20 +358,25 @@ export const QueryAllowancesByGranterRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowancesByGranterRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.granter = reader.string(); break; + case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -398,7 +409,10 @@ export const QueryAllowancesByGranterRequest = { }; function createBaseQueryAllowancesByGranterResponse(): QueryAllowancesByGranterResponse { - return { allowances: [], pagination: undefined }; + return { + allowances: [], + pagination: undefined, + }; } export const QueryAllowancesByGranterResponse = { @@ -406,9 +420,11 @@ export const QueryAllowancesByGranterResponse = { for (const v of message.allowances) { Grant.encode(v!, writer.uint32(10).fork()).ldelim(); } + if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -416,20 +432,25 @@ export const QueryAllowancesByGranterResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllowancesByGranterResponse(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.allowances.push(Grant.decode(reader, reader.uint32())); break; + case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -444,11 +465,13 @@ export const QueryAllowancesByGranterResponse = { toJSON(message: QueryAllowancesByGranterResponse): unknown { const obj: any = {}; + if (message.allowances) { obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); } else { obj.allowances = []; } + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; @@ -466,9 +489,6 @@ export const QueryAllowancesByGranterResponse = { return message; }, }; - -======= ->>>>>>> telescope-upgrade /** Query defines the gRPC querier service. */ export interface Query { @@ -481,6 +501,7 @@ export interface Query { * AllowancesByGranter returns all the grants given by an address * Since v0.46 */ + AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise; } export class QueryClientImpl implements Query { diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 676ab64a..d4af33bf 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -63,12 +63,8 @@ export interface MigrateContractProposal { /** Contract is the address of the smart contract */ contract: string; -<<<<<<< HEAD /** CodeID references the new WASM code */ -======= - /** CodeID references the new WASM codesudo */ ->>>>>>> telescope-upgrade codeId: Long; /** Msg json encoded message to be passed to the contract on migration */ @@ -173,31 +169,34 @@ export interface UnpinCodesProposal { codeIds: Long[]; } - /** * AccessConfigUpdate contains the code id and the access config to be * applied. */ + export interface AccessConfigUpdate { /** CodeID is the reference to the stored WASM code to be updated */ codeId: Long; /** InstantiatePermission to apply to the set of code ids */ + instantiatePermission?: AccessConfig; } - /** * UpdateInstantiateConfigProposal gov proposal content type to update * instantiate config to a set of code ids. */ + export interface UpdateInstantiateConfigProposal { /** Title is a short summary */ title: string; /** Description is a human readable text */ + description: string; /** * AccessConfigUpdate contains the list of code ids and the access config * to be applied. */ + accessConfigUpdates: AccessConfigUpdate[]; } @@ -1155,10 +1154,12 @@ export const UnpinCodesProposal = { return message; }, }; -<<<<<<< HEAD function createBaseAccessConfigUpdate(): AccessConfigUpdate { - return { codeId: Long.UZERO, instantiatePermission: undefined }; + return { + codeId: Long.UZERO, + instantiatePermission: undefined, + }; } export const AccessConfigUpdate = { @@ -1166,9 +1167,11 @@ export const AccessConfigUpdate = { if (!message.codeId.isZero()) { writer.uint32(8).uint64(message.codeId); } + if (message.instantiatePermission !== undefined) { AccessConfig.encode(message.instantiatePermission, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -1176,20 +1179,25 @@ export const AccessConfigUpdate = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccessConfigUpdate(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.codeId = reader.uint64() as Long; break; + case 2: message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1225,7 +1233,11 @@ export const AccessConfigUpdate = { }; function createBaseUpdateInstantiateConfigProposal(): UpdateInstantiateConfigProposal { - return { title: "", description: "", accessConfigUpdates: [] }; + return { + title: "", + description: "", + accessConfigUpdates: [], + }; } export const UpdateInstantiateConfigProposal = { @@ -1233,12 +1245,15 @@ export const UpdateInstantiateConfigProposal = { if (message.title !== "") { writer.uint32(10).string(message.title); } + if (message.description !== "") { writer.uint32(18).string(message.description); } + for (const v of message.accessConfigUpdates) { AccessConfigUpdate.encode(v!, writer.uint32(26).fork()).ldelim(); } + return writer; }, @@ -1246,23 +1261,29 @@ export const UpdateInstantiateConfigProposal = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateInstantiateConfigProposal(); + 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.accessConfigUpdates.push(AccessConfigUpdate.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -1280,6 +1301,7 @@ export const UpdateInstantiateConfigProposal = { const obj: any = {}; message.title !== undefined && (obj.title = message.title); message.description !== undefined && (obj.description = message.description); + if (message.accessConfigUpdates) { obj.accessConfigUpdates = message.accessConfigUpdates.map((e) => e ? AccessConfigUpdate.toJSON(e) : undefined, @@ -1287,6 +1309,7 @@ export const UpdateInstantiateConfigProposal = { } else { obj.accessConfigUpdates = []; } + return obj; }, @@ -1301,77 +1324,3 @@ export const UpdateInstantiateConfigProposal = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} -======= ->>>>>>> telescope-upgrade diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 625834ec..5b1293f5 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,13 +1,8 @@ /* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; -<<<<<<< HEAD -import { AccessConfig, ContractCodeHistoryEntry, ContractInfo, Model } from "./types"; - -======= -import { ContractInfo, ContractCodeHistoryEntry, Model } from "./types"; +import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "./types"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; ->>>>>>> telescope-upgrade export const protobufPackage = "cosmwasm.wasm.v1"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -1113,15 +1108,12 @@ export const QueryCodeRequest = { }; function createBaseCodeInfoResponse(): CodeInfoResponse { -<<<<<<< HEAD - return { codeId: Long.UZERO, creator: "", dataHash: new Uint8Array(), instantiatePermission: undefined }; -======= return { codeId: Long.UZERO, creator: "", dataHash: new Uint8Array(), + instantiatePermission: undefined, }; ->>>>>>> telescope-upgrade } export const CodeInfoResponse = { @@ -1137,13 +1129,11 @@ export const CodeInfoResponse = { if (message.dataHash.length !== 0) { writer.uint32(26).bytes(message.dataHash); } -<<<<<<< HEAD + if (message.instantiatePermission !== undefined) { AccessConfig.encode(message.instantiatePermission, writer.uint32(50).fork()).ldelim(); } -======= ->>>>>>> telescope-upgrade return writer; }, @@ -1167,13 +1157,11 @@ export const CodeInfoResponse = { case 3: message.dataHash = reader.bytes(); break; -<<<<<<< HEAD + case 6: message.instantiatePermission = AccessConfig.decode(reader, reader.uint32()); break; -======= ->>>>>>> telescope-upgrade default: reader.skipType(tag & 7); break; diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index ea7ee2a6..a579255f 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** AccessType permission types */ @@ -341,15 +341,10 @@ export const AccessConfig = { }; function createBaseParams(): Params { -<<<<<<< HEAD - return { codeUploadAccess: undefined, instantiateDefaultPermission: 0 }; -======= return { codeUploadAccess: undefined, instantiateDefaultPermission: 0, - maxWasmCodeSize: Long.UZERO, }; ->>>>>>> telescope-upgrade } export const Params = { @@ -361,14 +356,7 @@ export const Params = { if (message.instantiateDefaultPermission !== 0) { writer.uint32(16).int32(message.instantiateDefaultPermission); } -<<<<<<< HEAD -======= - if (!message.maxWasmCodeSize.isZero()) { - writer.uint32(24).uint64(message.maxWasmCodeSize); - } - ->>>>>>> telescope-upgrade return writer; }, @@ -388,14 +376,7 @@ export const Params = { case 2: message.instantiateDefaultPermission = reader.int32() as any; break; -<<<<<<< HEAD -======= - - case 3: - message.maxWasmCodeSize = reader.uint64() as Long; - break; ->>>>>>> telescope-upgrade default: reader.skipType(tag & 7); break; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts index f336e668..d249eec5 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,20 +1,21 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; - /** * Params defines the set of on-chain interchain accounts parameters. * The following parameters may be used to disable the controller submodule. */ + export interface Params { /** controller_enabled enables or disables the controller submodule. */ controllerEnabled: boolean; } function createBaseParams(): Params { - return { controllerEnabled: false }; + return { + controllerEnabled: false, + }; } export const Params = { @@ -22,6 +23,7 @@ export const Params = { if (message.controllerEnabled === true) { writer.uint32(8).bool(message.controllerEnabled); } + return writer; }, @@ -29,22 +31,28 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.controllerEnabled = reader.bool(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): Params { - return { controllerEnabled: isSet(object.controllerEnabled) ? Boolean(object.controllerEnabled) : false }; + return { + controllerEnabled: isSet(object.controllerEnabled) ? Boolean(object.controllerEnabled) : false, + }; }, toJSON(message: Params): unknown { @@ -59,31 +67,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/ibc/applications/interchain_accounts/controller/v1/query.ts index fb9cca29..a3dad9eb 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -1,14 +1,13 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Params } from "./controller"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; @@ -27,14 +26,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -54,7 +56,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -62,6 +66,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -69,22 +74,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -100,20 +111,21 @@ export const QueryParamsResponse = { return message; }, }; - /** Query provides defines the gRPC querier service. */ + export interface Query { /** Params queries all parameters of the ICA controller submodule. */ - Params(request: QueryParamsRequest): Promise; + Params(request?: QueryParamsRequest): Promise; } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); } - Params(request: QueryParamsRequest): Promise { + + Params(request: QueryParamsRequest = {}): Promise { const data = QueryParamsRequest.encode(request).finish(); const promise = this.rpc.request( "ibc.applications.interchain_accounts.controller.v1.Query", @@ -123,35 +135,3 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/host/v1/host.ts b/src/ibc/applications/interchain_accounts/host/v1/host.ts index ef4bb16e..7061c3b4 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,22 +1,25 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; - /** * Params defines the set of on-chain interchain accounts parameters. * The following parameters may be used to disable the host submodule. */ + export interface Params { /** host_enabled enables or disables the host submodule. */ hostEnabled: boolean; /** allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. */ + allowMessages: string[]; } function createBaseParams(): Params { - return { hostEnabled: false, allowMessages: [] }; + return { + hostEnabled: false, + allowMessages: [], + }; } export const Params = { @@ -24,9 +27,11 @@ export const Params = { if (message.hostEnabled === true) { writer.uint32(8).bool(message.hostEnabled); } + for (const v of message.allowMessages) { writer.uint32(18).string(v!); } + return writer; }, @@ -34,20 +39,25 @@ export const Params = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.hostEnabled = reader.bool(); break; + case 2: message.allowMessages.push(reader.string()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -63,11 +73,13 @@ export const Params = { toJSON(message: Params): unknown { const obj: any = {}; message.hostEnabled !== undefined && (obj.hostEnabled = message.hostEnabled); + if (message.allowMessages) { obj.allowMessages = message.allowMessages.map((e) => e); } else { obj.allowMessages = []; } + return obj; }, @@ -78,31 +90,3 @@ export const Params = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/host/v1/query.ts b/src/ibc/applications/interchain_accounts/host/v1/query.ts index 6dee7bd0..4ef51112 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/query.ts @@ -1,14 +1,13 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Params } from "./host"; - +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; - /** QueryParamsRequest is the request type for the Query/Params RPC method. */ -export interface QueryParamsRequest {} +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; @@ -27,14 +26,17 @@ export const QueryParamsRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } + return message; }, @@ -54,7 +56,9 @@ export const QueryParamsRequest = { }; function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; + return { + params: undefined, + }; } export const QueryParamsResponse = { @@ -62,6 +66,7 @@ export const QueryParamsResponse = { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -69,22 +74,28 @@ export const QueryParamsResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); + 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; + return { + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + }; }, toJSON(message: QueryParamsResponse): unknown { @@ -100,54 +111,23 @@ export const QueryParamsResponse = { return message; }, }; - /** Query provides defines the gRPC querier service. */ + export interface Query { /** Params queries all parameters of the ICA host submodule. */ - Params(request: QueryParamsRequest): Promise; + Params(request?: QueryParamsRequest): Promise; } - export class QueryClientImpl implements Query { private readonly rpc: Rpc; + constructor(rpc: Rpc) { this.rpc = rpc; this.Params = this.Params.bind(this); } - Params(request: QueryParamsRequest): Promise { + + Params(request: QueryParamsRequest = {}): Promise { const data = QueryParamsRequest.encode(request).finish(); const promise = this.rpc.request("ibc.applications.interchain_accounts.host.v1.Query", "Params", data); return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); } } - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/v1/account.ts b/src/ibc/applications/interchain_accounts/v1/account.ts index 33967db3..ecc4f4b8 100644 --- a/src/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/ibc/applications/interchain_accounts/v1/account.ts @@ -1,18 +1,20 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { BaseAccount } from "../../../../cosmos/auth/v1beta1/auth"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; - /** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ + export interface InterchainAccount { baseAccount?: BaseAccount; accountOwner: string; } function createBaseInterchainAccount(): InterchainAccount { - return { baseAccount: undefined, accountOwner: "" }; + return { + baseAccount: undefined, + accountOwner: "", + }; } export const InterchainAccount = { @@ -20,9 +22,11 @@ export const InterchainAccount = { if (message.baseAccount !== undefined) { BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim(); } + if (message.accountOwner !== "") { writer.uint32(18).string(message.accountOwner); } + return writer; }, @@ -30,20 +34,25 @@ export const InterchainAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInterchainAccount(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.baseAccount = BaseAccount.decode(reader, reader.uint32()); break; + case 2: message.accountOwner = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -72,31 +81,3 @@ export const InterchainAccount = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/v1/genesis.ts b/src/ibc/applications/interchain_accounts/v1/genesis.ts index 54ea9af0..4ba61838 100644 --- a/src/ibc/applications/interchain_accounts/v1/genesis.ts +++ b/src/ibc/applications/interchain_accounts/v1/genesis.ts @@ -1,41 +1,40 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; -import { Params } from "../controller/v1/controller"; -import { Params as Params1 } from "../host/v1/host"; - +import { Params as Params1 } from "../controller/v1/controller"; +import { Params as Params2 } from "../host/v1/host"; +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; - /** GenesisState defines the interchain accounts genesis state */ + export interface GenesisState { controllerGenesisState?: ControllerGenesisState; hostGenesisState?: HostGenesisState; } - /** ControllerGenesisState defines the interchain accounts controller genesis state */ + export interface ControllerGenesisState { activeChannels: ActiveChannel[]; interchainAccounts: RegisteredInterchainAccount[]; ports: string[]; - params?: Params; + params?: Params1; } - /** HostGenesisState defines the interchain accounts host genesis state */ + export interface HostGenesisState { activeChannels: ActiveChannel[]; interchainAccounts: RegisteredInterchainAccount[]; port: string; - params?: Params1; + params?: Params2; } - /** ActiveChannel contains a connection ID, port ID and associated active channel ID */ + export interface ActiveChannel { connectionId: string; portId: string; channelId: string; } - /** RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address */ + export interface RegisteredInterchainAccount { connectionId: string; portId: string; @@ -43,7 +42,10 @@ export interface RegisteredInterchainAccount { } function createBaseGenesisState(): GenesisState { - return { controllerGenesisState: undefined, hostGenesisState: undefined }; + return { + controllerGenesisState: undefined, + hostGenesisState: undefined, + }; } export const GenesisState = { @@ -51,9 +53,11 @@ export const GenesisState = { if (message.controllerGenesisState !== undefined) { ControllerGenesisState.encode(message.controllerGenesisState, writer.uint32(10).fork()).ldelim(); } + if (message.hostGenesisState !== undefined) { HostGenesisState.encode(message.hostGenesisState, writer.uint32(18).fork()).ldelim(); } + return writer; }, @@ -61,20 +65,25 @@ export const GenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.controllerGenesisState = ControllerGenesisState.decode(reader, reader.uint32()); break; + case 2: message.hostGenesisState = HostGenesisState.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -117,7 +126,12 @@ export const GenesisState = { }; function createBaseControllerGenesisState(): ControllerGenesisState { - return { activeChannels: [], interchainAccounts: [], ports: [], params: undefined }; + return { + activeChannels: [], + interchainAccounts: [], + ports: [], + params: undefined, + }; } export const ControllerGenesisState = { @@ -125,15 +139,19 @@ export const ControllerGenesisState = { for (const v of message.activeChannels) { ActiveChannel.encode(v!, writer.uint32(10).fork()).ldelim(); } + for (const v of message.interchainAccounts) { RegisteredInterchainAccount.encode(v!, writer.uint32(18).fork()).ldelim(); } + for (const v of message.ports) { writer.uint32(26).string(v!); } + if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(34).fork()).ldelim(); + Params1.encode(message.params, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -141,26 +159,33 @@ export const ControllerGenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseControllerGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.activeChannels.push(ActiveChannel.decode(reader, reader.uint32())); break; + case 2: message.interchainAccounts.push(RegisteredInterchainAccount.decode(reader, reader.uint32())); break; + case 3: message.ports.push(reader.string()); break; + case 4: - message.params = Params.decode(reader, reader.uint32()); + message.params = Params1.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -173,17 +198,19 @@ export const ControllerGenesisState = { ? object.interchainAccounts.map((e: any) => RegisteredInterchainAccount.fromJSON(e)) : [], ports: Array.isArray(object?.ports) ? object.ports.map((e: any) => String(e)) : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params1.fromJSON(object.params) : undefined, }; }, toJSON(message: ControllerGenesisState): unknown { const obj: any = {}; + if (message.activeChannels) { obj.activeChannels = message.activeChannels.map((e) => (e ? ActiveChannel.toJSON(e) : undefined)); } else { obj.activeChannels = []; } + if (message.interchainAccounts) { obj.interchainAccounts = message.interchainAccounts.map((e) => e ? RegisteredInterchainAccount.toJSON(e) : undefined, @@ -191,12 +218,15 @@ export const ControllerGenesisState = { } else { obj.interchainAccounts = []; } + if (message.ports) { obj.ports = message.ports.map((e) => e); } else { obj.ports = []; } - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); + + message.params !== undefined && + (obj.params = message.params ? Params1.toJSON(message.params) : undefined); return obj; }, @@ -207,13 +237,18 @@ export const ControllerGenesisState = { object.interchainAccounts?.map((e) => RegisteredInterchainAccount.fromPartial(e)) || []; message.ports = object.ports?.map((e) => e) || []; message.params = - object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + object.params !== undefined && object.params !== null ? Params1.fromPartial(object.params) : undefined; return message; }, }; function createBaseHostGenesisState(): HostGenesisState { - return { activeChannels: [], interchainAccounts: [], port: "", params: undefined }; + return { + activeChannels: [], + interchainAccounts: [], + port: "", + params: undefined, + }; } export const HostGenesisState = { @@ -221,15 +256,19 @@ export const HostGenesisState = { for (const v of message.activeChannels) { ActiveChannel.encode(v!, writer.uint32(10).fork()).ldelim(); } + for (const v of message.interchainAccounts) { RegisteredInterchainAccount.encode(v!, writer.uint32(18).fork()).ldelim(); } + if (message.port !== "") { writer.uint32(26).string(message.port); } + if (message.params !== undefined) { - Params1.encode(message.params, writer.uint32(34).fork()).ldelim(); + Params2.encode(message.params, writer.uint32(34).fork()).ldelim(); } + return writer; }, @@ -237,26 +276,33 @@ export const HostGenesisState = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHostGenesisState(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.activeChannels.push(ActiveChannel.decode(reader, reader.uint32())); break; + case 2: message.interchainAccounts.push(RegisteredInterchainAccount.decode(reader, reader.uint32())); break; + case 3: message.port = reader.string(); break; + case 4: - message.params = Params1.decode(reader, reader.uint32()); + message.params = Params2.decode(reader, reader.uint32()); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -269,17 +315,19 @@ export const HostGenesisState = { ? object.interchainAccounts.map((e: any) => RegisteredInterchainAccount.fromJSON(e)) : [], port: isSet(object.port) ? String(object.port) : "", - params: isSet(object.params) ? Params1.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params2.fromJSON(object.params) : undefined, }; }, toJSON(message: HostGenesisState): unknown { const obj: any = {}; + if (message.activeChannels) { obj.activeChannels = message.activeChannels.map((e) => (e ? ActiveChannel.toJSON(e) : undefined)); } else { obj.activeChannels = []; } + if (message.interchainAccounts) { obj.interchainAccounts = message.interchainAccounts.map((e) => e ? RegisteredInterchainAccount.toJSON(e) : undefined, @@ -287,9 +335,10 @@ export const HostGenesisState = { } else { obj.interchainAccounts = []; } + message.port !== undefined && (obj.port = message.port); message.params !== undefined && - (obj.params = message.params ? Params1.toJSON(message.params) : undefined); + (obj.params = message.params ? Params2.toJSON(message.params) : undefined); return obj; }, @@ -300,13 +349,17 @@ export const HostGenesisState = { object.interchainAccounts?.map((e) => RegisteredInterchainAccount.fromPartial(e)) || []; message.port = object.port ?? ""; message.params = - object.params !== undefined && object.params !== null ? Params1.fromPartial(object.params) : undefined; + object.params !== undefined && object.params !== null ? Params2.fromPartial(object.params) : undefined; return message; }, }; function createBaseActiveChannel(): ActiveChannel { - return { connectionId: "", portId: "", channelId: "" }; + return { + connectionId: "", + portId: "", + channelId: "", + }; } export const ActiveChannel = { @@ -314,12 +367,15 @@ export const ActiveChannel = { if (message.connectionId !== "") { writer.uint32(10).string(message.connectionId); } + if (message.portId !== "") { writer.uint32(18).string(message.portId); } + if (message.channelId !== "") { writer.uint32(26).string(message.channelId); } + return writer; }, @@ -327,23 +383,29 @@ export const ActiveChannel = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseActiveChannel(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.connectionId = reader.string(); break; + case 2: message.portId = reader.string(); break; + case 3: message.channelId = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -373,7 +435,11 @@ export const ActiveChannel = { }; function createBaseRegisteredInterchainAccount(): RegisteredInterchainAccount { - return { connectionId: "", portId: "", accountAddress: "" }; + return { + connectionId: "", + portId: "", + accountAddress: "", + }; } export const RegisteredInterchainAccount = { @@ -381,12 +447,15 @@ export const RegisteredInterchainAccount = { if (message.connectionId !== "") { writer.uint32(10).string(message.connectionId); } + if (message.portId !== "") { writer.uint32(18).string(message.portId); } + if (message.accountAddress !== "") { writer.uint32(26).string(message.accountAddress); } + return writer; }, @@ -394,23 +463,29 @@ export const RegisteredInterchainAccount = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRegisteredInterchainAccount(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.connectionId = reader.string(); break; + case 2: message.portId = reader.string(); break; + case 3: message.accountAddress = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -440,31 +515,3 @@ export const RegisteredInterchainAccount = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/v1/metadata.ts b/src/ibc/applications/interchain_accounts/v1/metadata.ts index 12d12dff..f4b5d1d2 100644 --- a/src/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,28 +1,32 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; - /** * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring * See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning */ + export interface Metadata { /** version defines the ICS27 protocol version */ version: string; /** controller_connection_id is the connection identifier associated with the controller chain */ + controllerConnectionId: string; /** host_connection_id is the connection identifier associated with the host chain */ + hostConnectionId: string; /** * address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step * NOTE: the address field is empty on the OnChanOpenInit handshake step */ + address: string; /** encoding defines the supported codec format */ + encoding: string; /** tx_type defines the type of transactions the interchain account can execute */ + txType: string; } @@ -42,21 +46,27 @@ export const Metadata = { if (message.version !== "") { writer.uint32(10).string(message.version); } + if (message.controllerConnectionId !== "") { writer.uint32(18).string(message.controllerConnectionId); } + if (message.hostConnectionId !== "") { writer.uint32(26).string(message.hostConnectionId); } + if (message.address !== "") { writer.uint32(34).string(message.address); } + if (message.encoding !== "") { writer.uint32(42).string(message.encoding); } + if (message.txType !== "") { writer.uint32(50).string(message.txType); } + return writer; }, @@ -64,32 +74,41 @@ export const Metadata = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMetadata(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.version = reader.string(); break; + case 2: message.controllerConnectionId = reader.string(); break; + case 3: message.hostConnectionId = reader.string(); break; + case 4: message.address = reader.string(); break; + case 5: message.encoding = reader.string(); break; + case 6: message.txType = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -129,31 +148,3 @@ export const Metadata = { return message; }, }; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/interchain_accounts/v1/packet.ts b/src/ibc/applications/interchain_accounts/v1/packet.ts index 897a9d29..75baf7d0 100644 --- a/src/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/ibc/applications/interchain_accounts/v1/packet.ts @@ -1,63 +1,69 @@ /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; import { Any } from "../../../../google/protobuf/any"; - +import * as _m0 from "protobufjs/minimal"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; - /** * Type defines a classification of message issued from a controller chain to its associated interchain accounts * host */ + export enum Type { /** TYPE_UNSPECIFIED - Default zero value enumeration */ TYPE_UNSPECIFIED = 0, + /** TYPE_EXECUTE_TX - Execute a transaction on an interchain accounts host chain */ TYPE_EXECUTE_TX = 1, UNRECOGNIZED = -1, } - export function typeFromJSON(object: any): Type { switch (object) { case 0: case "TYPE_UNSPECIFIED": return Type.TYPE_UNSPECIFIED; + case 1: case "TYPE_EXECUTE_TX": return Type.TYPE_EXECUTE_TX; + case -1: case "UNRECOGNIZED": default: return Type.UNRECOGNIZED; } } - export function typeToJSON(object: Type): string { switch (object) { case Type.TYPE_UNSPECIFIED: return "TYPE_UNSPECIFIED"; + case Type.TYPE_EXECUTE_TX: return "TYPE_EXECUTE_TX"; + case Type.UNRECOGNIZED: default: return "UNRECOGNIZED"; } } - /** InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. */ + export interface InterchainAccountPacketData { type: Type; data: Uint8Array; memo: string; } - /** CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. */ + export interface CosmosTx { messages: Any[]; } function createBaseInterchainAccountPacketData(): InterchainAccountPacketData { - return { type: 0, data: new Uint8Array(), memo: "" }; + return { + type: 0, + data: new Uint8Array(), + memo: "", + }; } export const InterchainAccountPacketData = { @@ -65,12 +71,15 @@ export const InterchainAccountPacketData = { if (message.type !== 0) { writer.uint32(8).int32(message.type); } + if (message.data.length !== 0) { writer.uint32(18).bytes(message.data); } + if (message.memo !== "") { writer.uint32(26).string(message.memo); } + return writer; }, @@ -78,23 +87,29 @@ export const InterchainAccountPacketData = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInterchainAccountPacketData(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.type = reader.int32() as any; break; + case 2: message.data = reader.bytes(); break; + case 3: message.memo = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -127,7 +142,9 @@ export const InterchainAccountPacketData = { }; function createBaseCosmosTx(): CosmosTx { - return { messages: [] }; + return { + messages: [], + }; } export const CosmosTx = { @@ -135,6 +152,7 @@ export const CosmosTx = { for (const v of message.messages) { Any.encode(v!, writer.uint32(10).fork()).ldelim(); } + return writer; }, @@ -142,17 +160,21 @@ export const CosmosTx = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCosmosTx(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.messages.push(Any.decode(reader, reader.uint32())); break; + default: reader.skipType(tag & 7); break; } } + return message; }, @@ -164,11 +186,13 @@ export const CosmosTx = { toJSON(message: CosmosTx): unknown { const obj: any = {}; + if (message.messages) { obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined)); } else { obj.messages = []; } + return obj; }, @@ -178,75 +202,3 @@ export const CosmosTx = { return message; }, }; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index b23f976e..fcc31edd 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -52,20 +52,20 @@ export interface QueryParamsResponse { /** params defines the parameters of the module. */ params?: Params; } - /** * QueryDenomHashRequest is the request type for the Query/DenomHash RPC * method */ + export interface QueryDenomHashRequest { /** The denomination trace ([port_id]/[channel_id])+/[denom] */ trace: string; } - /** * QueryDenomHashResponse is the response type for the Query/DenomHash RPC * method. */ + export interface QueryDenomHashResponse { /** hash (in hex format) of the denomination trace information. */ hash: string; @@ -427,10 +427,11 @@ export const QueryParamsResponse = { return message; }, }; -<<<<<<< HEAD function createBaseQueryDenomHashRequest(): QueryDenomHashRequest { - return { trace: "" }; + return { + trace: "", + }; } export const QueryDenomHashRequest = { @@ -438,6 +439,7 @@ export const QueryDenomHashRequest = { if (message.trace !== "") { writer.uint32(10).string(message.trace); } + return writer; }, @@ -445,22 +447,28 @@ export const QueryDenomHashRequest = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomHashRequest(); + while (reader.pos < end) { const tag = reader.uint32(); + switch (tag >>> 3) { case 1: message.trace = reader.string(); break; + default: reader.skipType(tag & 7); break; } } + return message; }, fromJSON(object: any): QueryDenomHashRequest { - return { trace: isSet(object.trace) ? String(object.trace) : "" }; + return { + trace: isSet(object.trace) ? String(object.trace) : "", + }; }, toJSON(message: QueryDenomHashRequest): unknown { @@ -477,7 +485,9 @@ export const QueryDenomHashRequest = { }; function createBaseQueryDenomHashResponse(): QueryDenomHashResponse { - return { hash: "" }; + return { + hash: "", + }; } export const QueryDenomHashResponse = { @@ -485,6 +495,7 @@ export const QueryDenomHashResponse = { if (message.hash !== "") { writer.uint32(10).string(message.hash); } + return writer; }, @@ -492,22 +503,28 @@ export const QueryDenomHashResponse = { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDenomHashResponse(); + 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): QueryDenomHashResponse { - return { hash: isSet(object.hash) ? String(object.hash) : "" }; + return { + hash: isSet(object.hash) ? String(object.hash) : "", + }; }, toJSON(message: QueryDenomHashResponse): unknown { @@ -522,9 +539,6 @@ export const QueryDenomHashResponse = { return message; }, }; - -======= ->>>>>>> telescope-upgrade /** Query provides defines the gRPC querier service. */ export interface Query { @@ -534,15 +548,11 @@ export interface Query { DenomTraces(request?: QueryDenomTracesRequest): Promise; /** Params queries all parameters of the ibc-transfer module. */ -<<<<<<< HEAD - Params(request: QueryParamsRequest): Promise; - /** DenomHash queries a denomination hash information. */ - DenomHash(request: QueryDenomHashRequest): Promise; -} -======= ->>>>>>> telescope-upgrade Params(request?: QueryParamsRequest): Promise; + /** DenomHash queries a denomination hash information. */ + + DenomHash(request: QueryDenomHashRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index d7ab32d3..f091ef65 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -4,53 +4,55 @@ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; -<<<<<<< HEAD - /** ResponseResultType defines the possible outcomes of the execution of a message */ + export enum ResponseResultType { /** RESPONSE_RESULT_UNSPECIFIED - Default zero value enumeration */ RESPONSE_RESULT_UNSPECIFIED = 0, + /** RESPONSE_RESULT_NOOP - The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) */ RESPONSE_RESULT_NOOP = 1, + /** RESPONSE_RESULT_SUCCESS - The message was executed successfully */ RESPONSE_RESULT_SUCCESS = 2, UNRECOGNIZED = -1, } - export function responseResultTypeFromJSON(object: any): ResponseResultType { switch (object) { case 0: case "RESPONSE_RESULT_UNSPECIFIED": return ResponseResultType.RESPONSE_RESULT_UNSPECIFIED; + case 1: case "RESPONSE_RESULT_NOOP": return ResponseResultType.RESPONSE_RESULT_NOOP; + case 2: case "RESPONSE_RESULT_SUCCESS": return ResponseResultType.RESPONSE_RESULT_SUCCESS; + case -1: case "UNRECOGNIZED": default: return ResponseResultType.UNRECOGNIZED; } } - export function responseResultTypeToJSON(object: ResponseResultType): string { switch (object) { case ResponseResultType.RESPONSE_RESULT_UNSPECIFIED: return "RESPONSE_RESULT_UNSPECIFIED"; + case ResponseResultType.RESPONSE_RESULT_NOOP: return "RESPONSE_RESULT_NOOP"; + case ResponseResultType.RESPONSE_RESULT_SUCCESS: return "RESPONSE_RESULT_SUCCESS"; + case ResponseResultType.UNRECOGNIZED: default: return "UNRECOGNIZED"; } } - -======= ->>>>>>> telescope-upgrade /** * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It * is called by a relayer on Chain A. @@ -62,14 +64,10 @@ export interface MsgChannelOpenInit { signer: string; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ -<<<<<<< HEAD + export interface MsgChannelOpenInitResponse { channelId: string; } -======= ->>>>>>> telescope-upgrade - -export interface MsgChannelOpenInitResponse {} /** * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel * on Chain B. The version field within the Channel field has been deprecated. Its @@ -85,6 +83,7 @@ export interface MsgChannelOpenTry { previousChannelId: string; /** NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. */ + channel?: Channel; counterpartyVersion: string; proofInit: Uint8Array; @@ -169,14 +168,10 @@ export interface MsgRecvPacket { signer: string; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ -<<<<<<< HEAD + export interface MsgRecvPacketResponse { result: ResponseResultType; } -======= ->>>>>>> telescope-upgrade - -export interface MsgRecvPacketResponse {} /** MsgTimeout receives timed-out packet */ export interface MsgTimeout { @@ -187,14 +182,10 @@ export interface MsgTimeout { signer: string; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ -<<<<<<< HEAD + export interface MsgTimeoutResponse { result: ResponseResultType; } -======= ->>>>>>> telescope-upgrade - -export interface MsgTimeoutResponse {} /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ export interface MsgTimeoutOnClose { @@ -206,14 +197,10 @@ export interface MsgTimeoutOnClose { signer: string; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ -<<<<<<< HEAD + export interface MsgTimeoutOnCloseResponse { result: ResponseResultType; } -======= ->>>>>>> telescope-upgrade - -export interface MsgTimeoutOnCloseResponse {} /** MsgAcknowledgement receives incoming IBC acknowledgement */ export interface MsgAcknowledgement { @@ -224,14 +211,10 @@ export interface MsgAcknowledgement { signer: string; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ -<<<<<<< HEAD + export interface MsgAcknowledgementResponse { result: ResponseResultType; } -======= - -export interface MsgAcknowledgementResponse {} ->>>>>>> telescope-upgrade function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { return { @@ -318,7 +301,9 @@ export const MsgChannelOpenInit = { }; function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { - return { channelId: "" }; + return { + channelId: "", + }; } export const MsgChannelOpenInitResponse = { @@ -326,6 +311,7 @@ export const MsgChannelOpenInitResponse = { if (message.channelId !== "") { writer.uint32(10).string(message.channelId); } + return writer; }, @@ -341,6 +327,7 @@ export const MsgChannelOpenInitResponse = { case 1: message.channelId = reader.string(); break; + default: reader.skipType(tag & 7); break; @@ -351,7 +338,9 @@ export const MsgChannelOpenInitResponse = { }, fromJSON(object: any): MsgChannelOpenInitResponse { - return { channelId: isSet(object.channelId) ? String(object.channelId) : "" }; + return { + channelId: isSet(object.channelId) ? String(object.channelId) : "", + }; }, toJSON(message: MsgChannelOpenInitResponse): unknown { @@ -1261,7 +1250,9 @@ export const MsgRecvPacket = { }; function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { - return { result: 0 }; + return { + result: 0, + }; } export const MsgRecvPacketResponse = { @@ -1269,6 +1260,7 @@ export const MsgRecvPacketResponse = { if (message.result !== 0) { writer.uint32(8).int32(message.result); } + return writer; }, @@ -1284,6 +1276,7 @@ export const MsgRecvPacketResponse = { case 1: message.result = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; @@ -1294,7 +1287,9 @@ export const MsgRecvPacketResponse = { }, fromJSON(object: any): MsgRecvPacketResponse { - return { result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 }; + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0, + }; }, toJSON(message: MsgRecvPacketResponse): unknown { @@ -1429,7 +1424,9 @@ export const MsgTimeout = { }; function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { - return { result: 0 }; + return { + result: 0, + }; } export const MsgTimeoutResponse = { @@ -1437,6 +1434,7 @@ export const MsgTimeoutResponse = { if (message.result !== 0) { writer.uint32(8).int32(message.result); } + return writer; }, @@ -1452,6 +1450,7 @@ export const MsgTimeoutResponse = { case 1: message.result = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; @@ -1462,7 +1461,9 @@ export const MsgTimeoutResponse = { }, fromJSON(object: any): MsgTimeoutResponse { - return { result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 }; + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0, + }; }, toJSON(message: MsgTimeoutResponse): unknown { @@ -1612,7 +1613,9 @@ export const MsgTimeoutOnClose = { }; function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { - return { result: 0 }; + return { + result: 0, + }; } export const MsgTimeoutOnCloseResponse = { @@ -1620,6 +1623,7 @@ export const MsgTimeoutOnCloseResponse = { if (message.result !== 0) { writer.uint32(8).int32(message.result); } + return writer; }, @@ -1635,6 +1639,7 @@ export const MsgTimeoutOnCloseResponse = { case 1: message.result = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; @@ -1645,7 +1650,9 @@ export const MsgTimeoutOnCloseResponse = { }, fromJSON(object: any): MsgTimeoutOnCloseResponse { - return { result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 }; + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0, + }; }, toJSON(message: MsgTimeoutOnCloseResponse): unknown { @@ -1781,7 +1788,9 @@ export const MsgAcknowledgement = { }; function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { - return { result: 0 }; + return { + result: 0, + }; } export const MsgAcknowledgementResponse = { @@ -1789,6 +1798,7 @@ export const MsgAcknowledgementResponse = { if (message.result !== 0) { writer.uint32(8).int32(message.result); } + return writer; }, @@ -1804,6 +1814,7 @@ export const MsgAcknowledgementResponse = { case 1: message.result = reader.int32() as any; break; + default: reader.skipType(tag & 7); break; @@ -1814,7 +1825,9 @@ export const MsgAcknowledgementResponse = { }, fromJSON(object: any): MsgAcknowledgementResponse { - return { result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0 }; + return { + result: isSet(object.result) ? responseResultTypeFromJSON(object.result) : 0, + }; }, toJSON(message: MsgAcknowledgementResponse): unknown { From a34ec0e77bd5c36c8ce776a47c91020cd9b45580 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 12 Oct 2022 16:05:02 -0700 Subject: [PATCH 27/38] tslint --- scripts/codegen.js | 2 +- src/confio/proofs.ts | 1 + src/cosmos/auth/v1beta1/auth.ts | 1 + src/cosmos/auth/v1beta1/genesis.ts | 1 + src/cosmos/auth/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/authz.ts | 1 + src/cosmos/authz/v1beta1/genesis.ts | 1 + src/cosmos/authz/v1beta1/query.ts | 1 + src/cosmos/authz/v1beta1/tx.ts | 1 + src/cosmos/bank/v1beta1/authz.ts | 1 + src/cosmos/bank/v1beta1/bank.ts | 1 + src/cosmos/bank/v1beta1/genesis.ts | 1 + src/cosmos/bank/v1beta1/query.ts | 1 + src/cosmos/bank/v1beta1/tx.ts | 1 + src/cosmos/base/abci/v1beta1/abci.ts | 1 + src/cosmos/base/kv/v1beta1/kv.ts | 1 + src/cosmos/base/query/v1beta1/pagination.ts | 1 + src/cosmos/base/reflection/v1beta1/reflection.ts | 1 + src/cosmos/base/snapshots/v1beta1/snapshot.ts | 1 + src/cosmos/base/store/v1beta1/commit_info.ts | 1 + src/cosmos/base/store/v1beta1/listening.ts | 1 + src/cosmos/base/store/v1beta1/snapshot.ts | 1 + src/cosmos/base/tendermint/v1beta1/query.ts | 1 + src/cosmos/base/v1beta1/coin.ts | 1 + src/cosmos/capability/v1beta1/capability.ts | 1 + src/cosmos/capability/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/genesis.ts | 1 + src/cosmos/crisis/v1beta1/tx.ts | 1 + src/cosmos/crypto/ed25519/keys.ts | 1 + src/cosmos/crypto/multisig/keys.ts | 1 + src/cosmos/crypto/multisig/v1beta1/multisig.ts | 1 + src/cosmos/crypto/secp256k1/keys.ts | 1 + src/cosmos/distribution/v1beta1/distribution.ts | 1 + src/cosmos/distribution/v1beta1/genesis.ts | 1 + src/cosmos/distribution/v1beta1/query.ts | 1 + src/cosmos/distribution/v1beta1/tx.ts | 1 + src/cosmos/evidence/v1beta1/evidence.ts | 1 + src/cosmos/evidence/v1beta1/genesis.ts | 1 + src/cosmos/evidence/v1beta1/query.ts | 1 + src/cosmos/evidence/v1beta1/tx.ts | 1 + src/cosmos/feegrant/v1beta1/feegrant.ts | 1 + src/cosmos/feegrant/v1beta1/genesis.ts | 1 + src/cosmos/feegrant/v1beta1/query.ts | 1 + src/cosmos/feegrant/v1beta1/tx.ts | 1 + src/cosmos/genutil/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/genesis.ts | 1 + src/cosmos/gov/v1beta1/gov.ts | 1 + src/cosmos/gov/v1beta1/query.ts | 1 + src/cosmos/gov/v1beta1/tx.ts | 1 + src/cosmos/mint/v1beta1/genesis.ts | 1 + src/cosmos/mint/v1beta1/mint.ts | 1 + src/cosmos/mint/v1beta1/query.ts | 1 + src/cosmos/params/v1beta1/params.ts | 1 + src/cosmos/params/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/genesis.ts | 1 + src/cosmos/slashing/v1beta1/query.ts | 1 + src/cosmos/slashing/v1beta1/slashing.ts | 1 + src/cosmos/slashing/v1beta1/tx.ts | 1 + src/cosmos/staking/v1beta1/authz.ts | 1 + src/cosmos/staking/v1beta1/genesis.ts | 1 + src/cosmos/staking/v1beta1/query.ts | 1 + src/cosmos/staking/v1beta1/staking.ts | 1 + src/cosmos/staking/v1beta1/tx.ts | 1 + src/cosmos/tx/signing/v1beta1/signing.ts | 1 + src/cosmos/tx/v1beta1/service.ts | 1 + src/cosmos/tx/v1beta1/tx.ts | 1 + src/cosmos/upgrade/v1beta1/query.ts | 1 + src/cosmos/upgrade/v1beta1/upgrade.ts | 1 + src/cosmos/vesting/v1beta1/tx.ts | 1 + src/cosmos/vesting/v1beta1/vesting.ts | 1 + src/cosmwasm/wasm/v1/genesis.ts | 1 + src/cosmwasm/wasm/v1/ibc.ts | 1 + src/cosmwasm/wasm/v1/proposal.ts | 1 + src/cosmwasm/wasm/v1/query.ts | 1 + src/cosmwasm/wasm/v1/tx.ts | 1 + src/cosmwasm/wasm/v1/types.ts | 1 + src/google/api/http.ts | 1 + src/google/protobuf/any.ts | 1 + src/google/protobuf/descriptor.ts | 1 + src/google/protobuf/duration.ts | 1 + src/google/protobuf/timestamp.ts | 1 + src/helpers.ts | 1 + .../interchain_accounts/controller/v1/controller.ts | 1 + src/ibc/applications/interchain_accounts/controller/v1/query.ts | 1 + src/ibc/applications/interchain_accounts/host/v1/host.ts | 1 + src/ibc/applications/interchain_accounts/host/v1/query.ts | 1 + src/ibc/applications/interchain_accounts/v1/account.ts | 1 + src/ibc/applications/interchain_accounts/v1/genesis.ts | 1 + src/ibc/applications/interchain_accounts/v1/metadata.ts | 1 + src/ibc/applications/interchain_accounts/v1/packet.ts | 1 + src/ibc/applications/transfer/v1/genesis.ts | 1 + src/ibc/applications/transfer/v1/query.ts | 1 + src/ibc/applications/transfer/v1/transfer.ts | 1 + src/ibc/applications/transfer/v1/tx.ts | 1 + src/ibc/applications/transfer/v2/packet.ts | 1 + src/ibc/core/channel/v1/channel.ts | 1 + src/ibc/core/channel/v1/genesis.ts | 1 + src/ibc/core/channel/v1/query.ts | 1 + src/ibc/core/channel/v1/tx.ts | 1 + src/ibc/core/client/v1/client.ts | 1 + src/ibc/core/client/v1/genesis.ts | 1 + src/ibc/core/client/v1/query.ts | 1 + src/ibc/core/client/v1/tx.ts | 1 + src/ibc/core/commitment/v1/commitment.ts | 1 + src/ibc/core/connection/v1/connection.ts | 1 + src/ibc/core/connection/v1/genesis.ts | 1 + src/ibc/core/connection/v1/query.ts | 1 + src/ibc/core/connection/v1/tx.ts | 1 + src/ibc/core/types/v1/genesis.ts | 1 + src/ibc/lightclients/localhost/v1/localhost.ts | 1 + src/ibc/lightclients/solomachine/v1/solomachine.ts | 1 + src/ibc/lightclients/tendermint/v1/tendermint.ts | 1 + src/tendermint/abci/types.ts | 1 + src/tendermint/crypto/keys.ts | 1 + src/tendermint/crypto/proof.ts | 1 + src/tendermint/p2p/types.ts | 1 + src/tendermint/types/block.ts | 1 + src/tendermint/types/evidence.ts | 1 + src/tendermint/types/params.ts | 1 + src/tendermint/types/types.ts | 1 + src/tendermint/types/validator.ts | 1 + src/tendermint/version/types.ts | 1 + 122 files changed, 122 insertions(+), 1 deletion(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index f6e6f855..02ed444e 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -14,7 +14,7 @@ telescope({ options: { useSDKTypes: false, tsDisable: { - disableAll: false + disableAll: true }, eslintDisable: { disableAll: true diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index ffe1f9e4..4b620f08 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index 7c189c07..1cddc1a2 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index e167d9c7..113ff256 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 2626ba2b..3cc46570 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 8a3ad8a0..1975e211 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 72ac8771..ec5d3a5f 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 31c51ae2..828da480 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 9071ecc8..725c3867 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index 9eb22de7..b61ae105 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 24ee7489..278208a0 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index 70766eef..ceec77b2 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index e858002d..5e01d985 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 5f8823f5..4beb0925 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 332aee17..9ac05eba 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index c6e9c045..7751aa40 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 82ef1972..d819f887 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 74820ddb..14ea6f61 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index d2422aa7..1493f525 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 78009abc..4e0565d9 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index 245d4e26..fb494237 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index d76843e6..5c32497b 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 9b18f02c..fad4d1d3 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index 25a1eaee..c111ef98 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index 87575e04..df39bfe3 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 14aa860a..38f61d28 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index 5b6d4edf..3fb0e3b4 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index 1edc3dd1..a35456b7 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index d3b3b7aa..5d91bf77 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index 69404109..bf5fce2e 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index d8fea648..78cf2176 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index e15d3612..f09457fe 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 07ee82f8..462786d4 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 1306cfd5..7d3e0d87 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DecCoin } from "../../base/v1beta1/coin"; import { diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index a4e2da88..22ebdaf9 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index 62b84e9b..a39d2de4 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index e20b1ddc..b562d7d8 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index d5e26fbc..5794e677 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 6d9c0b44..0c506f61 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index cc6a4b31..0fed1698 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index 39e9866f..295c702c 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 35ab4b27..0a28e052 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 946c70d1..b452f275 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index 828c1c05..caa2836b 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 24e0b6ad..4b35676c 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index fa7da1d9..7ac0d10c 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 4dd490bc..3d717289 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 5edecfd1..2fd327bf 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { ProposalStatus, diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index f732e3b4..c23a55e5 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 6703ade5..d7ce5fa1 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index e48598ba..a1b084f8 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index dc4c07fb..e8112c54 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index d5f58d05..07deeaad 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index e703786f..9e851c3a 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index c07ebb1b..150a1fbf 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 5e1387e5..cdcccf4b 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 3315ded2..9a5a9836 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index e665505f..80678571 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 1d91155d..746d6e95 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 3bc8a9c5..1422bbcb 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index 99dfec9a..b119eac2 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index b2a1fba2..c846f164 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Header } from "../../../tendermint/types/types"; import { Timestamp } from "../../../google/protobuf/timestamp"; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 70191e45..54f869ee 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index e620a02a..d4164184 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index eed31135..db1d8248 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 70b08f6d..26ee4fdb 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index dddfdf22..3bc75d65 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index eaf766bc..ffaa2080 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 9a43c7e4..2e62ae5c 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index d9d09a32..03f5a6d5 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index e86ed05c..e3331f54 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index 0e6424ac..c6505e0a 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index d4af33bf..0fe4a57e 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 5b1293f5..8191a507 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "./types"; diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index ec947638..b435c1bd 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index a579255f..072dd772 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/google/api/http.ts b/src/google/api/http.ts index a5c7bdf6..20526a16 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 429edd39..8b573384 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 564134d1..17748a65 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 4d2e7dd6..75c515ee 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index 334db22b..d37b1148 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; diff --git a/src/helpers.ts b/src/helpers.ts index 9015b7ca..ac9337a0 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ /** * This file and any referenced files were automatically generated by @osmonauts/telescope@0.59.0 diff --git a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts index d249eec5..405bc8fc 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../../helpers"; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/ibc/applications/interchain_accounts/controller/v1/query.ts index a3dad9eb..83a87986 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./controller"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/interchain_accounts/host/v1/host.ts b/src/ibc/applications/interchain_accounts/host/v1/host.ts index 7061c3b4..4c663c20 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../../helpers"; diff --git a/src/ibc/applications/interchain_accounts/host/v1/query.ts b/src/ibc/applications/interchain_accounts/host/v1/query.ts index 4ef51112..9b2090e7 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params } from "./host"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/interchain_accounts/v1/account.ts b/src/ibc/applications/interchain_accounts/v1/account.ts index ecc4f4b8..2d07c82d 100644 --- a/src/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/ibc/applications/interchain_accounts/v1/account.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../../../cosmos/auth/v1beta1/auth"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/interchain_accounts/v1/genesis.ts b/src/ibc/applications/interchain_accounts/v1/genesis.ts index 4ba61838..94cc057b 100644 --- a/src/ibc/applications/interchain_accounts/v1/genesis.ts +++ b/src/ibc/applications/interchain_accounts/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Params as Params1 } from "../controller/v1/controller"; import { Params as Params2 } from "../host/v1/host"; diff --git a/src/ibc/applications/interchain_accounts/v1/metadata.ts b/src/ibc/applications/interchain_accounts/v1/metadata.ts index f4b5d1d2..214c6920 100644 --- a/src/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/applications/interchain_accounts/v1/packet.ts b/src/ibc/applications/interchain_accounts/v1/packet.ts index 75baf7d0..c73057f5 100644 --- a/src/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/ibc/applications/interchain_accounts/v1/packet.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index 40ba8a05..9e0d172b 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index fcc31edd..d2ffc03a 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index b6ef5e45..a199ac13 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index 4c6d21b0..f361fba8 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index 7d27d7e2..ab7b519e 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact } from "../../../../helpers"; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index bd7ae4df..efe66cdc 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 8d462562..5e98b394 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 26e356d8..0e40c1e7 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index f091ef65..be8eba06 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index f7dc4ed9..14816a3a 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index bcb242ac..353863b2 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index cc6e213b..b22565c7 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index be1f4b39..e3a3c53b 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index a62fc23a..8e10fb6d 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index fb3c8c11..6e0edfd1 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 6ef3ebc7..5c212b03 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index efa89727..1ba4e699 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index efe9174b..a89050ac 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index bf193adf..270f1404 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index ade6eae2..8d3fc6c6 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 4570e3b8..70491bbc 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index a6432007..438cff86 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Duration } from "../../../../google/protobuf/duration"; import { Height } from "../../../core/client/v1/client"; diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 7313585c..4e98d301 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../google/protobuf/timestamp"; import { Header } from "../types/types"; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index a3c2806e..0e934fb4 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 90786c0f..57f6a7a3 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index fd58739b..63eda28d 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 4861981c..7fd10541 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index ff7c0ded..ba7f1e61 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 88f83276..ed94658a 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index c81c9bb4..6309a44f 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 74bf8737..8c604715 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index d72ca96a..42e909cb 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,3 +1,4 @@ +//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; import { Long, isSet, DeepPartial, Exact } from "../../helpers"; From 26d59cfada5732b3d418d67ee44277546c3e1310 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Wed, 12 Oct 2022 16:10:37 -0700 Subject: [PATCH 28/38] don't use DeepPartial to avoid TS compiler memory issue --- scripts/codegen.js | 2 - src/confio/proofs.ts | 32 +++--- src/cosmos/auth/v1beta1/auth.ts | 8 +- src/cosmos/auth/v1beta1/genesis.ts | 4 +- src/cosmos/auth/v1beta1/query.ts | 14 +-- src/cosmos/authz/v1beta1/authz.ts | 8 +- src/cosmos/authz/v1beta1/genesis.ts | 4 +- src/cosmos/authz/v1beta1/query.ts | 22 ++--- src/cosmos/authz/v1beta1/tx.ts | 14 +-- src/cosmos/bank/v1beta1/authz.ts | 4 +- src/cosmos/bank/v1beta1/bank.ts | 16 +-- src/cosmos/bank/v1beta1/genesis.ts | 6 +- src/cosmos/bank/v1beta1/query.ts | 50 ++++------ src/cosmos/bank/v1beta1/tx.ts | 10 +- src/cosmos/base/abci/v1beta1/abci.ts | 22 ++--- src/cosmos/base/kv/v1beta1/kv.ts | 6 +- src/cosmos/base/query/v1beta1/pagination.ts | 6 +- .../base/reflection/v1beta1/reflection.ts | 16 +-- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 18 ++-- src/cosmos/base/store/v1beta1/commit_info.ts | 8 +- src/cosmos/base/store/v1beta1/listening.ts | 4 +- src/cosmos/base/store/v1beta1/snapshot.ts | 8 +- src/cosmos/base/tendermint/v1beta1/query.ts | 42 +++----- src/cosmos/base/v1beta1/coin.ts | 10 +- src/cosmos/capability/v1beta1/capability.ts | 8 +- src/cosmos/capability/v1beta1/genesis.ts | 6 +- src/cosmos/crisis/v1beta1/genesis.ts | 4 +- src/cosmos/crisis/v1beta1/tx.ts | 6 +- src/cosmos/crypto/ed25519/keys.ts | 6 +- src/cosmos/crypto/multisig/keys.ts | 4 +- .../crypto/multisig/v1beta1/multisig.ts | 6 +- src/cosmos/crypto/secp256k1/keys.ts | 6 +- .../distribution/v1beta1/distribution.ts | 38 +++---- src/cosmos/distribution/v1beta1/genesis.ts | 30 ++---- src/cosmos/distribution/v1beta1/query.ts | 68 +++++-------- src/cosmos/distribution/v1beta1/tx.ts | 30 ++---- src/cosmos/evidence/v1beta1/evidence.ts | 4 +- src/cosmos/evidence/v1beta1/genesis.ts | 4 +- src/cosmos/evidence/v1beta1/query.ts | 12 +-- src/cosmos/evidence/v1beta1/tx.ts | 8 +- src/cosmos/feegrant/v1beta1/feegrant.ts | 10 +- src/cosmos/feegrant/v1beta1/genesis.ts | 4 +- src/cosmos/feegrant/v1beta1/query.ts | 18 ++-- src/cosmos/feegrant/v1beta1/tx.ts | 10 +- src/cosmos/genutil/v1beta1/genesis.ts | 4 +- src/cosmos/gov/v1beta1/genesis.ts | 4 +- src/cosmos/gov/v1beta1/gov.ts | 19 ++-- src/cosmos/gov/v1beta1/query.ts | 36 ++++--- src/cosmos/gov/v1beta1/tx.ts | 20 ++-- src/cosmos/mint/v1beta1/genesis.ts | 4 +- src/cosmos/mint/v1beta1/mint.ts | 6 +- src/cosmos/mint/v1beta1/query.ts | 18 ++-- src/cosmos/params/v1beta1/params.ts | 6 +- src/cosmos/params/v1beta1/query.ts | 6 +- src/cosmos/slashing/v1beta1/genesis.ts | 10 +- src/cosmos/slashing/v1beta1/query.ts | 20 ++-- src/cosmos/slashing/v1beta1/slashing.ts | 5 +- src/cosmos/slashing/v1beta1/tx.ts | 6 +- src/cosmos/staking/v1beta1/authz.ts | 8 +- src/cosmos/staking/v1beta1/genesis.ts | 6 +- src/cosmos/staking/v1beta1/query.ts | 94 +++++++----------- src/cosmos/staking/v1beta1/staking.ts | 46 ++++----- src/cosmos/staking/v1beta1/tx.ts | 24 +++-- src/cosmos/tx/signing/v1beta1/signing.ts | 18 ++-- src/cosmos/tx/v1beta1/service.ts | 22 ++--- src/cosmos/tx/v1beta1/tx.ts | 22 ++--- src/cosmos/upgrade/v1beta1/query.ts | 30 ++---- src/cosmos/upgrade/v1beta1/upgrade.ts | 12 +-- src/cosmos/vesting/v1beta1/tx.ts | 8 +- src/cosmos/vesting/v1beta1/vesting.ts | 16 ++- src/cosmwasm/wasm/v1/genesis.ts | 12 +-- src/cosmwasm/wasm/v1/ibc.ts | 6 +- src/cosmwasm/wasm/v1/proposal.ts | 28 +++--- src/cosmwasm/wasm/v1/query.ts | 66 ++++--------- src/cosmwasm/wasm/v1/tx.ts | 32 +++--- src/cosmwasm/wasm/v1/types.ts | 20 ++-- src/google/api/http.ts | 8 +- src/google/protobuf/any.ts | 4 +- src/google/protobuf/descriptor.ts | 68 ++++++------- src/google/protobuf/duration.ts | 4 +- src/google/protobuf/timestamp.ts | 4 +- .../controller/v1/controller.ts | 4 +- .../controller/v1/query.ts | 6 +- .../interchain_accounts/host/v1/host.ts | 4 +- .../interchain_accounts/host/v1/query.ts | 6 +- .../interchain_accounts/v1/account.ts | 4 +- .../interchain_accounts/v1/genesis.ts | 14 ++- .../interchain_accounts/v1/metadata.ts | 4 +- .../interchain_accounts/v1/packet.ts | 8 +- src/ibc/applications/transfer/v1/genesis.ts | 4 +- src/ibc/applications/transfer/v1/query.ts | 20 ++-- src/ibc/applications/transfer/v1/transfer.ts | 6 +- src/ibc/applications/transfer/v1/tx.ts | 6 +- src/ibc/applications/transfer/v2/packet.ts | 4 +- src/ibc/core/channel/v1/channel.ts | 14 +-- src/ibc/core/channel/v1/genesis.ts | 6 +- src/ibc/core/channel/v1/query.ts | 98 +++++-------------- src/ibc/core/channel/v1/tx.ts | 54 ++++------ src/ibc/core/client/v1/client.ts | 18 ++-- src/ibc/core/client/v1/genesis.ts | 10 +- src/ibc/core/client/v1/query.ts | 62 ++++-------- src/ibc/core/client/v1/tx.ts | 20 ++-- src/ibc/core/commitment/v1/commitment.ts | 10 +- src/ibc/core/connection/v1/connection.ts | 16 +-- src/ibc/core/connection/v1/genesis.ts | 4 +- src/ibc/core/connection/v1/query.ts | 36 +++---- src/ibc/core/connection/v1/tx.ts | 28 ++---- src/ibc/core/types/v1/genesis.ts | 4 +- .../lightclients/localhost/v1/localhost.ts | 4 +- .../solomachine/v1/solomachine.ts | 40 ++++---- .../lightclients/tendermint/v1/tendermint.ts | 11 +-- src/tendermint/abci/types.ts | 97 +++++++++--------- src/tendermint/crypto/keys.ts | 4 +- src/tendermint/crypto/proof.ts | 12 +-- src/tendermint/p2p/types.ts | 10 +- src/tendermint/types/block.ts | 4 +- src/tendermint/types/evidence.ts | 12 +-- src/tendermint/types/params.ts | 14 +-- src/tendermint/types/types.ts | 27 +++-- src/tendermint/types/validator.ts | 8 +- src/tendermint/version/types.ts | 6 +- 121 files changed, 845 insertions(+), 1212 deletions(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index 02ed444e..af1f050b 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -53,8 +53,6 @@ telescope({ toJSON: true }, typingsFormat: { - useExact: true, - useDeepPartial: true, timestamp: 'timestamp', duration: 'duration' } diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 4b620f08..7e7cd637 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../helpers"; 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. */ @@ -467,7 +467,7 @@ export const ExistenceProof = { return obj; }, - fromPartial, I>>(object: I): ExistenceProof { + fromPartial(object: DeepPartial): ExistenceProof { const message = createBaseExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -551,7 +551,7 @@ export const NonExistenceProof = { return obj; }, - fromPartial, I>>(object: I): NonExistenceProof { + fromPartial(object: DeepPartial): NonExistenceProof { const message = createBaseNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = @@ -649,7 +649,7 @@ export const CommitmentProof = { return obj; }, - fromPartial, I>>(object: I): CommitmentProof { + fromPartial(object: DeepPartial): CommitmentProof { const message = createBaseCommitmentProof(); message.exist = object.exist !== undefined && object.exist !== null @@ -763,7 +763,7 @@ export const LeafOp = { return obj; }, - fromPartial, I>>(object: I): LeafOp { + fromPartial(object: DeepPartial): LeafOp { const message = createBaseLeafOp(); message.hash = object.hash ?? 0; message.prehashKey = object.prehashKey ?? 0; @@ -847,7 +847,7 @@ export const InnerOp = { return obj; }, - fromPartial, I>>(object: I): InnerOp { + fromPartial(object: DeepPartial): InnerOp { const message = createBaseInnerOp(); message.hash = object.hash ?? 0; message.prefix = object.prefix ?? new Uint8Array(); @@ -940,7 +940,7 @@ export const ProofSpec = { return obj; }, - fromPartial, I>>(object: I): ProofSpec { + fromPartial(object: DeepPartial): ProofSpec { const message = createBaseProofSpec(); message.leafSpec = object.leafSpec !== undefined && object.leafSpec !== null @@ -1082,7 +1082,7 @@ export const InnerSpec = { return obj; }, - fromPartial, I>>(object: I): InnerSpec { + fromPartial(object: DeepPartial): InnerSpec { const message = createBaseInnerSpec(); message.childOrder = object.childOrder?.map((e) => e) || []; message.childSize = object.childSize ?? 0; @@ -1149,7 +1149,7 @@ export const BatchProof = { return obj; }, - fromPartial, I>>(object: I): BatchProof { + fromPartial(object: DeepPartial): BatchProof { const message = createBaseBatchProof(); message.entries = object.entries?.map((e) => BatchEntry.fromPartial(e)) || []; return message; @@ -1218,7 +1218,7 @@ export const BatchEntry = { return obj; }, - fromPartial, I>>(object: I): BatchEntry { + fromPartial(object: DeepPartial): BatchEntry { const message = createBaseBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1307,7 +1307,7 @@ export const CompressedBatchProof = { return obj; }, - fromPartial, I>>(object: I): CompressedBatchProof { + fromPartial(object: DeepPartial): CompressedBatchProof { const message = createBaseCompressedBatchProof(); message.entries = object.entries?.map((e) => CompressedBatchEntry.fromPartial(e)) || []; message.lookupInners = object.lookupInners?.map((e) => InnerOp.fromPartial(e)) || []; @@ -1377,7 +1377,7 @@ export const CompressedBatchEntry = { return obj; }, - fromPartial, I>>(object: I): CompressedBatchEntry { + fromPartial(object: DeepPartial): CompressedBatchEntry { const message = createBaseCompressedBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1493,9 +1493,7 @@ export const CompressedExistenceProof = { return obj; }, - fromPartial, I>>( - object: I, - ): CompressedExistenceProof { + fromPartial(object: DeepPartial): CompressedExistenceProof { const message = createBaseCompressedExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -1580,9 +1578,7 @@ export const CompressedNonExistenceProof = { return obj; }, - fromPartial, I>>( - object: I, - ): CompressedNonExistenceProof { + fromPartial(object: DeepPartial): CompressedNonExistenceProof { const message = createBaseCompressedNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index 1cddc1a2..a84c85f6 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * BaseAccount defines a base account type. It contains all the necessary fields @@ -116,7 +116,7 @@ export const BaseAccount = { return obj; }, - fromPartial, I>>(object: I): BaseAccount { + fromPartial(object: DeepPartial): BaseAccount { const message = createBaseBaseAccount(); message.address = object.address ?? ""; message.pubKey = @@ -211,7 +211,7 @@ export const ModuleAccount = { return obj; }, - fromPartial, I>>(object: I): ModuleAccount { + fromPartial(object: DeepPartial): ModuleAccount { const message = createBaseModuleAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -328,7 +328,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 113ff256..15332a95 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -3,7 +3,7 @@ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** GenesisState defines the auth module's genesis state. */ @@ -81,7 +81,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 3cc46570..dc870dfe 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -101,7 +101,7 @@ export const QueryAccountsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAccountsRequest { + fromPartial(object: DeepPartial): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -178,7 +178,7 @@ export const QueryAccountsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAccountsResponse { + fromPartial(object: DeepPartial): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); message.accounts = object.accounts?.map((e) => Any.fromPartial(e)) || []; message.pagination = @@ -238,7 +238,7 @@ export const QueryAccountRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAccountRequest { + fromPartial(object: DeepPartial): QueryAccountRequest { const message = createBaseQueryAccountRequest(); message.address = object.address ?? ""; return message; @@ -295,7 +295,7 @@ export const QueryAccountResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAccountResponse { + fromPartial(object: DeepPartial): QueryAccountResponse { const message = createBaseQueryAccountResponse(); message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; @@ -339,7 +339,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -394,7 +394,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 1975e211..9130a2e8 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -3,7 +3,7 @@ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; +import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * GenericAuthorization gives the grantee unrestricted permissions to execute @@ -86,7 +86,7 @@ export const GenericAuthorization = { return obj; }, - fromPartial, I>>(object: I): GenericAuthorization { + fromPartial(object: DeepPartial): GenericAuthorization { const message = createBaseGenericAuthorization(); message.msg = object.msg ?? ""; return message; @@ -154,7 +154,7 @@ export const Grant = { return obj; }, - fromPartial, I>>(object: I): Grant { + fromPartial(object: DeepPartial): Grant { const message = createBaseGrant(); message.authorization = object.authorization !== undefined && object.authorization !== null @@ -251,7 +251,7 @@ export const GrantAuthorization = { return obj; }, - fromPartial, I>>(object: I): GrantAuthorization { + fromPartial(object: DeepPartial): GrantAuthorization { const message = createBaseGrantAuthorization(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index ec5d3a5f..bc7e79e6 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; +import { DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** GenesisState defines the authz module's genesis state. */ @@ -66,7 +66,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.authorization = object.authorization?.map((e) => GrantAuthorization.fromPartial(e)) || []; return message; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 828da480..3d5adeb9 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ @@ -144,7 +144,7 @@ export const QueryGrantsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryGrantsRequest { + fromPartial(object: DeepPartial): QueryGrantsRequest { const message = createBaseQueryGrantsRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -224,7 +224,7 @@ export const QueryGrantsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryGrantsResponse { + fromPartial(object: DeepPartial): QueryGrantsResponse { const message = createBaseQueryGrantsResponse(); message.grants = object.grants?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -296,9 +296,7 @@ export const QueryGranterGrantsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranterGrantsRequest { + fromPartial(object: DeepPartial): QueryGranterGrantsRequest { const message = createBaseQueryGranterGrantsRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -378,9 +376,7 @@ export const QueryGranterGrantsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranterGrantsResponse { + fromPartial(object: DeepPartial): QueryGranterGrantsResponse { const message = createBaseQueryGranterGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = @@ -452,9 +448,7 @@ export const QueryGranteeGrantsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranteeGrantsRequest { + fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { const message = createBaseQueryGranteeGrantsRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -534,9 +528,7 @@ export const QueryGranteeGrantsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranteeGrantsResponse { + fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { const message = createBaseQueryGranteeGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 725c3867..3763322a 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -3,7 +3,7 @@ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee @@ -124,7 +124,7 @@ export const MsgGrant = { return obj; }, - fromPartial, I>>(object: I): MsgGrant { + fromPartial(object: DeepPartial): MsgGrant { const message = createBaseMsgGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -189,7 +189,7 @@ export const MsgExecResponse = { return obj; }, - fromPartial, I>>(object: I): MsgExecResponse { + fromPartial(object: DeepPartial): MsgExecResponse { const message = createBaseMsgExecResponse(); message.results = object.results?.map((e) => e) || []; return message; @@ -262,7 +262,7 @@ export const MsgExec = { return obj; }, - fromPartial, I>>(object: I): MsgExec { + fromPartial(object: DeepPartial): MsgExec { const message = createBaseMsgExec(); message.grantee = object.grantee ?? ""; message.msgs = object.msgs?.map((e) => Any.fromPartial(e)) || []; @@ -306,7 +306,7 @@ export const MsgGrantResponse = { return obj; }, - fromPartial, I>>(_: I): MsgGrantResponse { + fromPartial(_: DeepPartial): MsgGrantResponse { const message = createBaseMsgGrantResponse(); return message; }, @@ -383,7 +383,7 @@ export const MsgRevoke = { return obj; }, - fromPartial, I>>(object: I): MsgRevoke { + fromPartial(object: DeepPartial): MsgRevoke { const message = createBaseMsgRevoke(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -428,7 +428,7 @@ export const MsgRevokeResponse = { return obj; }, - fromPartial, I>>(_: I): MsgRevokeResponse { + fromPartial(_: DeepPartial): MsgRevokeResponse { const message = createBaseMsgRevokeResponse(); return message; }, diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index b61ae105..27d6d834 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; +import { DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** * SendAuthorization allows the grantee to spend up to spend_limit coins from @@ -72,7 +72,7 @@ export const SendAuthorization = { return obj; }, - fromPartial, I>>(object: I): SendAuthorization { + fromPartial(object: DeepPartial): SendAuthorization { const message = createBaseSendAuthorization(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 278208a0..83fad1da 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** Params defines the parameters for the bank module. */ @@ -167,7 +167,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled?.map((e) => SendEnabled.fromPartial(e)) || []; message.defaultSendEnabled = object.defaultSendEnabled ?? false; @@ -235,7 +235,7 @@ export const SendEnabled = { return obj; }, - fromPartial, I>>(object: I): SendEnabled { + fromPartial(object: DeepPartial): SendEnabled { const message = createBaseSendEnabled(); message.denom = object.denom ?? ""; message.enabled = object.enabled ?? false; @@ -309,7 +309,7 @@ export const Input = { return obj; }, - fromPartial, I>>(object: I): Input { + fromPartial(object: DeepPartial): Input { const message = createBaseInput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -383,7 +383,7 @@ export const Output = { return obj; }, - fromPartial, I>>(object: I): Output { + fromPartial(object: DeepPartial): Output { const message = createBaseOutput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -446,7 +446,7 @@ export const Supply = { return obj; }, - fromPartial, I>>(object: I): Supply { + fromPartial(object: DeepPartial): Supply { const message = createBaseSupply(); message.total = object.total?.map((e) => Coin.fromPartial(e)) || []; return message; @@ -530,7 +530,7 @@ export const DenomUnit = { return obj; }, - fromPartial, I>>(object: I): DenomUnit { + fromPartial(object: DeepPartial): DenomUnit { const message = createBaseDenomUnit(); message.denom = object.denom ?? ""; message.exponent = object.exponent ?? 0; @@ -651,7 +651,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: DeepPartial): Metadata { const message = createBaseMetadata(); message.description = object.description ?? ""; message.denomUnits = object.denomUnits?.map((e) => DenomUnit.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index ceec77b2..fc071b7a 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -3,7 +3,7 @@ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** GenesisState defines the bank module's genesis state. */ @@ -136,7 +136,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -213,7 +213,7 @@ export const Balance = { return obj; }, - fromPartial, I>>(object: I): Balance { + fromPartial(object: DeepPartial): Balance { const message = createBaseBalance(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 5e01d985..bd5148f6 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; import { Params, Metadata } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ @@ -209,7 +209,7 @@ export const QueryBalanceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryBalanceRequest { + fromPartial(object: DeepPartial): QueryBalanceRequest { const message = createBaseQueryBalanceRequest(); message.address = object.address ?? ""; message.denom = object.denom ?? ""; @@ -267,7 +267,7 @@ export const QueryBalanceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryBalanceResponse { + fromPartial(object: DeepPartial): QueryBalanceResponse { const message = createBaseQueryBalanceResponse(); message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; @@ -336,7 +336,7 @@ export const QueryAllBalancesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllBalancesRequest { + fromPartial(object: DeepPartial): QueryAllBalancesRequest { const message = createBaseQueryAllBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -414,9 +414,7 @@ export const QueryAllBalancesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllBalancesResponse { + fromPartial(object: DeepPartial): QueryAllBalancesResponse { const message = createBaseQueryAllBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -488,9 +486,7 @@ export const QuerySpendableBalancesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySpendableBalancesRequest { + fromPartial(object: DeepPartial): QuerySpendableBalancesRequest { const message = createBaseQuerySpendableBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -568,9 +564,7 @@ export const QuerySpendableBalancesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySpendableBalancesResponse { + fromPartial(object: DeepPartial): QuerySpendableBalancesResponse { const message = createBaseQuerySpendableBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -631,7 +625,7 @@ export const QueryTotalSupplyRequest = { return obj; }, - fromPartial, I>>(object: I): QueryTotalSupplyRequest { + fromPartial(object: DeepPartial): QueryTotalSupplyRequest { const message = createBaseQueryTotalSupplyRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -708,9 +702,7 @@ export const QueryTotalSupplyResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryTotalSupplyResponse { + fromPartial(object: DeepPartial): QueryTotalSupplyResponse { const message = createBaseQueryTotalSupplyResponse(); message.supply = object.supply?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -770,7 +762,7 @@ export const QuerySupplyOfRequest = { return obj; }, - fromPartial, I>>(object: I): QuerySupplyOfRequest { + fromPartial(object: DeepPartial): QuerySupplyOfRequest { const message = createBaseQuerySupplyOfRequest(); message.denom = object.denom ?? ""; return message; @@ -826,7 +818,7 @@ export const QuerySupplyOfResponse = { return obj; }, - fromPartial, I>>(object: I): QuerySupplyOfResponse { + fromPartial(object: DeepPartial): QuerySupplyOfResponse { const message = createBaseQuerySupplyOfResponse(); message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; @@ -870,7 +862,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -925,7 +917,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -983,9 +975,7 @@ export const QueryDenomsMetadataRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomsMetadataRequest { + fromPartial(object: DeepPartial): QueryDenomsMetadataRequest { const message = createBaseQueryDenomsMetadataRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1064,9 +1054,7 @@ export const QueryDenomsMetadataResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomsMetadataResponse { + fromPartial(object: DeepPartial): QueryDenomsMetadataResponse { const message = createBaseQueryDenomsMetadataResponse(); message.metadatas = object.metadatas?.map((e) => Metadata.fromPartial(e)) || []; message.pagination = @@ -1126,9 +1114,7 @@ export const QueryDenomMetadataRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomMetadataRequest { + fromPartial(object: DeepPartial): QueryDenomMetadataRequest { const message = createBaseQueryDenomMetadataRequest(); message.denom = object.denom ?? ""; return message; @@ -1185,9 +1171,7 @@ export const QueryDenomMetadataResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomMetadataResponse { + fromPartial(object: DeepPartial): QueryDenomMetadataResponse { const message = createBaseQueryDenomMetadataResponse(); message.metadata = object.metadata !== undefined && object.metadata !== null diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 4beb0925..d5fc4066 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -3,7 +3,7 @@ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** MsgSend represents a message to send coins from one account to another. */ @@ -102,7 +102,7 @@ export const MsgSend = { return obj; }, - fromPartial, I>>(object: I): MsgSend { + fromPartial(object: DeepPartial): MsgSend { const message = createBaseMsgSend(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -147,7 +147,7 @@ export const MsgSendResponse = { return obj; }, - fromPartial, I>>(_: I): MsgSendResponse { + fromPartial(_: DeepPartial): MsgSendResponse { const message = createBaseMsgSendResponse(); return message; }, @@ -224,7 +224,7 @@ export const MsgMultiSend = { return obj; }, - fromPartial, I>>(object: I): MsgMultiSend { + fromPartial(object: DeepPartial): MsgMultiSend { const message = createBaseMsgMultiSend(); message.inputs = object.inputs?.map((e) => Input.fromPartial(e)) || []; message.outputs = object.outputs?.map((e) => Output.fromPartial(e)) || []; @@ -268,7 +268,7 @@ export const MsgMultiSendResponse = { return obj; }, - fromPartial, I>>(_: I): MsgMultiSendResponse { + fromPartial(_: DeepPartial): MsgMultiSendResponse { const message = createBaseMsgMultiSendResponse(); return message; }, diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 9ac05eba..d3ff39b0 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,7 @@ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.abci.v1beta1"; /** * TxResponse defines a structure containing relevant tx data and metadata. The @@ -362,7 +362,7 @@ export const TxResponse = { return obj; }, - fromPartial, I>>(object: I): TxResponse { + fromPartial(object: DeepPartial): TxResponse { const message = createBaseTxResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -463,7 +463,7 @@ export const ABCIMessageLog = { return obj; }, - fromPartial, I>>(object: I): ABCIMessageLog { + fromPartial(object: DeepPartial): ABCIMessageLog { const message = createBaseABCIMessageLog(); message.msgIndex = object.msgIndex ?? 0; message.log = object.log ?? ""; @@ -540,7 +540,7 @@ export const StringEvent = { return obj; }, - fromPartial, I>>(object: I): StringEvent { + fromPartial(object: DeepPartial): StringEvent { const message = createBaseStringEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; @@ -608,7 +608,7 @@ export const Attribute = { return obj; }, - fromPartial, I>>(object: I): Attribute { + fromPartial(object: DeepPartial): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -676,7 +676,7 @@ export const GasInfo = { return obj; }, - fromPartial, I>>(object: I): GasInfo { + fromPartial(object: DeepPartial): GasInfo { const message = createBaseGasInfo(); message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null @@ -766,7 +766,7 @@ export const Result = { return obj; }, - fromPartial, I>>(object: I): Result { + fromPartial(object: DeepPartial): Result { const message = createBaseResult(); message.data = object.data ?? new Uint8Array(); message.log = object.log ?? ""; @@ -836,7 +836,7 @@ export const SimulationResponse = { return obj; }, - fromPartial, I>>(object: I): SimulationResponse { + fromPartial(object: DeepPartial): SimulationResponse { const message = createBaseSimulationResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -909,7 +909,7 @@ export const MsgData = { return obj; }, - fromPartial, I>>(object: I): MsgData { + fromPartial(object: DeepPartial): MsgData { const message = createBaseMsgData(); message.msgType = object.msgType ?? ""; message.data = object.data ?? new Uint8Array(); @@ -972,7 +972,7 @@ export const TxMsgData = { return obj; }, - fromPartial, I>>(object: I): TxMsgData { + fromPartial(object: DeepPartial): TxMsgData { const message = createBaseTxMsgData(); message.data = object.data?.map((e) => MsgData.fromPartial(e)) || []; return message; @@ -1089,7 +1089,7 @@ export const SearchTxsResult = { return obj; }, - fromPartial, I>>(object: I): SearchTxsResult { + fromPartial(object: DeepPartial): SearchTxsResult { const message = createBaseSearchTxsResult(); message.totalCount = object.totalCount !== undefined && object.totalCount !== null diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index 7751aa40..10added8 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.kv.v1beta1"; /** Pairs defines a repeated slice of Pair objects. */ @@ -70,7 +70,7 @@ export const Pairs = { return obj; }, - fromPartial, I>>(object: I): Pairs { + fromPartial(object: DeepPartial): Pairs { const message = createBasePairs(); message.pairs = object.pairs?.map((e) => Pair.fromPartial(e)) || []; return message; @@ -139,7 +139,7 @@ export const Pair = { return obj; }, - fromPartial, I>>(object: I): Pair { + fromPartial(object: DeepPartial): Pair { const message = createBasePair(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index d819f887..1af7c24f 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; export const protobufPackage = "cosmos.base.query.v1beta1"; /** * PageRequest is to be embedded in gRPC request messages for efficient @@ -167,7 +167,7 @@ export const PageRequest = { return obj; }, - fromPartial, I>>(object: I): PageRequest { + fromPartial(object: DeepPartial): PageRequest { const message = createBasePageRequest(); message.key = object.key ?? new Uint8Array(); message.offset = @@ -241,7 +241,7 @@ export const PageResponse = { return obj; }, - fromPartial, I>>(object: I): PageResponse { + fromPartial(object: DeepPartial): PageResponse { const message = createBasePageResponse(); message.nextKey = object.nextKey ?? new Uint8Array(); message.total = diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 14ea6f61..5d13ab02 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet } from "../../../../helpers"; +import { DeepPartial, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ @@ -66,7 +66,7 @@ export const ListAllInterfacesRequest = { return obj; }, - fromPartial, I>>(_: I): ListAllInterfacesRequest { + fromPartial(_: DeepPartial): ListAllInterfacesRequest { const message = createBaseListAllInterfacesRequest(); return message; }, @@ -129,9 +129,7 @@ export const ListAllInterfacesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): ListAllInterfacesResponse { + fromPartial(object: DeepPartial): ListAllInterfacesResponse { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interfaceNames?.map((e) => e) || []; return message; @@ -187,9 +185,7 @@ export const ListImplementationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): ListImplementationsRequest { + fromPartial(object: DeepPartial): ListImplementationsRequest { const message = createBaseListImplementationsRequest(); message.interfaceName = object.interfaceName ?? ""; return message; @@ -253,9 +249,7 @@ export const ListImplementationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): ListImplementationsResponse { + fromPartial(object: DeepPartial): ListImplementationsResponse { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementationMessageNames?.map((e) => e) || []; return message; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 1493f525..87914262 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; export const protobufPackage = "cosmos.base.snapshots.v1beta1"; /** Snapshot contains Tendermint state sync snapshot info. */ @@ -150,7 +150,7 @@ export const Snapshot = { return obj; }, - fromPartial, I>>(object: I): Snapshot { + fromPartial(object: DeepPartial): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -224,7 +224,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: DeepPartial): Metadata { const message = createBaseMetadata(); message.chunkHashes = object.chunkHashes?.map((e) => e) || []; return message; @@ -321,7 +321,7 @@ export const SnapshotItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotItem { + fromPartial(object: DeepPartial): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -392,7 +392,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotStoreItem { + fromPartial(object: DeepPartial): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -483,7 +483,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotIAVLItem { + fromPartial(object: DeepPartial): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -554,7 +554,7 @@ export const SnapshotExtensionMeta = { return obj; }, - fromPartial, I>>(object: I): SnapshotExtensionMeta { + fromPartial(object: DeepPartial): SnapshotExtensionMeta { const message = createBaseSnapshotExtensionMeta(); message.name = object.name ?? ""; message.format = object.format ?? 0; @@ -612,9 +612,7 @@ export const SnapshotExtensionPayload = { return obj; }, - fromPartial, I>>( - object: I, - ): SnapshotExtensionPayload { + fromPartial(object: DeepPartial): SnapshotExtensionPayload { const message = createBaseSnapshotExtensionPayload(); message.payload = object.payload ?? new Uint8Array(); return message; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 4e0565d9..7cd6c0fd 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * CommitInfo defines commit information used by the multi-store when committing @@ -99,7 +99,7 @@ export const CommitInfo = { return obj; }, - fromPartial, I>>(object: I): CommitInfo { + fromPartial(object: DeepPartial): CommitInfo { const message = createBaseCommitInfo(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; @@ -169,7 +169,7 @@ export const StoreInfo = { return obj; }, - fromPartial, I>>(object: I): StoreInfo { + fromPartial(object: DeepPartial): StoreInfo { const message = createBaseStoreInfo(); message.name = object.name ?? ""; message.commitId = @@ -241,7 +241,7 @@ export const CommitID = { return obj; }, - fromPartial, I>>(object: I): CommitID { + fromPartial(object: DeepPartial): CommitID { const message = createBaseCommitID(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index fb494237..57f0ec3d 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) @@ -105,7 +105,7 @@ export const StoreKVPair = { return obj; }, - fromPartial, I>>(object: I): StoreKVPair { + fromPartial(object: DeepPartial): StoreKVPair { const message = createBaseStoreKVPair(); message.storeKey = object.storeKey ?? ""; message.delete = object.delete ?? false; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 5c32497b..32c0424d 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ @@ -85,7 +85,7 @@ export const SnapshotItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotItem { + fromPartial(object: DeepPartial): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -148,7 +148,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotStoreItem { + fromPartial(object: DeepPartial): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -239,7 +239,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotIAVLItem { + fromPartial(object: DeepPartial): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index fad4d1d3..1eefb189 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -6,7 +6,7 @@ import { BlockID } from "../../../../tendermint/types/types"; import { Block } from "../../../../tendermint/types/block"; import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.tendermint.v1beta1"; /** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ @@ -173,9 +173,7 @@ export const GetValidatorSetByHeightRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): GetValidatorSetByHeightRequest { + fromPartial(object: DeepPartial): GetValidatorSetByHeightRequest { const message = createBaseGetValidatorSetByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -267,9 +265,7 @@ export const GetValidatorSetByHeightResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetValidatorSetByHeightResponse { + fromPartial(object: DeepPartial): GetValidatorSetByHeightResponse { const message = createBaseGetValidatorSetByHeightResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -334,9 +330,7 @@ export const GetLatestValidatorSetRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): GetLatestValidatorSetRequest { + fromPartial(object: DeepPartial): GetLatestValidatorSetRequest { const message = createBaseGetLatestValidatorSetRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -426,9 +420,7 @@ export const GetLatestValidatorSetResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetLatestValidatorSetResponse { + fromPartial(object: DeepPartial): GetLatestValidatorSetResponse { const message = createBaseGetLatestValidatorSetResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -526,7 +518,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? ""; message.pubKey = @@ -592,7 +584,7 @@ export const GetBlockByHeightRequest = { return obj; }, - fromPartial, I>>(object: I): GetBlockByHeightRequest { + fromPartial(object: DeepPartial): GetBlockByHeightRequest { const message = createBaseGetBlockByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -661,9 +653,7 @@ export const GetBlockByHeightResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetBlockByHeightResponse { + fromPartial(object: DeepPartial): GetBlockByHeightResponse { const message = createBaseGetBlockByHeightResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -711,7 +701,7 @@ export const GetLatestBlockRequest = { return obj; }, - fromPartial, I>>(_: I): GetLatestBlockRequest { + fromPartial(_: DeepPartial): GetLatestBlockRequest { const message = createBaseGetLatestBlockRequest(); return message; }, @@ -778,7 +768,7 @@ export const GetLatestBlockResponse = { return obj; }, - fromPartial, I>>(object: I): GetLatestBlockResponse { + fromPartial(object: DeepPartial): GetLatestBlockResponse { const message = createBaseGetLatestBlockResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -826,7 +816,7 @@ export const GetSyncingRequest = { return obj; }, - fromPartial, I>>(_: I): GetSyncingRequest { + fromPartial(_: DeepPartial): GetSyncingRequest { const message = createBaseGetSyncingRequest(); return message; }, @@ -881,7 +871,7 @@ export const GetSyncingResponse = { return obj; }, - fromPartial, I>>(object: I): GetSyncingResponse { + fromPartial(object: DeepPartial): GetSyncingResponse { const message = createBaseGetSyncingResponse(); message.syncing = object.syncing ?? false; return message; @@ -924,7 +914,7 @@ export const GetNodeInfoRequest = { return obj; }, - fromPartial, I>>(_: I): GetNodeInfoRequest { + fromPartial(_: DeepPartial): GetNodeInfoRequest { const message = createBaseGetNodeInfoRequest(); return message; }, @@ -1000,7 +990,7 @@ export const GetNodeInfoResponse = { return obj; }, - fromPartial, I>>(object: I): GetNodeInfoResponse { + fromPartial(object: DeepPartial): GetNodeInfoResponse { const message = createBaseGetNodeInfoResponse(); message.defaultNodeInfo = object.defaultNodeInfo !== undefined && object.defaultNodeInfo !== null @@ -1146,7 +1136,7 @@ export const VersionInfo = { return obj; }, - fromPartial, I>>(object: I): VersionInfo { + fromPartial(object: DeepPartial): VersionInfo { const message = createBaseVersionInfo(); message.name = object.name ?? ""; message.appName = object.appName ?? ""; @@ -1231,7 +1221,7 @@ export const Module = { return obj; }, - fromPartial, I>>(object: I): Module { + fromPartial(object: DeepPartial): Module { const message = createBaseModule(); message.path = object.path ?? ""; message.version = object.version ?? ""; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index c111ef98..cfa5483c 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.base.v1beta1"; /** * Coin defines a token with a denomination and an amount. @@ -96,7 +96,7 @@ export const Coin = { return obj; }, - fromPartial, I>>(object: I): Coin { + fromPartial(object: DeepPartial): Coin { const message = createBaseCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -164,7 +164,7 @@ export const DecCoin = { return obj; }, - fromPartial, I>>(object: I): DecCoin { + fromPartial(object: DeepPartial): DecCoin { const message = createBaseDecCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -221,7 +221,7 @@ export const IntProto = { return obj; }, - fromPartial, I>>(object: I): IntProto { + fromPartial(object: DeepPartial): IntProto { const message = createBaseIntProto(); message.int = object.int ?? ""; return message; @@ -277,7 +277,7 @@ export const DecProto = { return obj; }, - fromPartial, I>>(object: I): DecProto { + fromPartial(object: DeepPartial): DecProto { const message = createBaseDecProto(); message.dec = object.dec ?? ""; return message; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index df39bfe3..767a72d0 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** * Capability defines an implementation of an object capability. The index @@ -78,7 +78,7 @@ export const Capability = { return obj; }, - fromPartial, I>>(object: I): Capability { + fromPartial(object: DeepPartial): Capability { const message = createBaseCapability(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -146,7 +146,7 @@ export const Owner = { return obj; }, - fromPartial, I>>(object: I): Owner { + fromPartial(object: DeepPartial): Owner { const message = createBaseOwner(); message.module = object.module ?? ""; message.name = object.name ?? ""; @@ -209,7 +209,7 @@ export const CapabilityOwners = { return obj; }, - fromPartial, I>>(object: I): CapabilityOwners { + fromPartial(object: DeepPartial): CapabilityOwners { const message = createBaseCapabilityOwners(); message.owners = object.owners?.map((e) => Owner.fromPartial(e)) || []; return message; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 38f61d28..ce2ebb5d 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** GenesisOwners defines the capability owners with their corresponding index. */ @@ -87,7 +87,7 @@ export const GenesisOwners = { return obj; }, - fromPartial, I>>(object: I): GenesisOwners { + fromPartial(object: DeepPartial): GenesisOwners { const message = createBaseGenesisOwners(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -165,7 +165,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index 3fb0e3b4..ee39c46f 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** GenesisState defines the crisis module's genesis state. */ @@ -64,7 +64,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.constantFee = object.constantFee !== undefined && object.constantFee !== null diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index a35456b7..4221e532 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** MsgVerifyInvariant represents a message to verify a particular invariance. */ @@ -85,7 +85,7 @@ export const MsgVerifyInvariant = { return obj; }, - fromPartial, I>>(object: I): MsgVerifyInvariant { + fromPartial(object: DeepPartial): MsgVerifyInvariant { const message = createBaseMsgVerifyInvariant(); message.sender = object.sender ?? ""; message.invariantModuleName = object.invariantModuleName ?? ""; @@ -130,7 +130,7 @@ export const MsgVerifyInvariantResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVerifyInvariantResponse { + fromPartial(_: DeepPartial): MsgVerifyInvariantResponse { const message = createBaseMsgVerifyInvariantResponse(); return message; }, diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index 5d91bf77..e3249392 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.ed25519"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. @@ -73,7 +73,7 @@ export const PubKey = { return obj; }, - fromPartial, I>>(object: I): PubKey { + fromPartial(object: DeepPartial): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -130,7 +130,7 @@ export const PrivKey = { return obj; }, - fromPartial, I>>(object: I): PrivKey { + fromPartial(object: DeepPartial): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index bf5fce2e..ade2b281 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig"; /** * LegacyAminoPubKey specifies a public key type @@ -81,7 +81,7 @@ export const LegacyAminoPubKey = { return obj; }, - fromPartial, I>>(object: I): LegacyAminoPubKey { + fromPartial(object: DeepPartial): LegacyAminoPubKey { const message = createBaseLegacyAminoPubKey(); message.threshold = object.threshold ?? 0; message.publicKeys = object.publicKeys?.map((e) => Any.fromPartial(e)) || []; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 78cf2176..6387c990 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; +import { bytesFromBase64, base64FromBytes, DeepPartial, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. @@ -81,7 +81,7 @@ export const MultiSignature = { return obj; }, - fromPartial, I>>(object: I): MultiSignature { + fromPartial(object: DeepPartial): MultiSignature { const message = createBaseMultiSignature(); message.signatures = object.signatures?.map((e) => e) || []; return message; @@ -149,7 +149,7 @@ export const CompactBitArray = { return obj; }, - fromPartial, I>>(object: I): CompactBitArray { + fromPartial(object: DeepPartial): CompactBitArray { const message = createBaseCompactBitArray(); message.extraBitsStored = object.extraBitsStored ?? 0; message.elems = object.elems ?? new Uint8Array(); diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index f09457fe..7084a029 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.secp256k1"; /** * PubKey defines a secp256k1 public key @@ -70,7 +70,7 @@ export const PubKey = { return obj; }, - fromPartial, I>>(object: I): PubKey { + fromPartial(object: DeepPartial): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -127,7 +127,7 @@ export const PrivKey = { return obj; }, - fromPartial, I>>(object: I): PrivKey { + fromPartial(object: DeepPartial): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 462786d4..dec2d0e9 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** Params defines the set of params for the distribution module. */ @@ -208,7 +208,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.communityTax = object.communityTax ?? ""; message.baseProposerReward = object.baseProposerReward ?? ""; @@ -288,9 +288,7 @@ export const ValidatorHistoricalRewards = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorHistoricalRewards { + fromPartial(object: DeepPartial): ValidatorHistoricalRewards { const message = createBaseValidatorHistoricalRewards(); message.cumulativeRewardRatio = object.cumulativeRewardRatio?.map((e) => DecCoin.fromPartial(e)) || []; message.referenceCount = object.referenceCount ?? 0; @@ -364,7 +362,7 @@ export const ValidatorCurrentRewards = { return obj; }, - fromPartial, I>>(object: I): ValidatorCurrentRewards { + fromPartial(object: DeepPartial): ValidatorCurrentRewards { const message = createBaseValidatorCurrentRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; message.period = @@ -430,9 +428,7 @@ export const ValidatorAccumulatedCommission = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorAccumulatedCommission { + fromPartial(object: DeepPartial): ValidatorAccumulatedCommission { const message = createBaseValidatorAccumulatedCommission(); message.commission = object.commission?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -494,9 +490,7 @@ export const ValidatorOutstandingRewards = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorOutstandingRewards { + fromPartial(object: DeepPartial): ValidatorOutstandingRewards { const message = createBaseValidatorOutstandingRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -564,7 +558,7 @@ export const ValidatorSlashEvent = { return obj; }, - fromPartial, I>>(object: I): ValidatorSlashEvent { + fromPartial(object: DeepPartial): ValidatorSlashEvent { const message = createBaseValidatorSlashEvent(); message.validatorPeriod = object.validatorPeriod !== undefined && object.validatorPeriod !== null @@ -634,7 +628,7 @@ export const ValidatorSlashEvents = { return obj; }, - fromPartial, I>>(object: I): ValidatorSlashEvents { + fromPartial(object: DeepPartial): ValidatorSlashEvents { const message = createBaseValidatorSlashEvents(); message.validatorSlashEvents = object.validatorSlashEvents?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; @@ -699,7 +693,7 @@ export const FeePool = { return obj; }, - fromPartial, I>>(object: I): FeePool { + fromPartial(object: DeepPartial): FeePool { const message = createBaseFeePool(); message.communityPool = object.communityPool?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -794,9 +788,7 @@ export const CommunityPoolSpendProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): CommunityPoolSpendProposal { + fromPartial(object: DeepPartial): CommunityPoolSpendProposal { const message = createBaseCommunityPoolSpendProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -878,7 +870,7 @@ export const DelegatorStartingInfo = { return obj; }, - fromPartial, I>>(object: I): DelegatorStartingInfo { + fromPartial(object: DeepPartial): DelegatorStartingInfo { const message = createBaseDelegatorStartingInfo(); message.previousPeriod = object.previousPeriod !== undefined && object.previousPeriod !== null @@ -957,9 +949,7 @@ export const DelegationDelegatorReward = { return obj; }, - fromPartial, I>>( - object: I, - ): DelegationDelegatorReward { + fromPartial(object: DeepPartial): DelegationDelegatorReward { const message = createBaseDelegationDelegatorReward(); message.validatorAddress = object.validatorAddress ?? ""; message.reward = object.reward?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1063,8 +1053,8 @@ export const CommunityPoolSpendProposalWithDeposit = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): CommunityPoolSpendProposalWithDeposit { const message = createBaseCommunityPoolSpendProposalWithDeposit(); message.title = object.title ?? ""; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 7d3e0d87..d786720a 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -11,7 +11,7 @@ import { FeePool, } from "./distribution"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * DelegatorWithdrawInfo is the address for where distributions rewards are @@ -192,7 +192,7 @@ export const DelegatorWithdrawInfo = { return obj; }, - fromPartial, I>>(object: I): DelegatorWithdrawInfo { + fromPartial(object: DeepPartial): DelegatorWithdrawInfo { const message = createBaseDelegatorWithdrawInfo(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -268,9 +268,7 @@ export const ValidatorOutstandingRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorOutstandingRewardsRecord { + fromPartial(object: DeepPartial): ValidatorOutstandingRewardsRecord { const message = createBaseValidatorOutstandingRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.outstandingRewards = object.outstandingRewards?.map((e) => DecCoin.fromPartial(e)) || []; @@ -346,8 +344,8 @@ export const ValidatorAccumulatedCommissionRecord = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): ValidatorAccumulatedCommissionRecord { const message = createBaseValidatorAccumulatedCommissionRecord(); message.validatorAddress = object.validatorAddress ?? ""; @@ -431,9 +429,7 @@ export const ValidatorHistoricalRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorHistoricalRewardsRecord { + fromPartial(object: DeepPartial): ValidatorHistoricalRewardsRecord { const message = createBaseValidatorHistoricalRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.period = @@ -507,9 +503,7 @@ export const ValidatorCurrentRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorCurrentRewardsRecord { + fromPartial(object: DeepPartial): ValidatorCurrentRewardsRecord { const message = createBaseValidatorCurrentRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.rewards = @@ -596,9 +590,7 @@ export const DelegatorStartingInfoRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): DelegatorStartingInfoRecord { + fromPartial(object: DeepPartial): DelegatorStartingInfoRecord { const message = createBaseDelegatorStartingInfoRecord(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -697,9 +689,7 @@ export const ValidatorSlashEventRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorSlashEventRecord { + fromPartial(object: DeepPartial): ValidatorSlashEventRecord { const message = createBaseValidatorSlashEventRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.height = @@ -934,7 +924,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index 22ebdaf9..ebc9648c 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -10,7 +10,7 @@ import { } from "./distribution"; import { DecCoin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Long, Rpc } from "../../../helpers"; +import { DeepPartial, isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -216,7 +216,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -271,7 +271,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -331,8 +331,8 @@ export const QueryValidatorOutstandingRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryValidatorOutstandingRewardsRequest { const message = createBaseQueryValidatorOutstandingRewardsRequest(); message.validatorAddress = object.validatorAddress ?? ""; @@ -393,8 +393,8 @@ export const QueryValidatorOutstandingRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryValidatorOutstandingRewardsResponse { const message = createBaseQueryValidatorOutstandingRewardsResponse(); message.rewards = @@ -454,9 +454,7 @@ export const QueryValidatorCommissionRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorCommissionRequest { + fromPartial(object: DeepPartial): QueryValidatorCommissionRequest { const message = createBaseQueryValidatorCommissionRequest(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -517,9 +515,7 @@ export const QueryValidatorCommissionResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorCommissionResponse { + fromPartial(object: DeepPartial): QueryValidatorCommissionResponse { const message = createBaseQueryValidatorCommissionResponse(); message.commission = object.commission !== undefined && object.commission !== null @@ -614,9 +610,7 @@ export const QueryValidatorSlashesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorSlashesRequest { + fromPartial(object: DeepPartial): QueryValidatorSlashesRequest { const message = createBaseQueryValidatorSlashesRequest(); message.validatorAddress = object.validatorAddress ?? ""; message.startingHeight = @@ -704,9 +698,7 @@ export const QueryValidatorSlashesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorSlashesResponse { + fromPartial(object: DeepPartial): QueryValidatorSlashesResponse { const message = createBaseQueryValidatorSlashesResponse(); message.slashes = object.slashes?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; message.pagination = @@ -777,9 +769,7 @@ export const QueryDelegationRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationRewardsRequest { + fromPartial(object: DeepPartial): QueryDelegationRewardsRequest { const message = createBaseQueryDelegationRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -842,9 +832,7 @@ export const QueryDelegationRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationRewardsResponse { + fromPartial(object: DeepPartial): QueryDelegationRewardsResponse { const message = createBaseQueryDelegationRewardsResponse(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -900,9 +888,7 @@ export const QueryDelegationTotalRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationTotalRewardsRequest { + fromPartial(object: DeepPartial): QueryDelegationTotalRewardsRequest { const message = createBaseQueryDelegationTotalRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -982,9 +968,7 @@ export const QueryDelegationTotalRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationTotalRewardsResponse { + fromPartial(object: DeepPartial): QueryDelegationTotalRewardsResponse { const message = createBaseQueryDelegationTotalRewardsResponse(); message.rewards = object.rewards?.map((e) => DelegationDelegatorReward.fromPartial(e)) || []; message.total = object.total?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1041,9 +1025,7 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsRequest { + fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -1105,9 +1087,7 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsResponse { + fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => e) || []; return message; @@ -1166,8 +1146,8 @@ export const QueryDelegatorWithdrawAddressRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryDelegatorWithdrawAddressRequest { const message = createBaseQueryDelegatorWithdrawAddressRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; @@ -1227,8 +1207,8 @@ export const QueryDelegatorWithdrawAddressResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryDelegatorWithdrawAddressResponse { const message = createBaseQueryDelegatorWithdrawAddressResponse(); message.withdrawAddress = object.withdrawAddress ?? ""; @@ -1272,7 +1252,7 @@ export const QueryCommunityPoolRequest = { return obj; }, - fromPartial, I>>(_: I): QueryCommunityPoolRequest { + fromPartial(_: DeepPartial): QueryCommunityPoolRequest { const message = createBaseQueryCommunityPoolRequest(); return message; }, @@ -1333,9 +1313,7 @@ export const QueryCommunityPoolResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryCommunityPoolResponse { + fromPartial(object: DeepPartial): QueryCommunityPoolResponse { const message = createBaseQueryCommunityPoolResponse(); message.pool = object.pool?.map((e) => DecCoin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index a39d2de4..b5b3387d 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * MsgSetWithdrawAddress sets the withdraw address for @@ -112,7 +112,7 @@ export const MsgSetWithdrawAddress = { return obj; }, - fromPartial, I>>(object: I): MsgSetWithdrawAddress { + fromPartial(object: DeepPartial): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -156,9 +156,7 @@ export const MsgSetWithdrawAddressResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgSetWithdrawAddressResponse { + fromPartial(_: DeepPartial): MsgSetWithdrawAddressResponse { const message = createBaseMsgSetWithdrawAddressResponse(); return message; }, @@ -224,9 +222,7 @@ export const MsgWithdrawDelegatorReward = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgWithdrawDelegatorReward { + fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -270,9 +266,7 @@ export const MsgWithdrawDelegatorRewardResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgWithdrawDelegatorRewardResponse { + fromPartial(_: DeepPartial): MsgWithdrawDelegatorRewardResponse { const message = createBaseMsgWithdrawDelegatorRewardResponse(); return message; }, @@ -327,9 +321,7 @@ export const MsgWithdrawValidatorCommission = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgWithdrawValidatorCommission { + fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -372,8 +364,8 @@ export const MsgWithdrawValidatorCommissionResponse = { return obj; }, - fromPartial, I>>( - _: I, + fromPartial( + _: DeepPartial, ): MsgWithdrawValidatorCommissionResponse { const message = createBaseMsgWithdrawValidatorCommissionResponse(); return message; @@ -446,7 +438,7 @@ export const MsgFundCommunityPool = { return obj; }, - fromPartial, I>>(object: I): MsgFundCommunityPool { + fromPartial(object: DeepPartial): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.depositor = object.depositor ?? ""; @@ -490,9 +482,7 @@ export const MsgFundCommunityPoolResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgFundCommunityPoolResponse { + fromPartial(_: DeepPartial): MsgFundCommunityPoolResponse { const message = createBaseMsgFundCommunityPoolResponse(); return message; }, diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index b562d7d8..264cd945 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * Equivocation implements the Evidence interface and defines evidence of double @@ -98,7 +98,7 @@ export const Equivocation = { return obj; }, - fromPartial, I>>(object: I): Equivocation { + fromPartial(object: DeepPartial): Equivocation { const message = createBaseEquivocation(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index 5794e677..d8bfa3ed 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; +import { DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** GenesisState defines the evidence module's genesis state. */ @@ -66,7 +66,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 0c506f61..ae9c47df 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ @@ -91,7 +91,7 @@ export const QueryEvidenceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryEvidenceRequest { + fromPartial(object: DeepPartial): QueryEvidenceRequest { const message = createBaseQueryEvidenceRequest(); message.evidenceHash = object.evidenceHash ?? new Uint8Array(); return message; @@ -148,7 +148,7 @@ export const QueryEvidenceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryEvidenceResponse { + fromPartial(object: DeepPartial): QueryEvidenceResponse { const message = createBaseQueryEvidenceResponse(); message.evidence = object.evidence !== undefined && object.evidence !== null @@ -208,7 +208,7 @@ export const QueryAllEvidenceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllEvidenceRequest { + fromPartial(object: DeepPartial): QueryAllEvidenceRequest { const message = createBaseQueryAllEvidenceRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -285,9 +285,7 @@ export const QueryAllEvidenceResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllEvidenceResponse { + fromPartial(object: DeepPartial): QueryAllEvidenceResponse { const message = createBaseQueryAllEvidenceResponse(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 0fed1698..b7de61dc 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * MsgSubmitEvidence represents a message that supports submitting arbitrary @@ -81,7 +81,7 @@ export const MsgSubmitEvidence = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitEvidence { + fromPartial(object: DeepPartial): MsgSubmitEvidence { const message = createBaseMsgSubmitEvidence(); message.submitter = object.submitter ?? ""; message.evidence = @@ -142,9 +142,7 @@ export const MsgSubmitEvidenceResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgSubmitEvidenceResponse { + fromPartial(object: DeepPartial): MsgSubmitEvidenceResponse { const message = createBaseMsgSubmitEvidenceResponse(); message.hash = object.hash ?? new Uint8Array(); return message; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index 295c702c..f0f0ac47 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -5,7 +5,7 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * BasicAllowance implements Allowance with a one-time grant of tokens @@ -144,7 +144,7 @@ export const BasicAllowance = { return obj; }, - fromPartial, I>>(object: I): BasicAllowance { + fromPartial(object: DeepPartial): BasicAllowance { const message = createBaseBasicAllowance(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; message.expiration = @@ -265,7 +265,7 @@ export const PeriodicAllowance = { return obj; }, - fromPartial, I>>(object: I): PeriodicAllowance { + fromPartial(object: DeepPartial): PeriodicAllowance { const message = createBasePeriodicAllowance(); message.basic = object.basic !== undefined && object.basic !== null @@ -352,7 +352,7 @@ export const AllowedMsgAllowance = { return obj; }, - fromPartial, I>>(object: I): AllowedMsgAllowance { + fromPartial(object: DeepPartial): AllowedMsgAllowance { const message = createBaseAllowedMsgAllowance(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -435,7 +435,7 @@ export const Grant = { return obj; }, - fromPartial, I>>(object: I): Grant { + fromPartial(object: DeepPartial): Grant { const message = createBaseGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 0a28e052..d05696b3 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; +import { DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** GenesisState contains a set of fee allowances, persisted from the store */ @@ -67,7 +67,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; return message; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index b452f275..2c808f56 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ @@ -115,7 +115,7 @@ export const QueryAllowanceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllowanceRequest { + fromPartial(object: DeepPartial): QueryAllowanceRequest { const message = createBaseQueryAllowanceRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -173,7 +173,7 @@ export const QueryAllowanceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAllowanceResponse { + fromPartial(object: DeepPartial): QueryAllowanceResponse { const message = createBaseQueryAllowanceResponse(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -244,7 +244,7 @@ export const QueryAllowancesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllowancesRequest { + fromPartial(object: DeepPartial): QueryAllowancesRequest { const message = createBaseQueryAllowancesRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -324,7 +324,7 @@ export const QueryAllowancesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAllowancesResponse { + fromPartial(object: DeepPartial): QueryAllowancesResponse { const message = createBaseQueryAllowancesResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -396,9 +396,7 @@ export const QueryAllowancesByGranterRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllowancesByGranterRequest { + fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { const message = createBaseQueryAllowancesByGranterRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -478,9 +476,7 @@ export const QueryAllowancesByGranterResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllowancesByGranterResponse { + fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { const message = createBaseQueryAllowancesByGranterResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index caa2836b..a92a1617 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -107,7 +107,7 @@ export const MsgGrantAllowance = { return obj; }, - fromPartial, I>>(object: I): MsgGrantAllowance { + fromPartial(object: DeepPartial): MsgGrantAllowance { const message = createBaseMsgGrantAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -155,7 +155,7 @@ export const MsgGrantAllowanceResponse = { return obj; }, - fromPartial, I>>(_: I): MsgGrantAllowanceResponse { + fromPartial(_: DeepPartial): MsgGrantAllowanceResponse { const message = createBaseMsgGrantAllowanceResponse(); return message; }, @@ -221,7 +221,7 @@ export const MsgRevokeAllowance = { return obj; }, - fromPartial, I>>(object: I): MsgRevokeAllowance { + fromPartial(object: DeepPartial): MsgRevokeAllowance { const message = createBaseMsgRevokeAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -265,7 +265,7 @@ export const MsgRevokeAllowanceResponse = { return obj; }, - fromPartial, I>>(_: I): MsgRevokeAllowanceResponse { + fromPartial(_: DeepPartial): MsgRevokeAllowanceResponse { const message = createBaseMsgRevokeAllowanceResponse(); return message; }, diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 4b35676c..46affc8f 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.genutil.v1beta1"; /** GenesisState defines the raw genesis transaction in JSON. */ @@ -65,7 +65,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.genTxs = object.genTxs?.map((e) => e) || []; return message; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index 7ac0d10c..7a4260e3 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** GenesisState defines the gov module's genesis state. */ @@ -168,7 +168,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 3d717289..ea0184b6 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -8,7 +8,6 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, - Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -347,7 +346,7 @@ export const WeightedVoteOption = { return obj; }, - fromPartial, I>>(object: I): WeightedVoteOption { + fromPartial(object: DeepPartial): WeightedVoteOption { const message = createBaseWeightedVoteOption(); message.option = object.option ?? 0; message.weight = object.weight ?? ""; @@ -415,7 +414,7 @@ export const TextProposal = { return obj; }, - fromPartial, I>>(object: I): TextProposal { + fromPartial(object: DeepPartial): TextProposal { const message = createBaseTextProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -500,7 +499,7 @@ export const Deposit = { return obj; }, - fromPartial, I>>(object: I): Deposit { + fromPartial(object: DeepPartial): Deposit { const message = createBaseDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -666,7 +665,7 @@ export const Proposal = { return obj; }, - fromPartial, I>>(object: I): Proposal { + fromPartial(object: DeepPartial): Proposal { const message = createBaseProposal(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -782,7 +781,7 @@ export const TallyResult = { return obj; }, - fromPartial, I>>(object: I): TallyResult { + fromPartial(object: DeepPartial): TallyResult { const message = createBaseTallyResult(); message.yes = object.yes ?? ""; message.abstain = object.abstain ?? ""; @@ -882,7 +881,7 @@ export const Vote = { return obj; }, - fromPartial, I>>(object: I): Vote { + fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -968,7 +967,7 @@ export const DepositParams = { return obj; }, - fromPartial, I>>(object: I): DepositParams { + fromPartial(object: DeepPartial): DepositParams { const message = createBaseDepositParams(); message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || []; message.maxDepositPeriod = @@ -1029,7 +1028,7 @@ export const VotingParams = { return obj; }, - fromPartial, I>>(object: I): VotingParams { + fromPartial(object: DeepPartial): VotingParams { const message = createBaseVotingParams(); message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null @@ -1117,7 +1116,7 @@ export const TallyParams = { return obj; }, - fromPartial, I>>(object: I): TallyParams { + fromPartial(object: DeepPartial): TallyParams { const message = createBaseTallyParams(); message.quorum = object.quorum ?? new Uint8Array(); message.threshold = object.threshold ?? new Uint8Array(); diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 2fd327bf..4a752e8b 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -14,7 +14,7 @@ import { } from "./gov"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { Long, isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ @@ -201,7 +201,7 @@ export const QueryProposalRequest = { return obj; }, - fromPartial, I>>(object: I): QueryProposalRequest { + fromPartial(object: DeepPartial): QueryProposalRequest { const message = createBaseQueryProposalRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -261,7 +261,7 @@ export const QueryProposalResponse = { return obj; }, - fromPartial, I>>(object: I): QueryProposalResponse { + fromPartial(object: DeepPartial): QueryProposalResponse { const message = createBaseQueryProposalResponse(); message.proposal = object.proposal !== undefined && object.proposal !== null @@ -355,7 +355,7 @@ export const QueryProposalsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryProposalsRequest { + fromPartial(object: DeepPartial): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); message.proposalStatus = object.proposalStatus ?? 0; message.voter = object.voter ?? ""; @@ -437,7 +437,7 @@ export const QueryProposalsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryProposalsResponse { + fromPartial(object: DeepPartial): QueryProposalsResponse { const message = createBaseQueryProposalsResponse(); message.proposals = object.proposals?.map((e) => Proposal.fromPartial(e)) || []; message.pagination = @@ -508,7 +508,7 @@ export const QueryVoteRequest = { return obj; }, - fromPartial, I>>(object: I): QueryVoteRequest { + fromPartial(object: DeepPartial): QueryVoteRequest { const message = createBaseQueryVoteRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -568,7 +568,7 @@ export const QueryVoteResponse = { return obj; }, - fromPartial, I>>(object: I): QueryVoteResponse { + fromPartial(object: DeepPartial): QueryVoteResponse { const message = createBaseQueryVoteResponse(); message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; @@ -637,7 +637,7 @@ export const QueryVotesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryVotesRequest { + fromPartial(object: DeepPartial): QueryVotesRequest { const message = createBaseQueryVotesRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -718,7 +718,7 @@ export const QueryVotesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryVotesResponse { + fromPartial(object: DeepPartial): QueryVotesResponse { const message = createBaseQueryVotesResponse(); message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; message.pagination = @@ -778,7 +778,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryParamsRequest { + fromPartial(object: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.paramsType = object.paramsType ?? ""; return message; @@ -859,7 +859,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.votingParams = object.votingParams !== undefined && object.votingParams !== null @@ -937,7 +937,7 @@ export const QueryDepositRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDepositRequest { + fromPartial(object: DeepPartial): QueryDepositRequest { const message = createBaseQueryDepositRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -998,7 +998,7 @@ export const QueryDepositResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDepositResponse { + fromPartial(object: DeepPartial): QueryDepositResponse { const message = createBaseQueryDepositResponse(); message.deposit = object.deposit !== undefined && object.deposit !== null @@ -1069,7 +1069,7 @@ export const QueryDepositsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDepositsRequest { + fromPartial(object: DeepPartial): QueryDepositsRequest { const message = createBaseQueryDepositsRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1150,7 +1150,7 @@ export const QueryDepositsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDepositsResponse { + fromPartial(object: DeepPartial): QueryDepositsResponse { const message = createBaseQueryDepositsResponse(); message.deposits = object.deposits?.map((e) => Deposit.fromPartial(e)) || []; message.pagination = @@ -1210,7 +1210,7 @@ export const QueryTallyResultRequest = { return obj; }, - fromPartial, I>>(object: I): QueryTallyResultRequest { + fromPartial(object: DeepPartial): QueryTallyResultRequest { const message = createBaseQueryTallyResultRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1270,9 +1270,7 @@ export const QueryTallyResultResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryTallyResultResponse { + fromPartial(object: DeepPartial): QueryTallyResultResponse { const message = createBaseQueryTallyResultResponse(); message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index c23a55e5..bdae77d0 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -4,7 +4,7 @@ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { VoteOption, WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -140,7 +140,7 @@ export const MsgSubmitProposal = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitProposal { + fromPartial(object: DeepPartial): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; @@ -199,9 +199,7 @@ export const MsgSubmitProposalResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgSubmitProposalResponse { + fromPartial(object: DeepPartial): MsgSubmitProposalResponse { const message = createBaseMsgSubmitProposalResponse(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -282,7 +280,7 @@ export const MsgVote = { return obj; }, - fromPartial, I>>(object: I): MsgVote { + fromPartial(object: DeepPartial): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -330,7 +328,7 @@ export const MsgVoteResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVoteResponse { + fromPartial(_: DeepPartial): MsgVoteResponse { const message = createBaseMsgVoteResponse(); return message; }, @@ -415,7 +413,7 @@ export const MsgVoteWeighted = { return obj; }, - fromPartial, I>>(object: I): MsgVoteWeighted { + fromPartial(object: DeepPartial): MsgVoteWeighted { const message = createBaseMsgVoteWeighted(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -463,7 +461,7 @@ export const MsgVoteWeightedResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVoteWeightedResponse { + fromPartial(_: DeepPartial): MsgVoteWeightedResponse { const message = createBaseMsgVoteWeightedResponse(); return message; }, @@ -546,7 +544,7 @@ export const MsgDeposit = { return obj; }, - fromPartial, I>>(object: I): MsgDeposit { + fromPartial(object: DeepPartial): MsgDeposit { const message = createBaseMsgDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -594,7 +592,7 @@ export const MsgDepositResponse = { return obj; }, - fromPartial, I>>(_: I): MsgDepositResponse { + fromPartial(_: DeepPartial): MsgDepositResponse { const message = createBaseMsgDepositResponse(); return message; }, diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index d7ce5fa1..86b275d8 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** GenesisState defines the mint module's genesis state. */ @@ -74,7 +74,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.minter = object.minter !== undefined && object.minter !== null ? Minter.fromPartial(object.minter) : undefined; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index a1b084f8..956554b3 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** Minter represents the minting state. */ @@ -94,7 +94,7 @@ export const Minter = { return obj; }, - fromPartial, I>>(object: I): Minter { + fromPartial(object: DeepPartial): Minter { const message = createBaseMinter(); message.inflation = object.inflation ?? ""; message.annualProvisions = object.annualProvisions ?? ""; @@ -207,7 +207,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.mintDenom = object.mintDenom ?? ""; message.inflationRateChange = object.inflationRateChange ?? ""; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index e8112c54..0c931ffa 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { DeepPartial, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -77,7 +77,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -132,7 +132,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -176,7 +176,7 @@ export const QueryInflationRequest = { return obj; }, - fromPartial, I>>(_: I): QueryInflationRequest { + fromPartial(_: DeepPartial): QueryInflationRequest { const message = createBaseQueryInflationRequest(); return message; }, @@ -234,7 +234,7 @@ export const QueryInflationResponse = { return obj; }, - fromPartial, I>>(object: I): QueryInflationResponse { + fromPartial(object: DeepPartial): QueryInflationResponse { const message = createBaseQueryInflationResponse(); message.inflation = object.inflation ?? new Uint8Array(); return message; @@ -277,9 +277,7 @@ export const QueryAnnualProvisionsRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryAnnualProvisionsRequest { + fromPartial(_: DeepPartial): QueryAnnualProvisionsRequest { const message = createBaseQueryAnnualProvisionsRequest(); return message; }, @@ -339,9 +337,7 @@ export const QueryAnnualProvisionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAnnualProvisionsResponse { + fromPartial(object: DeepPartial): QueryAnnualProvisionsResponse { const message = createBaseQueryAnnualProvisionsResponse(); message.annualProvisions = object.annualProvisions ?? new Uint8Array(); return message; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index 07deeaad..e5e38db6 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** ParameterChangeProposal defines a proposal to change one or more parameters. */ @@ -98,7 +98,7 @@ export const ParameterChangeProposal = { return obj; }, - fromPartial, I>>(object: I): ParameterChangeProposal { + fromPartial(object: DeepPartial): ParameterChangeProposal { const message = createBaseParameterChangeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -178,7 +178,7 @@ export const ParamChange = { return obj; }, - fromPartial, I>>(object: I): ParamChange { + fromPartial(object: DeepPartial): ParamChange { const message = createBaseParamChange(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 9e851c3a..75853715 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** QueryParamsRequest is request type for the Query/Params RPC method. */ @@ -80,7 +80,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryParamsRequest { + fromPartial(object: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; @@ -138,7 +138,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.param = object.param !== undefined && object.param !== null ? ParamChange.fromPartial(object.param) : undefined; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index 150a1fbf..ca5d7d50 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** GenesisState defines the slashing module's genesis state. */ @@ -139,7 +139,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -214,7 +214,7 @@ export const SigningInfo = { return obj; }, - fromPartial, I>>(object: I): SigningInfo { + fromPartial(object: DeepPartial): SigningInfo { const message = createBaseSigningInfo(); message.address = object.address ?? ""; message.validatorSigningInfo = @@ -293,7 +293,7 @@ export const ValidatorMissedBlocks = { return obj; }, - fromPartial, I>>(object: I): ValidatorMissedBlocks { + fromPartial(object: DeepPartial): ValidatorMissedBlocks { const message = createBaseValidatorMissedBlocks(); message.address = object.address ?? ""; message.missedBlocks = object.missedBlocks?.map((e) => MissedBlock.fromPartial(e)) || []; @@ -361,7 +361,7 @@ export const MissedBlock = { return obj; }, - fromPartial, I>>(object: I): MissedBlock { + fromPartial(object: DeepPartial): MissedBlock { const message = createBaseMissedBlock(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.ZERO; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index cdcccf4b..64c99fa0 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../helpers"; +import { DeepPartial, isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method */ @@ -86,7 +86,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -141,7 +141,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -198,7 +198,7 @@ export const QuerySigningInfoRequest = { return obj; }, - fromPartial, I>>(object: I): QuerySigningInfoRequest { + fromPartial(object: DeepPartial): QuerySigningInfoRequest { const message = createBaseQuerySigningInfoRequest(); message.consAddress = object.consAddress ?? ""; return message; @@ -259,9 +259,7 @@ export const QuerySigningInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfoResponse { + fromPartial(object: DeepPartial): QuerySigningInfoResponse { const message = createBaseQuerySigningInfoResponse(); message.valSigningInfo = object.valSigningInfo !== undefined && object.valSigningInfo !== null @@ -321,9 +319,7 @@ export const QuerySigningInfosRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfosRequest { + fromPartial(object: DeepPartial): QuerySigningInfosRequest { const message = createBaseQuerySigningInfosRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -400,9 +396,7 @@ export const QuerySigningInfosResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfosResponse { + fromPartial(object: DeepPartial): QuerySigningInfosResponse { const message = createBaseQuerySigningInfosResponse(); message.info = object.info?.map((e) => ValidatorSigningInfo.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 9a5a9836..bd86b0a3 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -9,7 +9,6 @@ import { fromJsonTimestamp, fromTimestamp, DeepPartial, - Exact, bytesFromBase64, base64FromBytes, } from "../../../helpers"; @@ -164,7 +163,7 @@ export const ValidatorSigningInfo = { return obj; }, - fromPartial, I>>(object: I): ValidatorSigningInfo { + fromPartial(object: DeepPartial): ValidatorSigningInfo { const message = createBaseValidatorSigningInfo(); message.address = object.address ?? ""; message.startHeight = @@ -304,7 +303,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.signedBlocksWindow = object.signedBlocksWindow !== undefined && object.signedBlocksWindow !== null diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 80678571..2cb6f0fd 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** MsgUnjail defines the Msg/Unjail request type */ @@ -61,7 +61,7 @@ export const MsgUnjail = { return obj; }, - fromPartial, I>>(object: I): MsgUnjail { + fromPartial(object: DeepPartial): MsgUnjail { const message = createBaseMsgUnjail(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -104,7 +104,7 @@ export const MsgUnjailResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUnjailResponse { + fromPartial(_: DeepPartial): MsgUnjailResponse { const message = createBaseMsgUnjailResponse(); return message; }, diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 746d6e95..05f2463b 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** * AuthorizationType defines the type of staking module authorization type @@ -190,7 +190,7 @@ export const StakeAuthorization = { return obj; }, - fromPartial, I>>(object: I): StakeAuthorization { + fromPartial(object: DeepPartial): StakeAuthorization { const message = createBaseStakeAuthorization(); message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null @@ -264,9 +264,7 @@ export const StakeAuthorization_Validators = { return obj; }, - fromPartial, I>>( - object: I, - ): StakeAuthorization_Validators { + fromPartial(object: DeepPartial): StakeAuthorization_Validators { const message = createBaseStakeAuthorization_Validators(); message.address = object.address?.map((e) => e) || []; return message; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 1422bbcb..f60ca677 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** GenesisState defines the staking module's genesis state. */ @@ -216,7 +216,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -293,7 +293,7 @@ export const LastValidatorPower = { return obj; }, - fromPartial, I>>(object: I): LastValidatorPower { + fromPartial(object: DeepPartial): LastValidatorPower { const message = createBaseLastValidatorPower(); message.address = object.address ?? ""; message.power = diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index b119eac2..bd45c65d 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -11,7 +11,7 @@ import { Params, } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ @@ -344,7 +344,7 @@ export const QueryValidatorsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorsRequest { + fromPartial(object: DeepPartial): QueryValidatorsRequest { const message = createBaseQueryValidatorsRequest(); message.status = object.status ?? ""; message.pagination = @@ -424,7 +424,7 @@ export const QueryValidatorsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorsResponse { + fromPartial(object: DeepPartial): QueryValidatorsResponse { const message = createBaseQueryValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -484,7 +484,7 @@ export const QueryValidatorRequest = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorRequest { + fromPartial(object: DeepPartial): QueryValidatorRequest { const message = createBaseQueryValidatorRequest(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -541,7 +541,7 @@ export const QueryValidatorResponse = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorResponse { + fromPartial(object: DeepPartial): QueryValidatorResponse { const message = createBaseQueryValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -612,9 +612,7 @@ export const QueryValidatorDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorDelegationsRequest { + fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest { const message = createBaseQueryValidatorDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; message.pagination = @@ -696,9 +694,7 @@ export const QueryValidatorDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorDelegationsResponse { + fromPartial(object: DeepPartial): QueryValidatorDelegationsResponse { const message = createBaseQueryValidatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -774,8 +770,8 @@ export const QueryValidatorUnbondingDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryValidatorUnbondingDelegationsRequest { const message = createBaseQueryValidatorUnbondingDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; @@ -861,8 +857,8 @@ export const QueryValidatorUnbondingDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryValidatorUnbondingDelegationsResponse { const message = createBaseQueryValidatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -935,7 +931,7 @@ export const QueryDelegationRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDelegationRequest { + fromPartial(object: DeepPartial): QueryDelegationRequest { const message = createBaseQueryDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -997,7 +993,7 @@ export const QueryDelegationResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDelegationResponse { + fromPartial(object: DeepPartial): QueryDelegationResponse { const message = createBaseQueryDelegationResponse(); message.delegationResponse = object.delegationResponse !== undefined && object.delegationResponse !== null @@ -1067,9 +1063,7 @@ export const QueryUnbondingDelegationRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnbondingDelegationRequest { + fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest { const message = createBaseQueryUnbondingDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1127,9 +1121,7 @@ export const QueryUnbondingDelegationResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnbondingDelegationResponse { + fromPartial(object: DeepPartial): QueryUnbondingDelegationResponse { const message = createBaseQueryUnbondingDelegationResponse(); message.unbond = object.unbond !== undefined && object.unbond !== null @@ -1200,9 +1192,7 @@ export const QueryDelegatorDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorDelegationsRequest { + fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest { const message = createBaseQueryDelegatorDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1284,9 +1274,7 @@ export const QueryDelegatorDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorDelegationsResponse { + fromPartial(object: DeepPartial): QueryDelegatorDelegationsResponse { const message = createBaseQueryDelegatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -1362,8 +1350,8 @@ export const QueryDelegatorUnbondingDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryDelegatorUnbondingDelegationsRequest { const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; @@ -1449,8 +1437,8 @@ export const QueryDelegatorUnbondingDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryDelegatorUnbondingDelegationsResponse { const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -1546,9 +1534,7 @@ export const QueryRedelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRedelegationsRequest { + fromPartial(object: DeepPartial): QueryRedelegationsRequest { const message = createBaseQueryRedelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.srcValidatorAddr = object.srcValidatorAddr ?? ""; @@ -1632,9 +1618,7 @@ export const QueryRedelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRedelegationsResponse { + fromPartial(object: DeepPartial): QueryRedelegationsResponse { const message = createBaseQueryRedelegationsResponse(); message.redelegationResponses = object.redelegationResponses?.map((e) => RedelegationResponse.fromPartial(e)) || []; @@ -1707,9 +1691,7 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsRequest { + fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1789,9 +1771,7 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsResponse { + fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -1862,9 +1842,7 @@ export const QueryDelegatorValidatorRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorRequest { + fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest { const message = createBaseQueryDelegatorValidatorRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1922,9 +1900,7 @@ export const QueryDelegatorValidatorResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorResponse { + fromPartial(object: DeepPartial): QueryDelegatorValidatorResponse { const message = createBaseQueryDelegatorValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -1983,9 +1959,7 @@ export const QueryHistoricalInfoRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryHistoricalInfoRequest { + fromPartial(object: DeepPartial): QueryHistoricalInfoRequest { const message = createBaseQueryHistoricalInfoRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -2042,9 +2016,7 @@ export const QueryHistoricalInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryHistoricalInfoResponse { + fromPartial(object: DeepPartial): QueryHistoricalInfoResponse { const message = createBaseQueryHistoricalInfoResponse(); message.hist = object.hist !== undefined && object.hist !== null ? HistoricalInfo.fromPartial(object.hist) : undefined; @@ -2088,7 +2060,7 @@ export const QueryPoolRequest = { return obj; }, - fromPartial, I>>(_: I): QueryPoolRequest { + fromPartial(_: DeepPartial): QueryPoolRequest { const message = createBaseQueryPoolRequest(); return message; }, @@ -2143,7 +2115,7 @@ export const QueryPoolResponse = { return obj; }, - fromPartial, I>>(object: I): QueryPoolResponse { + fromPartial(object: DeepPartial): QueryPoolResponse { const message = createBaseQueryPoolResponse(); message.pool = object.pool !== undefined && object.pool !== null ? Pool.fromPartial(object.pool) : undefined; @@ -2187,7 +2159,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -2242,7 +2214,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index c846f164..6aa81bf1 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -6,7 +6,7 @@ import { Any } from "../../../google/protobuf/any"; import { Duration } from "../../../google/protobuf/duration"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; +import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** BondStatus is the status of a validator. */ @@ -404,7 +404,7 @@ export const HistoricalInfo = { return obj; }, - fromPartial, I>>(object: I): HistoricalInfo { + fromPartial(object: DeepPartial): HistoricalInfo { const message = createBaseHistoricalInfo(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -484,7 +484,7 @@ export const CommissionRates = { return obj; }, - fromPartial, I>>(object: I): CommissionRates { + fromPartial(object: DeepPartial): CommissionRates { const message = createBaseCommissionRates(); message.rate = object.rate ?? ""; message.maxRate = object.maxRate ?? ""; @@ -558,7 +558,7 @@ export const Commission = { return obj; }, - fromPartial, I>>(object: I): Commission { + fromPartial(object: DeepPartial): Commission { const message = createBaseCommission(); message.commissionRates = object.commissionRates !== undefined && object.commissionRates !== null @@ -665,7 +665,7 @@ export const Description = { return obj; }, - fromPartial, I>>(object: I): Description { + fromPartial(object: DeepPartial): Description { const message = createBaseDescription(); message.moniker = object.moniker ?? ""; message.identity = object.identity ?? ""; @@ -840,7 +840,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.operatorAddress = object.operatorAddress ?? ""; message.consensusPubkey = @@ -927,7 +927,7 @@ export const ValAddresses = { return obj; }, - fromPartial, I>>(object: I): ValAddresses { + fromPartial(object: DeepPartial): ValAddresses { const message = createBaseValAddresses(); message.addresses = object.addresses?.map((e) => e) || []; return message; @@ -994,7 +994,7 @@ export const DVPair = { return obj; }, - fromPartial, I>>(object: I): DVPair { + fromPartial(object: DeepPartial): DVPair { const message = createBaseDVPair(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1057,7 +1057,7 @@ export const DVPairs = { return obj; }, - fromPartial, I>>(object: I): DVPairs { + fromPartial(object: DeepPartial): DVPairs { const message = createBaseDVPairs(); message.pairs = object.pairs?.map((e) => DVPair.fromPartial(e)) || []; return message; @@ -1135,7 +1135,7 @@ export const DVVTriplet = { return obj; }, - fromPartial, I>>(object: I): DVVTriplet { + fromPartial(object: DeepPartial): DVVTriplet { const message = createBaseDVVTriplet(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1201,7 +1201,7 @@ export const DVVTriplets = { return obj; }, - fromPartial, I>>(object: I): DVVTriplets { + fromPartial(object: DeepPartial): DVVTriplets { const message = createBaseDVVTriplets(); message.triplets = object.triplets?.map((e) => DVVTriplet.fromPartial(e)) || []; return message; @@ -1279,7 +1279,7 @@ export const Delegation = { return obj; }, - fromPartial, I>>(object: I): Delegation { + fromPartial(object: DeepPartial): Delegation { const message = createBaseDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1367,7 +1367,7 @@ export const UnbondingDelegation = { return obj; }, - fromPartial, I>>(object: I): UnbondingDelegation { + fromPartial(object: DeepPartial): UnbondingDelegation { const message = createBaseUnbondingDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1460,9 +1460,7 @@ export const UnbondingDelegationEntry = { return obj; }, - fromPartial, I>>( - object: I, - ): UnbondingDelegationEntry { + fromPartial(object: DeepPartial): UnbondingDelegationEntry { const message = createBaseUnbondingDelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1562,7 +1560,7 @@ export const RedelegationEntry = { return obj; }, - fromPartial, I>>(object: I): RedelegationEntry { + fromPartial(object: DeepPartial): RedelegationEntry { const message = createBaseRedelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1668,7 +1666,7 @@ export const Redelegation = { return obj; }, - fromPartial, I>>(object: I): Redelegation { + fromPartial(object: DeepPartial): Redelegation { const message = createBaseRedelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1773,7 +1771,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.unbondingTime = object.unbondingTime !== undefined && object.unbondingTime !== null @@ -1849,7 +1847,7 @@ export const DelegationResponse = { return obj; }, - fromPartial, I>>(object: I): DelegationResponse { + fromPartial(object: DeepPartial): DelegationResponse { const message = createBaseDelegationResponse(); message.delegation = object.delegation !== undefined && object.delegation !== null @@ -1926,9 +1924,7 @@ export const RedelegationEntryResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): RedelegationEntryResponse { + fromPartial(object: DeepPartial): RedelegationEntryResponse { const message = createBaseRedelegationEntryResponse(); message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null @@ -2008,7 +2004,7 @@ export const RedelegationResponse = { return obj; }, - fromPartial, I>>(object: I): RedelegationResponse { + fromPartial(object: DeepPartial): RedelegationResponse { const message = createBaseRedelegationResponse(); message.redelegation = object.redelegation !== undefined && object.redelegation !== null @@ -2079,7 +2075,7 @@ export const Pool = { return obj; }, - fromPartial, I>>(object: I): Pool { + fromPartial(object: DeepPartial): Pool { const message = createBasePool(); message.notBondedTokens = object.notBondedTokens ?? ""; message.bondedTokens = object.bondedTokens ?? ""; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 54f869ee..0e359c14 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -5,7 +5,7 @@ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ @@ -201,7 +201,7 @@ export const MsgCreateValidator = { return obj; }, - fromPartial, I>>(object: I): MsgCreateValidator { + fromPartial(object: DeepPartial): MsgCreateValidator { const message = createBaseMsgCreateValidator(); message.description = object.description !== undefined && object.description !== null @@ -258,7 +258,7 @@ export const MsgCreateValidatorResponse = { return obj; }, - fromPartial, I>>(_: I): MsgCreateValidatorResponse { + fromPartial(_: DeepPartial): MsgCreateValidatorResponse { const message = createBaseMsgCreateValidatorResponse(); return message; }, @@ -347,7 +347,7 @@ export const MsgEditValidator = { return obj; }, - fromPartial, I>>(object: I): MsgEditValidator { + fromPartial(object: DeepPartial): MsgEditValidator { const message = createBaseMsgEditValidator(); message.description = object.description !== undefined && object.description !== null @@ -396,7 +396,7 @@ export const MsgEditValidatorResponse = { return obj; }, - fromPartial, I>>(_: I): MsgEditValidatorResponse { + fromPartial(_: DeepPartial): MsgEditValidatorResponse { const message = createBaseMsgEditValidatorResponse(); return message; }, @@ -473,7 +473,7 @@ export const MsgDelegate = { return obj; }, - fromPartial, I>>(object: I): MsgDelegate { + fromPartial(object: DeepPartial): MsgDelegate { const message = createBaseMsgDelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -519,7 +519,7 @@ export const MsgDelegateResponse = { return obj; }, - fromPartial, I>>(_: I): MsgDelegateResponse { + fromPartial(_: DeepPartial): MsgDelegateResponse { const message = createBaseMsgDelegateResponse(); return message; }, @@ -607,7 +607,7 @@ export const MsgBeginRedelegate = { return obj; }, - fromPartial, I>>(object: I): MsgBeginRedelegate { + fromPartial(object: DeepPartial): MsgBeginRedelegate { const message = createBaseMsgBeginRedelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -668,9 +668,7 @@ export const MsgBeginRedelegateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgBeginRedelegateResponse { + fromPartial(object: DeepPartial): MsgBeginRedelegateResponse { const message = createBaseMsgBeginRedelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null @@ -751,7 +749,7 @@ export const MsgUndelegate = { return obj; }, - fromPartial, I>>(object: I): MsgUndelegate { + fromPartial(object: DeepPartial): MsgUndelegate { const message = createBaseMsgUndelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -811,7 +809,7 @@ export const MsgUndelegateResponse = { return obj; }, - fromPartial, I>>(object: I): MsgUndelegateResponse { + fromPartial(object: DeepPartial): MsgUndelegateResponse { const message = createBaseMsgUndelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index d4164184..62e76c81 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -3,7 +3,7 @@ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { DeepPartial, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.tx.signing.v1beta1"; /** SignMode represents a signing mode with its own security guarantees. */ @@ -208,7 +208,7 @@ export const SignatureDescriptors = { return obj; }, - fromPartial, I>>(object: I): SignatureDescriptors { + fromPartial(object: DeepPartial): SignatureDescriptors { const message = createBaseSignatureDescriptors(); message.signatures = object.signatures?.map((e) => SignatureDescriptor.fromPartial(e)) || []; return message; @@ -288,7 +288,7 @@ export const SignatureDescriptor = { return obj; }, - fromPartial, I>>(object: I): SignatureDescriptor { + fromPartial(object: DeepPartial): SignatureDescriptor { const message = createBaseSignatureDescriptor(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -368,9 +368,7 @@ export const SignatureDescriptor_Data = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data { + fromPartial(object: DeepPartial): SignatureDescriptor_Data { const message = createBaseSignatureDescriptor_Data(); message.single = object.single !== undefined && object.single !== null @@ -447,9 +445,7 @@ export const SignatureDescriptor_Data_Single = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data_Single { + fromPartial(object: DeepPartial): SignatureDescriptor_Data_Single { const message = createBaseSignatureDescriptor_Data_Single(); message.mode = object.mode ?? 0; message.signature = object.signature ?? new Uint8Array(); @@ -526,9 +522,7 @@ export const SignatureDescriptor_Data_Multi = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data_Multi { + fromPartial(object: DeepPartial): SignatureDescriptor_Data_Multi { const message = createBaseSignatureDescriptor_Data_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index db1d8248..279c1a15 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -6,7 +6,7 @@ import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; import { BlockID } from "../../../tendermint/types/types"; import { Block } from "../../../tendermint/types/block"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ @@ -331,7 +331,7 @@ export const GetTxsEventRequest = { return obj; }, - fromPartial, I>>(object: I): GetTxsEventRequest { + fromPartial(object: DeepPartial): GetTxsEventRequest { const message = createBaseGetTxsEventRequest(); message.events = object.events?.map((e) => e) || []; message.pagination = @@ -428,7 +428,7 @@ export const GetTxsEventResponse = { return obj; }, - fromPartial, I>>(object: I): GetTxsEventResponse { + fromPartial(object: DeepPartial): GetTxsEventResponse { const message = createBaseGetTxsEventResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.txResponses = object.txResponses?.map((e) => TxResponse.fromPartial(e)) || []; @@ -501,7 +501,7 @@ export const BroadcastTxRequest = { return obj; }, - fromPartial, I>>(object: I): BroadcastTxRequest { + fromPartial(object: DeepPartial): BroadcastTxRequest { const message = createBaseBroadcastTxRequest(); message.txBytes = object.txBytes ?? new Uint8Array(); message.mode = object.mode ?? 0; @@ -559,7 +559,7 @@ export const BroadcastTxResponse = { return obj; }, - fromPartial, I>>(object: I): BroadcastTxResponse { + fromPartial(object: DeepPartial): BroadcastTxResponse { const message = createBaseBroadcastTxResponse(); message.txResponse = object.txResponse !== undefined && object.txResponse !== null @@ -630,7 +630,7 @@ export const SimulateRequest = { return obj; }, - fromPartial, I>>(object: I): SimulateRequest { + fromPartial(object: DeepPartial): SimulateRequest { const message = createBaseSimulateRequest(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txBytes = object.txBytes ?? new Uint8Array(); @@ -699,7 +699,7 @@ export const SimulateResponse = { return obj; }, - fromPartial, I>>(object: I): SimulateResponse { + fromPartial(object: DeepPartial): SimulateResponse { const message = createBaseSimulateResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -760,7 +760,7 @@ export const GetTxRequest = { return obj; }, - fromPartial, I>>(object: I): GetTxRequest { + fromPartial(object: DeepPartial): GetTxRequest { const message = createBaseGetTxRequest(); message.hash = object.hash ?? ""; return message; @@ -828,7 +828,7 @@ export const GetTxResponse = { return obj; }, - fromPartial, I>>(object: I): GetTxResponse { + fromPartial(object: DeepPartial): GetTxResponse { const message = createBaseGetTxResponse(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txResponse = @@ -900,7 +900,7 @@ export const GetBlockWithTxsRequest = { return obj; }, - fromPartial, I>>(object: I): GetBlockWithTxsRequest { + fromPartial(object: DeepPartial): GetBlockWithTxsRequest { const message = createBaseGetBlockWithTxsRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1002,7 +1002,7 @@ export const GetBlockWithTxsResponse = { return obj; }, - fromPartial, I>>(object: I): GetBlockWithTxsResponse { + fromPartial(object: DeepPartial): GetBlockWithTxsResponse { const message = createBaseGetBlockWithTxsResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.blockId = diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 26ee4fdb..7fe4c2cd 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -5,7 +5,7 @@ import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/s import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** Tx is the standard type used for broadcasting transactions. */ @@ -310,7 +310,7 @@ export const Tx = { return obj; }, - fromPartial, I>>(object: I): Tx { + fromPartial(object: DeepPartial): Tx { const message = createBaseTx(); message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; @@ -408,7 +408,7 @@ export const TxRaw = { return obj; }, - fromPartial, I>>(object: I): TxRaw { + fromPartial(object: DeepPartial): TxRaw { const message = createBaseTxRaw(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -506,7 +506,7 @@ export const SignDoc = { return obj; }, - fromPartial, I>>(object: I): SignDoc { + fromPartial(object: DeepPartial): SignDoc { const message = createBaseSignDoc(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -636,7 +636,7 @@ export const TxBody = { return obj; }, - fromPartial, I>>(object: I): TxBody { + fromPartial(object: DeepPartial): TxBody { const message = createBaseTxBody(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; message.memo = object.memo ?? ""; @@ -719,7 +719,7 @@ export const AuthInfo = { return obj; }, - fromPartial, I>>(object: I): AuthInfo { + fromPartial(object: DeepPartial): AuthInfo { const message = createBaseAuthInfo(); message.signerInfos = object.signerInfos?.map((e) => SignerInfo.fromPartial(e)) || []; message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; @@ -800,7 +800,7 @@ export const SignerInfo = { return obj; }, - fromPartial, I>>(object: I): SignerInfo { + fromPartial(object: DeepPartial): SignerInfo { const message = createBaseSignerInfo(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -880,7 +880,7 @@ export const ModeInfo = { return obj; }, - fromPartial, I>>(object: I): ModeInfo { + fromPartial(object: DeepPartial): ModeInfo { const message = createBaseModeInfo(); message.single = object.single !== undefined && object.single !== null @@ -943,7 +943,7 @@ export const ModeInfo_Single = { return obj; }, - fromPartial, I>>(object: I): ModeInfo_Single { + fromPartial(object: DeepPartial): ModeInfo_Single { const message = createBaseModeInfo_Single(); message.mode = object.mode ?? 0; return message; @@ -1019,7 +1019,7 @@ export const ModeInfo_Multi = { return obj; }, - fromPartial, I>>(object: I): ModeInfo_Multi { + fromPartial(object: DeepPartial): ModeInfo_Multi { const message = createBaseModeInfo_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null @@ -1118,7 +1118,7 @@ export const Fee = { return obj; }, - fromPartial, I>>(object: I): Fee { + fromPartial(object: DeepPartial): Fee { const message = createBaseFee(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.gasLimit = diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index 3bc75d65..d30e928d 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { DeepPartial, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -125,7 +125,7 @@ export const QueryCurrentPlanRequest = { return obj; }, - fromPartial, I>>(_: I): QueryCurrentPlanRequest { + fromPartial(_: DeepPartial): QueryCurrentPlanRequest { const message = createBaseQueryCurrentPlanRequest(); return message; }, @@ -180,9 +180,7 @@ export const QueryCurrentPlanResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryCurrentPlanResponse { + fromPartial(object: DeepPartial): QueryCurrentPlanResponse { const message = createBaseQueryCurrentPlanResponse(); message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; @@ -239,7 +237,7 @@ export const QueryAppliedPlanRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAppliedPlanRequest { + fromPartial(object: DeepPartial): QueryAppliedPlanRequest { const message = createBaseQueryAppliedPlanRequest(); message.name = object.name ?? ""; return message; @@ -295,9 +293,7 @@ export const QueryAppliedPlanResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAppliedPlanResponse { + fromPartial(object: DeepPartial): QueryAppliedPlanResponse { const message = createBaseQueryAppliedPlanResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -354,9 +350,7 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateRequest { + fromPartial(object: DeepPartial): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); message.lastHeight = object.lastHeight !== undefined && object.lastHeight !== null @@ -420,9 +414,7 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateResponse { + fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState ?? new Uint8Array(); return message; @@ -478,9 +470,7 @@ export const QueryModuleVersionsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryModuleVersionsRequest { + fromPartial(object: DeepPartial): QueryModuleVersionsRequest { const message = createBaseQueryModuleVersionsRequest(); message.moduleName = object.moduleName ?? ""; return message; @@ -544,9 +534,7 @@ export const QueryModuleVersionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryModuleVersionsResponse { + fromPartial(object: DeepPartial): QueryModuleVersionsResponse { const message = createBaseQueryModuleVersionsResponse(); message.moduleVersions = object.moduleVersions?.map((e) => ModuleVersion.fromPartial(e)) || []; return message; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index ffaa2080..1f4e8861 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -3,7 +3,7 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** Plan specifies information about a planned upgrade and when it should occur. */ @@ -180,7 +180,7 @@ export const Plan = { return obj; }, - fromPartial, I>>(object: I): Plan { + fromPartial(object: DeepPartial): Plan { const message = createBasePlan(); message.name = object.name ?? ""; message.time = @@ -267,7 +267,7 @@ export const SoftwareUpgradeProposal = { return obj; }, - fromPartial, I>>(object: I): SoftwareUpgradeProposal { + fromPartial(object: DeepPartial): SoftwareUpgradeProposal { const message = createBaseSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -337,9 +337,7 @@ export const CancelSoftwareUpgradeProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): CancelSoftwareUpgradeProposal { + fromPartial(object: DeepPartial): CancelSoftwareUpgradeProposal { const message = createBaseCancelSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -407,7 +405,7 @@ export const ModuleVersion = { return obj; }, - fromPartial, I>>(object: I): ModuleVersion { + fromPartial(object: DeepPartial): ModuleVersion { const message = createBaseModuleVersion(); message.name = object.name ?? ""; message.version = diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 2e62ae5c..4d8dcff9 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { Long, isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting @@ -119,7 +119,7 @@ export const MsgCreateVestingAccount = { return obj; }, - fromPartial, I>>(object: I): MsgCreateVestingAccount { + fromPartial(object: DeepPartial): MsgCreateVestingAccount { const message = createBaseMsgCreateVestingAccount(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -167,9 +167,7 @@ export const MsgCreateVestingAccountResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgCreateVestingAccountResponse { + fromPartial(_: DeepPartial): MsgCreateVestingAccountResponse { const message = createBaseMsgCreateVestingAccountResponse(); return message; }, diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index 03f5a6d5..e91d2ee7 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -3,7 +3,7 @@ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all @@ -179,7 +179,7 @@ export const BaseVestingAccount = { return obj; }, - fromPartial, I>>(object: I): BaseVestingAccount { + fromPartial(object: DeepPartial): BaseVestingAccount { const message = createBaseBaseVestingAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -259,9 +259,7 @@ export const ContinuousVestingAccount = { return obj; }, - fromPartial, I>>( - object: I, - ): ContinuousVestingAccount { + fromPartial(object: DeepPartial): ContinuousVestingAccount { const message = createBaseContinuousVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -329,7 +327,7 @@ export const DelayedVestingAccount = { return obj; }, - fromPartial, I>>(object: I): DelayedVestingAccount { + fromPartial(object: DeepPartial): DelayedVestingAccount { const message = createBaseDelayedVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -405,7 +403,7 @@ export const Period = { return obj; }, - fromPartial, I>>(object: I): Period { + fromPartial(object: DeepPartial): Period { const message = createBasePeriod(); message.length = object.length !== undefined && object.length !== null ? Long.fromValue(object.length) : Long.ZERO; @@ -498,7 +496,7 @@ export const PeriodicVestingAccount = { return obj; }, - fromPartial, I>>(object: I): PeriodicVestingAccount { + fromPartial(object: DeepPartial): PeriodicVestingAccount { const message = createBasePeriodicVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -567,7 +565,7 @@ export const PermanentLockedAccount = { return obj; }, - fromPartial, I>>(object: I): PermanentLockedAccount { + fromPartial(object: DeepPartial): PermanentLockedAccount { const message = createBasePermanentLockedAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index e3331f54..daee5486 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -3,7 +3,7 @@ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** GenesisState - genesis state of x/wasm */ @@ -168,7 +168,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -262,7 +262,7 @@ export const GenesisState_GenMsgs = { return obj; }, - fromPartial, I>>(object: I): GenesisState_GenMsgs { + fromPartial(object: DeepPartial): GenesisState_GenMsgs { const message = createBaseGenesisState_GenMsgs(); message.storeCode = object.storeCode !== undefined && object.storeCode !== null @@ -366,7 +366,7 @@ export const Code = { return obj; }, - fromPartial, I>>(object: I): Code { + fromPartial(object: DeepPartial): Code { const message = createBaseCode(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -460,7 +460,7 @@ export const Contract = { return obj; }, - fromPartial, I>>(object: I): Contract { + fromPartial(object: DeepPartial): Contract { const message = createBaseContract(); message.contractAddress = object.contractAddress ?? ""; message.contractInfo = @@ -533,7 +533,7 @@ export const Sequence = { return obj; }, - fromPartial, I>>(object: I): Sequence { + fromPartial(object: DeepPartial): Sequence { const message = createBaseSequence(); message.idKey = object.idKey ?? new Uint8Array(); message.value = diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index c6505e0a..c43ed682 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgIBCSend */ @@ -118,7 +118,7 @@ export const MsgIBCSend = { return obj; }, - fromPartial, I>>(object: I): MsgIBCSend { + fromPartial(object: DeepPartial): MsgIBCSend { const message = createBaseMsgIBCSend(); message.channel = object.channel ?? ""; message.timeoutHeight = @@ -183,7 +183,7 @@ export const MsgIBCCloseChannel = { return obj; }, - fromPartial, I>>(object: I): MsgIBCCloseChannel { + fromPartial(object: DeepPartial): MsgIBCCloseChannel { const message = createBaseMsgIBCCloseChannel(); message.channel = object.channel ?? ""; return message; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 0fe4a57e..e76137df 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -3,7 +3,7 @@ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** StoreCodeProposal gov proposal content type to submit WASM code to the system */ @@ -302,7 +302,7 @@ export const StoreCodeProposal = { return obj; }, - fromPartial, I>>(object: I): StoreCodeProposal { + fromPartial(object: DeepPartial): StoreCodeProposal { const message = createBaseStoreCodeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -449,9 +449,7 @@ export const InstantiateContractProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): InstantiateContractProposal { + fromPartial(object: DeepPartial): InstantiateContractProposal { const message = createBaseInstantiateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -560,7 +558,7 @@ export const MigrateContractProposal = { return obj; }, - fromPartial, I>>(object: I): MigrateContractProposal { + fromPartial(object: DeepPartial): MigrateContractProposal { const message = createBaseMigrateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -655,7 +653,7 @@ export const SudoContractProposal = { return obj; }, - fromPartial, I>>(object: I): SudoContractProposal { + fromPartial(object: DeepPartial): SudoContractProposal { const message = createBaseSudoContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -776,7 +774,7 @@ export const ExecuteContractProposal = { return obj; }, - fromPartial, I>>(object: I): ExecuteContractProposal { + fromPartial(object: DeepPartial): ExecuteContractProposal { const message = createBaseExecuteContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -870,7 +868,7 @@ export const UpdateAdminProposal = { return obj; }, - fromPartial, I>>(object: I): UpdateAdminProposal { + fromPartial(object: DeepPartial): UpdateAdminProposal { const message = createBaseUpdateAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -951,7 +949,7 @@ export const ClearAdminProposal = { return obj; }, - fromPartial, I>>(object: I): ClearAdminProposal { + fromPartial(object: DeepPartial): ClearAdminProposal { const message = createBaseClearAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1049,7 +1047,7 @@ export const PinCodesProposal = { return obj; }, - fromPartial, I>>(object: I): PinCodesProposal { + fromPartial(object: DeepPartial): PinCodesProposal { const message = createBasePinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1147,7 +1145,7 @@ export const UnpinCodesProposal = { return obj; }, - fromPartial, I>>(object: I): UnpinCodesProposal { + fromPartial(object: DeepPartial): UnpinCodesProposal { const message = createBaseUnpinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1221,7 +1219,7 @@ export const AccessConfigUpdate = { return obj; }, - fromPartial, I>>(object: I): AccessConfigUpdate { + fromPartial(object: DeepPartial): AccessConfigUpdate { const message = createBaseAccessConfigUpdate(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1314,9 +1312,7 @@ export const UpdateInstantiateConfigProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): UpdateInstantiateConfigProposal { + fromPartial(object: DeepPartial): UpdateInstantiateConfigProposal { const message = createBaseUpdateInstantiateConfigProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 8191a507..f5122ab0 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -239,9 +239,7 @@ export const QueryContractInfoRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractInfoRequest { + fromPartial(object: DeepPartial): QueryContractInfoRequest { const message = createBaseQueryContractInfoRequest(); message.address = object.address ?? ""; return message; @@ -309,9 +307,7 @@ export const QueryContractInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractInfoResponse { + fromPartial(object: DeepPartial): QueryContractInfoResponse { const message = createBaseQueryContractInfoResponse(); message.address = object.address ?? ""; message.contractInfo = @@ -383,9 +379,7 @@ export const QueryContractHistoryRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractHistoryRequest { + fromPartial(object: DeepPartial): QueryContractHistoryRequest { const message = createBaseQueryContractHistoryRequest(); message.address = object.address ?? ""; message.pagination = @@ -465,9 +459,7 @@ export const QueryContractHistoryResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractHistoryResponse { + fromPartial(object: DeepPartial): QueryContractHistoryResponse { const message = createBaseQueryContractHistoryResponse(); message.entries = object.entries?.map((e) => ContractCodeHistoryEntry.fromPartial(e)) || []; message.pagination = @@ -539,9 +531,7 @@ export const QueryContractsByCodeRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractsByCodeRequest { + fromPartial(object: DeepPartial): QueryContractsByCodeRequest { const message = createBaseQueryContractsByCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -620,9 +610,7 @@ export const QueryContractsByCodeResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractsByCodeResponse { + fromPartial(object: DeepPartial): QueryContractsByCodeResponse { const message = createBaseQueryContractsByCodeResponse(); message.contracts = object.contracts?.map((e) => e) || []; message.pagination = @@ -694,9 +682,7 @@ export const QueryAllContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllContractStateRequest { + fromPartial(object: DeepPartial): QueryAllContractStateRequest { const message = createBaseQueryAllContractStateRequest(); message.address = object.address ?? ""; message.pagination = @@ -774,9 +760,7 @@ export const QueryAllContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllContractStateResponse { + fromPartial(object: DeepPartial): QueryAllContractStateResponse { const message = createBaseQueryAllContractStateResponse(); message.models = object.models?.map((e) => Model.fromPartial(e)) || []; message.pagination = @@ -850,9 +834,7 @@ export const QueryRawContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRawContractStateRequest { + fromPartial(object: DeepPartial): QueryRawContractStateRequest { const message = createBaseQueryRawContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -910,9 +892,7 @@ export const QueryRawContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRawContractStateResponse { + fromPartial(object: DeepPartial): QueryRawContractStateResponse { const message = createBaseQueryRawContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -982,9 +962,7 @@ export const QuerySmartContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySmartContractStateRequest { + fromPartial(object: DeepPartial): QuerySmartContractStateRequest { const message = createBaseQuerySmartContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -1042,9 +1020,7 @@ export const QuerySmartContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySmartContractStateResponse { + fromPartial(object: DeepPartial): QuerySmartContractStateResponse { const message = createBaseQuerySmartContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -1100,7 +1076,7 @@ export const QueryCodeRequest = { return obj; }, - fromPartial, I>>(object: I): QueryCodeRequest { + fromPartial(object: DeepPartial): QueryCodeRequest { const message = createBaseQueryCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1196,7 +1172,7 @@ export const CodeInfoResponse = { return obj; }, - fromPartial, I>>(object: I): CodeInfoResponse { + fromPartial(object: DeepPartial): CodeInfoResponse { const message = createBaseCodeInfoResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1272,7 +1248,7 @@ export const QueryCodeResponse = { return obj; }, - fromPartial, I>>(object: I): QueryCodeResponse { + fromPartial(object: DeepPartial): QueryCodeResponse { const message = createBaseQueryCodeResponse(); message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null @@ -1333,7 +1309,7 @@ export const QueryCodesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryCodesRequest { + fromPartial(object: DeepPartial): QueryCodesRequest { const message = createBaseQueryCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1412,7 +1388,7 @@ export const QueryCodesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryCodesResponse { + fromPartial(object: DeepPartial): QueryCodesResponse { const message = createBaseQueryCodesResponse(); message.codeInfos = object.codeInfos?.map((e) => CodeInfoResponse.fromPartial(e)) || []; message.pagination = @@ -1473,7 +1449,7 @@ export const QueryPinnedCodesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryPinnedCodesRequest { + fromPartial(object: DeepPartial): QueryPinnedCodesRequest { const message = createBaseQueryPinnedCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1563,9 +1539,7 @@ export const QueryPinnedCodesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPinnedCodesResponse { + fromPartial(object: DeepPartial): QueryPinnedCodesResponse { const message = createBaseQueryPinnedCodesResponse(); message.codeIds = object.codeIds?.map((e) => Long.fromValue(e)) || []; message.pagination = diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index b435c1bd..b974a4fb 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,7 @@ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgStoreCode submit Wasm code to the system */ @@ -211,7 +211,7 @@ export const MsgStoreCode = { return obj; }, - fromPartial, I>>(object: I): MsgStoreCode { + fromPartial(object: DeepPartial): MsgStoreCode { const message = createBaseMsgStoreCode(); message.sender = object.sender ?? ""; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); @@ -272,7 +272,7 @@ export const MsgStoreCodeResponse = { return obj; }, - fromPartial, I>>(object: I): MsgStoreCodeResponse { + fromPartial(object: DeepPartial): MsgStoreCodeResponse { const message = createBaseMsgStoreCodeResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -391,7 +391,7 @@ export const MsgInstantiateContract = { return obj; }, - fromPartial, I>>(object: I): MsgInstantiateContract { + fromPartial(object: DeepPartial): MsgInstantiateContract { const message = createBaseMsgInstantiateContract(); message.sender = object.sender ?? ""; message.admin = object.admin ?? ""; @@ -465,9 +465,7 @@ export const MsgInstantiateContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgInstantiateContractResponse { + fromPartial(object: DeepPartial): MsgInstantiateContractResponse { const message = createBaseMsgInstantiateContractResponse(); message.address = object.address ?? ""; message.data = object.data ?? new Uint8Array(); @@ -564,7 +562,7 @@ export const MsgExecuteContract = { return obj; }, - fromPartial, I>>(object: I): MsgExecuteContract { + fromPartial(object: DeepPartial): MsgExecuteContract { const message = createBaseMsgExecuteContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -624,9 +622,7 @@ export const MsgExecuteContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgExecuteContractResponse { + fromPartial(object: DeepPartial): MsgExecuteContractResponse { const message = createBaseMsgExecuteContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -716,7 +712,7 @@ export const MsgMigrateContract = { return obj; }, - fromPartial, I>>(object: I): MsgMigrateContract { + fromPartial(object: DeepPartial): MsgMigrateContract { const message = createBaseMsgMigrateContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -777,9 +773,7 @@ export const MsgMigrateContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgMigrateContractResponse { + fromPartial(object: DeepPartial): MsgMigrateContractResponse { const message = createBaseMsgMigrateContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -857,7 +851,7 @@ export const MsgUpdateAdmin = { return obj; }, - fromPartial, I>>(object: I): MsgUpdateAdmin { + fromPartial(object: DeepPartial): MsgUpdateAdmin { const message = createBaseMsgUpdateAdmin(); message.sender = object.sender ?? ""; message.newAdmin = object.newAdmin ?? ""; @@ -902,7 +896,7 @@ export const MsgUpdateAdminResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpdateAdminResponse { + fromPartial(_: DeepPartial): MsgUpdateAdminResponse { const message = createBaseMsgUpdateAdminResponse(); return message; }, @@ -968,7 +962,7 @@ export const MsgClearAdmin = { return obj; }, - fromPartial, I>>(object: I): MsgClearAdmin { + fromPartial(object: DeepPartial): MsgClearAdmin { const message = createBaseMsgClearAdmin(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -1012,7 +1006,7 @@ export const MsgClearAdminResponse = { return obj; }, - fromPartial, I>>(_: I): MsgClearAdminResponse { + fromPartial(_: DeepPartial): MsgClearAdminResponse { const message = createBaseMsgClearAdminResponse(); return message; }, diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 072dd772..0c5a7175 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** AccessType permission types */ @@ -266,7 +266,7 @@ export const AccessTypeParam = { return obj; }, - fromPartial, I>>(object: I): AccessTypeParam { + fromPartial(object: DeepPartial): AccessTypeParam { const message = createBaseAccessTypeParam(); message.value = object.value ?? 0; return message; @@ -333,7 +333,7 @@ export const AccessConfig = { return obj; }, - fromPartial, I>>(object: I): AccessConfig { + fromPartial(object: DeepPartial): AccessConfig { const message = createBaseAccessConfig(); message.permission = object.permission ?? 0; message.address = object.address ?? ""; @@ -409,7 +409,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.codeUploadAccess = object.codeUploadAccess !== undefined && object.codeUploadAccess !== null @@ -497,7 +497,7 @@ export const CodeInfo = { return obj; }, - fromPartial, I>>(object: I): CodeInfo { + fromPartial(object: DeepPartial): CodeInfo { const message = createBaseCodeInfo(); message.codeHash = object.codeHash ?? new Uint8Array(); message.creator = object.creator ?? ""; @@ -626,7 +626,7 @@ export const ContractInfo = { return obj; }, - fromPartial, I>>(object: I): ContractInfo { + fromPartial(object: DeepPartial): ContractInfo { const message = createBaseContractInfo(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -731,9 +731,7 @@ export const ContractCodeHistoryEntry = { return obj; }, - fromPartial, I>>( - object: I, - ): ContractCodeHistoryEntry { + fromPartial(object: DeepPartial): ContractCodeHistoryEntry { const message = createBaseContractCodeHistoryEntry(); message.operation = object.operation ?? 0; message.codeId = @@ -807,7 +805,7 @@ export const AbsoluteTxPosition = { return obj; }, - fromPartial, I>>(object: I): AbsoluteTxPosition { + fromPartial(object: DeepPartial): AbsoluteTxPosition { const message = createBaseAbsoluteTxPosition(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -881,7 +879,7 @@ export const Model = { return obj; }, - fromPartial, I>>(object: I): Model { + fromPartial(object: DeepPartial): Model { const message = createBaseModel(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/google/api/http.ts b/src/google/api/http.ts index 20526a16..b8003c85 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../helpers"; +import { isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "google.api"; /** * Defines the HTTP configuration for an API service. It contains a list of @@ -379,7 +379,7 @@ export const Http = { return obj; }, - fromPartial, I>>(object: I): Http { + fromPartial(object: DeepPartial): Http { const message = createBaseHttp(); message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || []; message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; @@ -544,7 +544,7 @@ export const HttpRule = { return obj; }, - fromPartial, I>>(object: I): HttpRule { + fromPartial(object: DeepPartial): HttpRule { const message = createBaseHttpRule(); message.selector = object.selector ?? ""; message.get = object.get ?? undefined; @@ -623,7 +623,7 @@ export const CustomHttpPattern = { return obj; }, - fromPartial, I>>(object: I): CustomHttpPattern { + fromPartial(object: DeepPartial): CustomHttpPattern { const message = createBaseCustomHttpPattern(); message.kind = object.kind ?? ""; message.path = object.path ?? ""; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index 8b573384..d2e50811 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * `Any` contains an arbitrary serialized protocol buffer message along with a @@ -182,7 +182,7 @@ export const Any = { return obj; }, - fromPartial, I>>(object: I): Any { + fromPartial(object: DeepPartial): Any { const message = createBaseAny(); message.typeUrl = object.typeUrl ?? ""; message.value = object.value ?? new Uint8Array(); diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 17748a65..44886a0c 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { DeepPartial, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "google.protobuf"; export enum FieldDescriptorProto_Type { /** @@ -1256,7 +1256,7 @@ export const FileDescriptorSet = { return obj; }, - fromPartial, I>>(object: I): FileDescriptorSet { + fromPartial(object: DeepPartial): FileDescriptorSet { const message = createBaseFileDescriptorSet(); message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; return message; @@ -1512,7 +1512,7 @@ export const FileDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): FileDescriptorProto { + fromPartial(object: DeepPartial): FileDescriptorProto { const message = createBaseFileDescriptorProto(); message.name = object.name ?? ""; message.package = object.package ?? ""; @@ -1745,7 +1745,7 @@ export const DescriptorProto = { return obj; }, - fromPartial, I>>(object: I): DescriptorProto { + fromPartial(object: DeepPartial): DescriptorProto { const message = createBaseDescriptorProto(); message.name = object.name ?? ""; message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; @@ -1838,9 +1838,7 @@ export const DescriptorProto_ExtensionRange = { return obj; }, - fromPartial, I>>( - object: I, - ): DescriptorProto_ExtensionRange { + fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { const message = createBaseDescriptorProto_ExtensionRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -1912,9 +1910,7 @@ export const DescriptorProto_ReservedRange = { return obj; }, - fromPartial, I>>( - object: I, - ): DescriptorProto_ReservedRange { + fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { const message = createBaseDescriptorProto_ReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -1981,7 +1977,7 @@ export const ExtensionRangeOptions = { return obj; }, - fromPartial, I>>(object: I): ExtensionRangeOptions { + fromPartial(object: DeepPartial): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; @@ -2138,7 +2134,7 @@ export const FieldDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): FieldDescriptorProto { + fromPartial(object: DeepPartial): FieldDescriptorProto { const message = createBaseFieldDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; @@ -2218,7 +2214,7 @@ export const OneofDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): OneofDescriptorProto { + fromPartial(object: DeepPartial): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); message.name = object.name ?? ""; message.options = @@ -2346,7 +2342,7 @@ export const EnumDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): EnumDescriptorProto { + fromPartial(object: DeepPartial): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); message.name = object.name ?? ""; message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; @@ -2424,8 +2420,8 @@ export const EnumDescriptorProto_EnumReservedRange = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): EnumDescriptorProto_EnumReservedRange { const message = createBaseEnumDescriptorProto_EnumReservedRange(); message.start = object.start ?? 0; @@ -2506,9 +2502,7 @@ export const EnumValueDescriptorProto = { return obj; }, - fromPartial, I>>( - object: I, - ): EnumValueDescriptorProto { + fromPartial(object: DeepPartial): EnumValueDescriptorProto { const message = createBaseEnumValueDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; @@ -2600,7 +2594,7 @@ export const ServiceDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): ServiceDescriptorProto { + fromPartial(object: DeepPartial): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); message.name = object.name ?? ""; message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; @@ -2717,7 +2711,7 @@ export const MethodDescriptorProto = { return obj; }, - fromPartial, I>>(object: I): MethodDescriptorProto { + fromPartial(object: DeepPartial): MethodDescriptorProto { const message = createBaseMethodDescriptorProto(); message.name = object.name ?? ""; message.inputType = object.inputType ?? ""; @@ -3015,7 +3009,7 @@ export const FileOptions = { return obj; }, - fromPartial, I>>(object: I): FileOptions { + fromPartial(object: DeepPartial): FileOptions { const message = createBaseFileOptions(); message.javaPackage = object.javaPackage ?? ""; message.javaOuterClassname = object.javaOuterClassname ?? ""; @@ -3149,7 +3143,7 @@ export const MessageOptions = { return obj; }, - fromPartial, I>>(object: I): MessageOptions { + fromPartial(object: DeepPartial): MessageOptions { const message = createBaseMessageOptions(); message.messageSetWireFormat = object.messageSetWireFormat ?? false; message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; @@ -3286,7 +3280,7 @@ export const FieldOptions = { return obj; }, - fromPartial, I>>(object: I): FieldOptions { + fromPartial(object: DeepPartial): FieldOptions { const message = createBaseFieldOptions(); message.ctype = object.ctype ?? 0; message.packed = object.packed ?? false; @@ -3359,7 +3353,7 @@ export const OneofOptions = { return obj; }, - fromPartial, I>>(object: I): OneofOptions { + fromPartial(object: DeepPartial): OneofOptions { const message = createBaseOneofOptions(); message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; @@ -3448,7 +3442,7 @@ export const EnumOptions = { return obj; }, - fromPartial, I>>(object: I): EnumOptions { + fromPartial(object: DeepPartial): EnumOptions { const message = createBaseEnumOptions(); message.allowAlias = object.allowAlias ?? false; message.deprecated = object.deprecated ?? false; @@ -3528,7 +3522,7 @@ export const EnumValueOptions = { return obj; }, - fromPartial, I>>(object: I): EnumValueOptions { + fromPartial(object: DeepPartial): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; message.uninterpretedOption = @@ -3607,7 +3601,7 @@ export const ServiceOptions = { return obj; }, - fromPartial, I>>(object: I): ServiceOptions { + fromPartial(object: DeepPartial): ServiceOptions { const message = createBaseServiceOptions(); message.deprecated = object.deprecated ?? false; message.uninterpretedOption = @@ -3700,7 +3694,7 @@ export const MethodOptions = { return obj; }, - fromPartial, I>>(object: I): MethodOptions { + fromPartial(object: DeepPartial): MethodOptions { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; message.idempotencyLevel = object.idempotencyLevel ?? 0; @@ -3838,7 +3832,7 @@ export const UninterpretedOption = { return obj; }, - fromPartial, I>>(object: I): UninterpretedOption { + fromPartial(object: DeepPartial): UninterpretedOption { const message = createBaseUninterpretedOption(); message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; message.identifierValue = object.identifierValue ?? ""; @@ -3917,9 +3911,7 @@ export const UninterpretedOption_NamePart = { return obj; }, - fromPartial, I>>( - object: I, - ): UninterpretedOption_NamePart { + fromPartial(object: DeepPartial): UninterpretedOption_NamePart { const message = createBaseUninterpretedOption_NamePart(); message.namePart = object.namePart ?? ""; message.isExtension = object.isExtension ?? false; @@ -3984,7 +3976,7 @@ export const SourceCodeInfo = { return obj; }, - fromPartial, I>>(object: I): SourceCodeInfo { + fromPartial(object: DeepPartial): SourceCodeInfo { const message = createBaseSourceCodeInfo(); message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; return message; @@ -4128,7 +4120,7 @@ export const SourceCodeInfo_Location = { return obj; }, - fromPartial, I>>(object: I): SourceCodeInfo_Location { + fromPartial(object: DeepPartial): SourceCodeInfo_Location { const message = createBaseSourceCodeInfo_Location(); message.path = object.path?.map((e) => e) || []; message.span = object.span?.map((e) => e) || []; @@ -4198,7 +4190,7 @@ export const GeneratedCodeInfo = { return obj; }, - fromPartial, I>>(object: I): GeneratedCodeInfo { + fromPartial(object: DeepPartial): GeneratedCodeInfo { const message = createBaseGeneratedCodeInfo(); message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; return message; @@ -4306,9 +4298,7 @@ export const GeneratedCodeInfo_Annotation = { return obj; }, - fromPartial, I>>( - object: I, - ): GeneratedCodeInfo_Annotation { + fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); message.path = object.path?.map((e) => e) || []; message.sourceFile = object.sourceFile ?? ""; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 75c515ee..1e254ecc 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * A Duration represents a signed, fixed-length span of time represented @@ -143,7 +143,7 @@ export const Duration = { return obj; }, - fromPartial, I>>(object: I): Duration { + fromPartial(object: DeepPartial): Duration { const message = createBaseDuration(); message.seconds = object.seconds !== undefined && object.seconds !== null ? Long.fromValue(object.seconds) : Long.ZERO; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index d37b1148..c7154be3 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * A Timestamp represents a point in time independent of any time zone or local @@ -165,7 +165,7 @@ export const Timestamp = { return obj; }, - fromPartial, I>>(object: I): Timestamp { + fromPartial(object: DeepPartial): Timestamp { const message = createBaseTimestamp(); message.seconds = object.seconds !== undefined && object.seconds !== null ? Long.fromValue(object.seconds) : Long.ZERO; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts index 405bc8fc..4c7ad40c 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../../helpers"; +import { isSet, DeepPartial } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -62,7 +62,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.controllerEnabled = object.controllerEnabled ?? false; return message; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/ibc/applications/interchain_accounts/controller/v1/query.ts index 83a87986..e6a21212 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./controller"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; +import { DeepPartial, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +50,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +105,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/host/v1/host.ts b/src/ibc/applications/interchain_accounts/host/v1/host.ts index 4c663c20..3904efbb 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../../helpers"; +import { isSet, DeepPartial } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -84,7 +84,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.hostEnabled = object.hostEnabled ?? false; message.allowMessages = object.allowMessages?.map((e) => e) || []; diff --git a/src/ibc/applications/interchain_accounts/host/v1/query.ts b/src/ibc/applications/interchain_accounts/host/v1/query.ts index 9b2090e7..4a91e8ed 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./host"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; +import { DeepPartial, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +50,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +105,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/v1/account.ts b/src/ibc/applications/interchain_accounts/v1/account.ts index 2d07c82d..d030ee8a 100644 --- a/src/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/ibc/applications/interchain_accounts/v1/account.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { BaseAccount } from "../../../../cosmos/auth/v1beta1/auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ @@ -72,7 +72,7 @@ export const InterchainAccount = { return obj; }, - fromPartial, I>>(object: I): InterchainAccount { + fromPartial(object: DeepPartial): InterchainAccount { const message = createBaseInterchainAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null diff --git a/src/ibc/applications/interchain_accounts/v1/genesis.ts b/src/ibc/applications/interchain_accounts/v1/genesis.ts index 94cc057b..0db4951c 100644 --- a/src/ibc/applications/interchain_accounts/v1/genesis.ts +++ b/src/ibc/applications/interchain_accounts/v1/genesis.ts @@ -3,7 +3,7 @@ import { Params as Params1 } from "../controller/v1/controller"; import { Params as Params2 } from "../host/v1/host"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** GenesisState defines the interchain accounts genesis state */ @@ -112,7 +112,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.controllerGenesisState = object.controllerGenesisState !== undefined && object.controllerGenesisState !== null @@ -231,7 +231,7 @@ export const ControllerGenesisState = { return obj; }, - fromPartial, I>>(object: I): ControllerGenesisState { + fromPartial(object: DeepPartial): ControllerGenesisState { const message = createBaseControllerGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -343,7 +343,7 @@ export const HostGenesisState = { return obj; }, - fromPartial, I>>(object: I): HostGenesisState { + fromPartial(object: DeepPartial): HostGenesisState { const message = createBaseHostGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -426,7 +426,7 @@ export const ActiveChannel = { return obj; }, - fromPartial, I>>(object: I): ActiveChannel { + fromPartial(object: DeepPartial): ActiveChannel { const message = createBaseActiveChannel(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; @@ -506,9 +506,7 @@ export const RegisteredInterchainAccount = { return obj; }, - fromPartial, I>>( - object: I, - ): RegisteredInterchainAccount { + fromPartial(object: DeepPartial): RegisteredInterchainAccount { const message = createBaseRegisteredInterchainAccount(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/metadata.ts b/src/ibc/applications/interchain_accounts/v1/metadata.ts index 214c6920..31473042 100644 --- a/src/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring @@ -138,7 +138,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: DeepPartial): Metadata { const message = createBaseMetadata(); message.version = object.version ?? ""; message.controllerConnectionId = object.controllerConnectionId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/packet.ts b/src/ibc/applications/interchain_accounts/v1/packet.ts index c73057f5..eb8a5d11 100644 --- a/src/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/ibc/applications/interchain_accounts/v1/packet.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Type defines a classification of message issued from a controller chain to its associated interchain accounts @@ -131,9 +131,7 @@ export const InterchainAccountPacketData = { return obj; }, - fromPartial, I>>( - object: I, - ): InterchainAccountPacketData { + fromPartial(object: DeepPartial): InterchainAccountPacketData { const message = createBaseInterchainAccountPacketData(); message.type = object.type ?? 0; message.data = object.data ?? new Uint8Array(); @@ -197,7 +195,7 @@ export const CosmosTx = { return obj; }, - fromPartial, I>>(object: I): CosmosTx { + fromPartial(object: DeepPartial): CosmosTx { const message = createBaseCosmosTx(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index 9e0d172b..bc38f75e 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** GenesisState defines the ibc-transfer genesis state */ @@ -91,7 +91,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.portId = object.portId ?? ""; message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index d2ffc03a..23620342 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC @@ -121,7 +121,7 @@ export const QueryDenomTraceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTraceRequest { + fromPartial(object: DeepPartial): QueryDenomTraceRequest { const message = createBaseQueryDenomTraceRequest(); message.hash = object.hash ?? ""; return message; @@ -178,7 +178,7 @@ export const QueryDenomTraceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTraceResponse { + fromPartial(object: DeepPartial): QueryDenomTraceResponse { const message = createBaseQueryDenomTraceResponse(); message.denomTrace = object.denomTrace !== undefined && object.denomTrace !== null @@ -238,7 +238,7 @@ export const QueryDenomTracesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTracesRequest { + fromPartial(object: DeepPartial): QueryDenomTracesRequest { const message = createBaseQueryDenomTracesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -317,9 +317,7 @@ export const QueryDenomTracesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomTracesResponse { + fromPartial(object: DeepPartial): QueryDenomTracesResponse { const message = createBaseQueryDenomTracesResponse(); message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; message.pagination = @@ -366,7 +364,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: DeepPartial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -421,7 +419,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: DeepPartial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -478,7 +476,7 @@ export const QueryDenomHashRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomHashRequest { + fromPartial(object: DeepPartial): QueryDenomHashRequest { const message = createBaseQueryDenomHashRequest(); message.trace = object.trace ?? ""; return message; @@ -534,7 +532,7 @@ export const QueryDenomHashResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDenomHashResponse { + fromPartial(object: DeepPartial): QueryDenomHashResponse { const message = createBaseQueryDenomHashResponse(); message.hash = object.hash ?? ""; return message; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index a199ac13..73c1cb0b 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * DenomTrace contains the base denomination for ICS20 fungible tokens and the @@ -99,7 +99,7 @@ export const DenomTrace = { return obj; }, - fromPartial, I>>(object: I): DenomTrace { + fromPartial(object: DeepPartial): DenomTrace { const message = createBaseDenomTrace(); message.path = object.path ?? ""; message.baseDenom = object.baseDenom ?? ""; @@ -167,7 +167,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled ?? false; message.receiveEnabled = object.receiveEnabled ?? false; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index f361fba8..fdf314df 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,7 @@ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between @@ -160,7 +160,7 @@ export const MsgTransfer = { return obj; }, - fromPartial, I>>(object: I): MsgTransfer { + fromPartial(object: DeepPartial): MsgTransfer { const message = createBaseMsgTransfer(); message.sourcePort = object.sourcePort ?? ""; message.sourceChannel = object.sourceChannel ?? ""; @@ -216,7 +216,7 @@ export const MsgTransferResponse = { return obj; }, - fromPartial, I>>(_: I): MsgTransferResponse { + fromPartial(_: DeepPartial): MsgTransferResponse { const message = createBaseMsgTransferResponse(); return message; }, diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index ab7b519e..e7cbf4b3 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v2"; /** * FungibleTokenPacketData defines a struct for the packet payload @@ -105,7 +105,7 @@ export const FungibleTokenPacketData = { return obj; }, - fromPartial, I>>(object: I): FungibleTokenPacketData { + fromPartial(object: DeepPartial): FungibleTokenPacketData { const message = createBaseFungibleTokenPacketData(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index efe66cdc..f61a5daf 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** * State defines if a channel is in one of the following states: @@ -366,7 +366,7 @@ export const Channel = { return obj; }, - fromPartial, I>>(object: I): Channel { + fromPartial(object: DeepPartial): Channel { const message = createBaseChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -504,7 +504,7 @@ export const IdentifiedChannel = { return obj; }, - fromPartial, I>>(object: I): IdentifiedChannel { + fromPartial(object: DeepPartial): IdentifiedChannel { const message = createBaseIdentifiedChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -580,7 +580,7 @@ export const Counterparty = { return obj; }, - fromPartial, I>>(object: I): Counterparty { + fromPartial(object: DeepPartial): Counterparty { const message = createBaseCounterparty(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -717,7 +717,7 @@ export const Packet = { return obj; }, - fromPartial, I>>(object: I): Packet { + fromPartial(object: DeepPartial): Packet { const message = createBasePacket(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -823,7 +823,7 @@ export const PacketState = { return obj; }, - fromPartial, I>>(object: I): PacketState { + fromPartial(object: DeepPartial): PacketState { const message = createBasePacketState(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -897,7 +897,7 @@ export const Acknowledgement = { return obj; }, - fromPartial, I>>(object: I): Acknowledgement { + fromPartial(object: DeepPartial): Acknowledgement { const message = createBaseAcknowledgement(); message.result = object.result ?? undefined; message.error = object.error ?? undefined; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 5e98b394..ad8b12c1 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** GenesisState defines the ibc channel submodule's genesis state. */ @@ -208,7 +208,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; @@ -296,7 +296,7 @@ export const PacketSequence = { return obj; }, - fromPartial, I>>(object: I): PacketSequence { + fromPartial(object: DeepPartial): PacketSequence { const message = createBasePacketSequence(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 0e40c1e7..7afa45c1 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -5,7 +5,7 @@ import { Channel, IdentifiedChannel, PacketState } from "./channel"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** QueryChannelRequest is the request type for the Query/Channel RPC method */ @@ -436,7 +436,7 @@ export const QueryChannelRequest = { return obj; }, - fromPartial, I>>(object: I): QueryChannelRequest { + fromPartial(object: DeepPartial): QueryChannelRequest { const message = createBaseQueryChannelRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -518,7 +518,7 @@ export const QueryChannelResponse = { return obj; }, - fromPartial, I>>(object: I): QueryChannelResponse { + fromPartial(object: DeepPartial): QueryChannelResponse { const message = createBaseQueryChannelResponse(); message.channel = object.channel !== undefined && object.channel !== null @@ -583,7 +583,7 @@ export const QueryChannelsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryChannelsRequest { + fromPartial(object: DeepPartial): QueryChannelsRequest { const message = createBaseQueryChannelsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -673,7 +673,7 @@ export const QueryChannelsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryChannelsResponse { + fromPartial(object: DeepPartial): QueryChannelsResponse { const message = createBaseQueryChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -747,9 +747,7 @@ export const QueryConnectionChannelsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionChannelsRequest { + fromPartial(object: DeepPartial): QueryConnectionChannelsRequest { const message = createBaseQueryConnectionChannelsRequest(); message.connection = object.connection ?? ""; message.pagination = @@ -840,9 +838,7 @@ export const QueryConnectionChannelsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionChannelsResponse { + fromPartial(object: DeepPartial): QueryConnectionChannelsResponse { const message = createBaseQueryConnectionChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -915,9 +911,7 @@ export const QueryChannelClientStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelClientStateRequest { + fromPartial(object: DeepPartial): QueryChannelClientStateRequest { const message = createBaseQueryChannelClientStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1003,9 +997,7 @@ export const QueryChannelClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelClientStateResponse { + fromPartial(object: DeepPartial): QueryChannelClientStateResponse { const message = createBaseQueryChannelClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -1104,9 +1096,7 @@ export const QueryChannelConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelConsensusStateRequest { + fromPartial(object: DeepPartial): QueryChannelConsensusStateRequest { const message = createBaseQueryChannelConsensusStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1207,9 +1197,7 @@ export const QueryChannelConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelConsensusStateResponse { + fromPartial(object: DeepPartial): QueryChannelConsensusStateResponse { const message = createBaseQueryChannelConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -1296,9 +1284,7 @@ export const QueryPacketCommitmentRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentRequest { + fromPartial(object: DeepPartial): QueryPacketCommitmentRequest { const message = createBaseQueryPacketCommitmentRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1386,9 +1372,7 @@ export const QueryPacketCommitmentResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentResponse { + fromPartial(object: DeepPartial): QueryPacketCommitmentResponse { const message = createBaseQueryPacketCommitmentResponse(); message.commitment = object.commitment ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -1472,9 +1456,7 @@ export const QueryPacketCommitmentsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentsRequest { + fromPartial(object: DeepPartial): QueryPacketCommitmentsRequest { const message = createBaseQueryPacketCommitmentsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1566,9 +1548,7 @@ export const QueryPacketCommitmentsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentsResponse { + fromPartial(object: DeepPartial): QueryPacketCommitmentsResponse { const message = createBaseQueryPacketCommitmentsResponse(); message.commitments = object.commitments?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -1652,9 +1632,7 @@ export const QueryPacketReceiptRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketReceiptRequest { + fromPartial(object: DeepPartial): QueryPacketReceiptRequest { const message = createBaseQueryPacketReceiptRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1739,9 +1717,7 @@ export const QueryPacketReceiptResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketReceiptResponse { + fromPartial(object: DeepPartial): QueryPacketReceiptResponse { const message = createBaseQueryPacketReceiptResponse(); message.received = object.received ?? false; message.proof = object.proof ?? new Uint8Array(); @@ -1824,9 +1800,7 @@ export const QueryPacketAcknowledgementRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementRequest { + fromPartial(object: DeepPartial): QueryPacketAcknowledgementRequest { const message = createBaseQueryPacketAcknowledgementRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1916,9 +1890,7 @@ export const QueryPacketAcknowledgementResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementResponse { + fromPartial(object: DeepPartial): QueryPacketAcknowledgementResponse { const message = createBaseQueryPacketAcknowledgementResponse(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -2035,9 +2007,7 @@ export const QueryPacketAcknowledgementsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementsRequest { + fromPartial(object: DeepPartial): QueryPacketAcknowledgementsRequest { const message = createBaseQueryPacketAcknowledgementsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2130,9 +2100,7 @@ export const QueryPacketAcknowledgementsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementsResponse { + fromPartial(object: DeepPartial): QueryPacketAcknowledgementsResponse { const message = createBaseQueryPacketAcknowledgementsResponse(); message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -2238,9 +2206,7 @@ export const QueryUnreceivedPacketsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedPacketsRequest { + fromPartial(object: DeepPartial): QueryUnreceivedPacketsRequest { const message = createBaseQueryUnreceivedPacketsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2328,9 +2294,7 @@ export const QueryUnreceivedPacketsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedPacketsResponse { + fromPartial(object: DeepPartial): QueryUnreceivedPacketsResponse { const message = createBaseQueryUnreceivedPacketsResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2430,9 +2394,7 @@ export const QueryUnreceivedAcksRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedAcksRequest { + fromPartial(object: DeepPartial): QueryUnreceivedAcksRequest { const message = createBaseQueryUnreceivedAcksRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2520,9 +2482,7 @@ export const QueryUnreceivedAcksResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedAcksResponse { + fromPartial(object: DeepPartial): QueryUnreceivedAcksResponse { const message = createBaseQueryUnreceivedAcksResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2591,9 +2551,7 @@ export const QueryNextSequenceReceiveRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryNextSequenceReceiveRequest { + fromPartial(object: DeepPartial): QueryNextSequenceReceiveRequest { const message = createBaseQueryNextSequenceReceiveRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2677,9 +2635,7 @@ export const QueryNextSequenceReceiveResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryNextSequenceReceiveResponse { + fromPartial(object: DeepPartial): QueryNextSequenceReceiveResponse { const message = createBaseQueryNextSequenceReceiveResponse(); message.nextSequenceReceive = object.nextSequenceReceive !== undefined && object.nextSequenceReceive !== null diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index be8eba06..17290308 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,7 @@ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** ResponseResultType defines the possible outcomes of the execution of a message */ @@ -289,7 +289,7 @@ export const MsgChannelOpenInit = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenInit { + fromPartial(object: DeepPartial): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); message.portId = object.portId ?? ""; message.channel = @@ -350,9 +350,7 @@ export const MsgChannelOpenInitResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgChannelOpenInitResponse { + fromPartial(object: DeepPartial): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); message.channelId = object.channelId ?? ""; return message; @@ -479,7 +477,7 @@ export const MsgChannelOpenTry = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenTry { + fromPartial(object: DeepPartial): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); message.portId = object.portId ?? ""; message.previousChannelId = object.previousChannelId ?? ""; @@ -534,7 +532,7 @@ export const MsgChannelOpenTryResponse = { return obj; }, - fromPartial, I>>(_: I): MsgChannelOpenTryResponse { + fromPartial(_: DeepPartial): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); return message; }, @@ -658,7 +656,7 @@ export const MsgChannelOpenAck = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenAck { + fromPartial(object: DeepPartial): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -710,7 +708,7 @@ export const MsgChannelOpenAckResponse = { return obj; }, - fromPartial, I>>(_: I): MsgChannelOpenAckResponse { + fromPartial(_: DeepPartial): MsgChannelOpenAckResponse { const message = createBaseMsgChannelOpenAckResponse(); return message; }, @@ -811,7 +809,7 @@ export const MsgChannelOpenConfirm = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenConfirm { + fromPartial(object: DeepPartial): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -861,9 +859,7 @@ export const MsgChannelOpenConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelOpenConfirmResponse { + fromPartial(_: DeepPartial): MsgChannelOpenConfirmResponse { const message = createBaseMsgChannelOpenConfirmResponse(); return message; }, @@ -940,7 +936,7 @@ export const MsgChannelCloseInit = { return obj; }, - fromPartial, I>>(object: I): MsgChannelCloseInit { + fromPartial(object: DeepPartial): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -985,9 +981,7 @@ export const MsgChannelCloseInitResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelCloseInitResponse { + fromPartial(_: DeepPartial): MsgChannelCloseInitResponse { const message = createBaseMsgChannelCloseInitResponse(); return message; }, @@ -1090,7 +1084,7 @@ export const MsgChannelCloseConfirm = { return obj; }, - fromPartial, I>>(object: I): MsgChannelCloseConfirm { + fromPartial(object: DeepPartial): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1140,9 +1134,7 @@ export const MsgChannelCloseConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelCloseConfirmResponse { + fromPartial(_: DeepPartial): MsgChannelCloseConfirmResponse { const message = createBaseMsgChannelCloseConfirmResponse(); return message; }, @@ -1236,7 +1228,7 @@ export const MsgRecvPacket = { return obj; }, - fromPartial, I>>(object: I): MsgRecvPacket { + fromPartial(object: DeepPartial): MsgRecvPacket { const message = createBaseMsgRecvPacket(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1299,7 +1291,7 @@ export const MsgRecvPacketResponse = { return obj; }, - fromPartial, I>>(object: I): MsgRecvPacketResponse { + fromPartial(object: DeepPartial): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); message.result = object.result ?? 0; return message; @@ -1406,7 +1398,7 @@ export const MsgTimeout = { return obj; }, - fromPartial, I>>(object: I): MsgTimeout { + fromPartial(object: DeepPartial): MsgTimeout { const message = createBaseMsgTimeout(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1473,7 +1465,7 @@ export const MsgTimeoutResponse = { return obj; }, - fromPartial, I>>(object: I): MsgTimeoutResponse { + fromPartial(object: DeepPartial): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); message.result = object.result ?? 0; return message; @@ -1594,7 +1586,7 @@ export const MsgTimeoutOnClose = { return obj; }, - fromPartial, I>>(object: I): MsgTimeoutOnClose { + fromPartial(object: DeepPartial): MsgTimeoutOnClose { const message = createBaseMsgTimeoutOnClose(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1662,9 +1654,7 @@ export const MsgTimeoutOnCloseResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgTimeoutOnCloseResponse { + fromPartial(object: DeepPartial): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); message.result = object.result ?? 0; return message; @@ -1773,7 +1763,7 @@ export const MsgAcknowledgement = { return obj; }, - fromPartial, I>>(object: I): MsgAcknowledgement { + fromPartial(object: DeepPartial): MsgAcknowledgement { const message = createBaseMsgAcknowledgement(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1837,9 +1827,7 @@ export const MsgAcknowledgementResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgAcknowledgementResponse { + fromPartial(object: DeepPartial): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); message.result = object.result ?? 0; return message; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 14816a3a..7741f8fc 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -3,7 +3,7 @@ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../../helpers"; +import { isSet, DeepPartial, Long } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * IdentifiedClientState defines a client state with an additional client @@ -172,7 +172,7 @@ export const IdentifiedClientState = { return obj; }, - fromPartial, I>>(object: I): IdentifiedClientState { + fromPartial(object: DeepPartial): IdentifiedClientState { const message = createBaseIdentifiedClientState(); message.clientId = object.clientId ?? ""; message.clientState = @@ -244,9 +244,7 @@ export const ConsensusStateWithHeight = { return obj; }, - fromPartial, I>>( - object: I, - ): ConsensusStateWithHeight { + fromPartial(object: DeepPartial): ConsensusStateWithHeight { const message = createBaseConsensusStateWithHeight(); message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; @@ -328,7 +326,7 @@ export const ClientConsensusStates = { return obj; }, - fromPartial, I>>(object: I): ClientConsensusStates { + fromPartial(object: DeepPartial): ClientConsensusStates { const message = createBaseClientConsensusStates(); message.clientId = object.clientId ?? ""; message.consensusStates = @@ -419,7 +417,7 @@ export const ClientUpdateProposal = { return obj; }, - fromPartial, I>>(object: I): ClientUpdateProposal { + fromPartial(object: DeepPartial): ClientUpdateProposal { const message = createBaseClientUpdateProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -516,7 +514,7 @@ export const UpgradeProposal = { return obj; }, - fromPartial, I>>(object: I): UpgradeProposal { + fromPartial(object: DeepPartial): UpgradeProposal { const message = createBaseUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -592,7 +590,7 @@ export const Height = { return obj; }, - fromPartial, I>>(object: I): Height { + fromPartial(object: DeepPartial): Height { const message = createBaseHeight(); message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null @@ -663,7 +661,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.allowedClients = object.allowedClients?.map((e) => e) || []; return message; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index 353863b2..5d627d0b 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** GenesisState defines the ibc client submodule's genesis state. */ @@ -178,7 +178,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.clients = object.clients?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.clientsConsensus = @@ -258,7 +258,7 @@ export const GenesisMetadata = { return obj; }, - fromPartial, I>>(object: I): GenesisMetadata { + fromPartial(object: DeepPartial): GenesisMetadata { const message = createBaseGenesisMetadata(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -334,9 +334,7 @@ export const IdentifiedGenesisMetadata = { return obj; }, - fromPartial, I>>( - object: I, - ): IdentifiedGenesisMetadata { + fromPartial(object: DeepPartial): IdentifiedGenesisMetadata { const message = createBaseIdentifiedGenesisMetadata(); message.clientId = object.clientId ?? ""; message.clientMetadata = object.clientMetadata?.map((e) => GenesisMetadata.fromPartial(e)) || []; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index b22565c7..c4bf1f7f 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1 import { Any } from "../../../../google/protobuf/any"; import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * QueryClientStateRequest is the request type for the Query/ClientState RPC @@ -225,7 +225,7 @@ export const QueryClientStateRequest = { return obj; }, - fromPartial, I>>(object: I): QueryClientStateRequest { + fromPartial(object: DeepPartial): QueryClientStateRequest { const message = createBaseQueryClientStateRequest(); message.clientId = object.clientId ?? ""; return message; @@ -306,9 +306,7 @@ export const QueryClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStateResponse { + fromPartial(object: DeepPartial): QueryClientStateResponse { const message = createBaseQueryClientStateResponse(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -373,9 +371,7 @@ export const QueryClientStatesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatesRequest { + fromPartial(object: DeepPartial): QueryClientStatesRequest { const message = createBaseQueryClientStatesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -454,9 +450,7 @@ export const QueryClientStatesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatesResponse { + fromPartial(object: DeepPartial): QueryClientStatesResponse { const message = createBaseQueryClientStatesResponse(); message.clientStates = object.clientStates?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.pagination = @@ -551,9 +545,7 @@ export const QueryConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStateRequest { + fromPartial(object: DeepPartial): QueryConsensusStateRequest { const message = createBaseQueryConsensusStateRequest(); message.clientId = object.clientId ?? ""; message.revisionNumber = @@ -643,9 +635,7 @@ export const QueryConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStateResponse { + fromPartial(object: DeepPartial): QueryConsensusStateResponse { const message = createBaseQueryConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -721,9 +711,7 @@ export const QueryConsensusStatesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStatesRequest { + fromPartial(object: DeepPartial): QueryConsensusStatesRequest { const message = createBaseQueryConsensusStatesRequest(); message.clientId = object.clientId ?? ""; message.pagination = @@ -805,9 +793,7 @@ export const QueryConsensusStatesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStatesResponse { + fromPartial(object: DeepPartial): QueryConsensusStatesResponse { const message = createBaseQueryConsensusStatesResponse(); message.consensusStates = object.consensusStates?.map((e) => ConsensusStateWithHeight.fromPartial(e)) || []; @@ -868,9 +854,7 @@ export const QueryClientStatusRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatusRequest { + fromPartial(object: DeepPartial): QueryClientStatusRequest { const message = createBaseQueryClientStatusRequest(); message.clientId = object.clientId ?? ""; return message; @@ -926,9 +910,7 @@ export const QueryClientStatusResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatusResponse { + fromPartial(object: DeepPartial): QueryClientStatusResponse { const message = createBaseQueryClientStatusResponse(); message.status = object.status ?? ""; return message; @@ -971,7 +953,7 @@ export const QueryClientParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryClientParamsRequest { + fromPartial(_: DeepPartial): QueryClientParamsRequest { const message = createBaseQueryClientParamsRequest(); return message; }, @@ -1026,9 +1008,7 @@ export const QueryClientParamsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientParamsResponse { + fromPartial(object: DeepPartial): QueryClientParamsResponse { const message = createBaseQueryClientParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -1072,9 +1052,7 @@ export const QueryUpgradedClientStateRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryUpgradedClientStateRequest { + fromPartial(_: DeepPartial): QueryUpgradedClientStateRequest { const message = createBaseQueryUpgradedClientStateRequest(); return message; }, @@ -1134,9 +1112,7 @@ export const QueryUpgradedClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedClientStateResponse { + fromPartial(object: DeepPartial): QueryUpgradedClientStateResponse { const message = createBaseQueryUpgradedClientStateResponse(); message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null @@ -1182,9 +1158,7 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryUpgradedConsensusStateRequest { + fromPartial(_: DeepPartial): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); return message; }, @@ -1244,9 +1218,7 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateResponse { + fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index e3a3c53b..7fad7e0c 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** MsgCreateClient defines a message to create an IBC client */ @@ -165,7 +165,7 @@ export const MsgCreateClient = { return obj; }, - fromPartial, I>>(object: I): MsgCreateClient { + fromPartial(object: DeepPartial): MsgCreateClient { const message = createBaseMsgCreateClient(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -216,7 +216,7 @@ export const MsgCreateClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgCreateClientResponse { + fromPartial(_: DeepPartial): MsgCreateClientResponse { const message = createBaseMsgCreateClientResponse(); return message; }, @@ -293,7 +293,7 @@ export const MsgUpdateClient = { return obj; }, - fromPartial, I>>(object: I): MsgUpdateClient { + fromPartial(object: DeepPartial): MsgUpdateClient { const message = createBaseMsgUpdateClient(); message.clientId = object.clientId ?? ""; message.header = @@ -339,7 +339,7 @@ export const MsgUpdateClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpdateClientResponse { + fromPartial(_: DeepPartial): MsgUpdateClientResponse { const message = createBaseMsgUpdateClientResponse(); return message; }, @@ -463,7 +463,7 @@ export const MsgUpgradeClient = { return obj; }, - fromPartial, I>>(object: I): MsgUpgradeClient { + fromPartial(object: DeepPartial): MsgUpgradeClient { const message = createBaseMsgUpgradeClient(); message.clientId = object.clientId ?? ""; message.clientState = @@ -517,7 +517,7 @@ export const MsgUpgradeClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpgradeClientResponse { + fromPartial(_: DeepPartial): MsgUpgradeClientResponse { const message = createBaseMsgUpgradeClientResponse(); return message; }, @@ -595,7 +595,7 @@ export const MsgSubmitMisbehaviour = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitMisbehaviour { + fromPartial(object: DeepPartial): MsgSubmitMisbehaviour { const message = createBaseMsgSubmitMisbehaviour(); message.clientId = object.clientId ?? ""; message.misbehaviour = @@ -643,9 +643,7 @@ export const MsgSubmitMisbehaviourResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgSubmitMisbehaviourResponse { + fromPartial(_: DeepPartial): MsgSubmitMisbehaviourResponse { const message = createBaseMsgSubmitMisbehaviourResponse(); return message; }, diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index 8e10fb6d..b5d355c2 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.core.commitment.v1"; /** * MerkleRoot defines a merkle root hash. @@ -92,7 +92,7 @@ export const MerkleRoot = { return obj; }, - fromPartial, I>>(object: I): MerkleRoot { + fromPartial(object: DeepPartial): MerkleRoot { const message = createBaseMerkleRoot(); message.hash = object.hash ?? new Uint8Array(); return message; @@ -151,7 +151,7 @@ export const MerklePrefix = { return obj; }, - fromPartial, I>>(object: I): MerklePrefix { + fromPartial(object: DeepPartial): MerklePrefix { const message = createBaseMerklePrefix(); message.keyPrefix = object.keyPrefix ?? new Uint8Array(); return message; @@ -213,7 +213,7 @@ export const MerklePath = { return obj; }, - fromPartial, I>>(object: I): MerklePath { + fromPartial(object: DeepPartial): MerklePath { const message = createBaseMerklePath(); message.keyPath = object.keyPath?.map((e) => e) || []; return message; @@ -275,7 +275,7 @@ export const MerkleProof = { return obj; }, - fromPartial, I>>(object: I): MerkleProof { + fromPartial(object: DeepPartial): MerkleProof { const message = createBaseMerkleProof(); message.proofs = object.proofs?.map((e) => CommitmentProof.fromPartial(e)) || []; return message; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 6e0edfd1..c19ce43a 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * State defines if a connection is in one of the following states: @@ -282,7 +282,7 @@ export const ConnectionEnd = { return obj; }, - fromPartial, I>>(object: I): ConnectionEnd { + fromPartial(object: DeepPartial): ConnectionEnd { const message = createBaseConnectionEnd(); message.clientId = object.clientId ?? ""; message.versions = object.versions?.map((e) => Version.fromPartial(e)) || []; @@ -410,7 +410,7 @@ export const IdentifiedConnection = { return obj; }, - fromPartial, I>>(object: I): IdentifiedConnection { + fromPartial(object: DeepPartial): IdentifiedConnection { const message = createBaseIdentifiedConnection(); message.id = object.id ?? ""; message.clientId = object.clientId ?? ""; @@ -500,7 +500,7 @@ export const Counterparty = { return obj; }, - fromPartial, I>>(object: I): Counterparty { + fromPartial(object: DeepPartial): Counterparty { const message = createBaseCounterparty(); message.clientId = object.clientId ?? ""; message.connectionId = object.connectionId ?? ""; @@ -567,7 +567,7 @@ export const ClientPaths = { return obj; }, - fromPartial, I>>(object: I): ClientPaths { + fromPartial(object: DeepPartial): ClientPaths { const message = createBaseClientPaths(); message.paths = object.paths?.map((e) => e) || []; return message; @@ -640,7 +640,7 @@ export const ConnectionPaths = { return obj; }, - fromPartial, I>>(object: I): ConnectionPaths { + fromPartial(object: DeepPartial): ConnectionPaths { const message = createBaseConnectionPaths(); message.clientId = object.clientId ?? ""; message.paths = object.paths?.map((e) => e) || []; @@ -714,7 +714,7 @@ export const Version = { return obj; }, - fromPartial, I>>(object: I): Version { + fromPartial(object: DeepPartial): Version { const message = createBaseVersion(); message.identifier = object.identifier ?? ""; message.features = object.features?.map((e) => e) || []; @@ -774,7 +774,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: DeepPartial): Params { const message = createBaseParams(); message.maxExpectedTimePerBlock = object.maxExpectedTimePerBlock !== undefined && object.maxExpectedTimePerBlock !== null diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 5c212b03..3a349063 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** GenesisState defines the ibc connection submodule's genesis state. */ @@ -117,7 +117,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.clientConnectionPaths = diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 1ba4e699..f99406c3 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -5,7 +5,7 @@ import { ConnectionEnd, IdentifiedConnection } from "./connection"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * QueryConnectionRequest is the request type for the Query/Connection RPC @@ -182,7 +182,7 @@ export const QueryConnectionRequest = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionRequest { + fromPartial(object: DeepPartial): QueryConnectionRequest { const message = createBaseQueryConnectionRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -263,7 +263,7 @@ export const QueryConnectionResponse = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionResponse { + fromPartial(object: DeepPartial): QueryConnectionResponse { const message = createBaseQueryConnectionResponse(); message.connection = object.connection !== undefined && object.connection !== null @@ -328,7 +328,7 @@ export const QueryConnectionsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionsRequest { + fromPartial(object: DeepPartial): QueryConnectionsRequest { const message = createBaseQueryConnectionsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -418,9 +418,7 @@ export const QueryConnectionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionsResponse { + fromPartial(object: DeepPartial): QueryConnectionsResponse { const message = createBaseQueryConnectionsResponse(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.pagination = @@ -482,9 +480,7 @@ export const QueryClientConnectionsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientConnectionsRequest { + fromPartial(object: DeepPartial): QueryClientConnectionsRequest { const message = createBaseQueryClientConnectionsRequest(); message.clientId = object.clientId ?? ""; return message; @@ -572,9 +568,7 @@ export const QueryClientConnectionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientConnectionsResponse { + fromPartial(object: DeepPartial): QueryClientConnectionsResponse { const message = createBaseQueryClientConnectionsResponse(); message.connectionPaths = object.connectionPaths?.map((e) => e) || []; message.proof = object.proof ?? new Uint8Array(); @@ -635,9 +629,7 @@ export const QueryConnectionClientStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionClientStateRequest { + fromPartial(object: DeepPartial): QueryConnectionClientStateRequest { const message = createBaseQueryConnectionClientStateRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -722,9 +714,7 @@ export const QueryConnectionClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionClientStateResponse { + fromPartial(object: DeepPartial): QueryConnectionClientStateResponse { const message = createBaseQueryConnectionClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -815,8 +805,8 @@ export const QueryConnectionConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryConnectionConsensusStateRequest { const message = createBaseQueryConnectionConsensusStateRequest(); message.connectionId = object.connectionId ?? ""; @@ -920,8 +910,8 @@ export const QueryConnectionConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial, ): QueryConnectionConsensusStateResponse { const message = createBaseQueryConnectionConsensusStateResponse(); message.consensusState = diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index a89050ac..0fefcac1 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -4,7 +4,7 @@ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to @@ -204,7 +204,7 @@ export const MsgConnectionOpenInit = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenInit { + fromPartial(object: DeepPartial): MsgConnectionOpenInit { const message = createBaseMsgConnectionOpenInit(); message.clientId = object.clientId ?? ""; message.counterparty = @@ -260,9 +260,7 @@ export const MsgConnectionOpenInitResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenInitResponse { + fromPartial(_: DeepPartial): MsgConnectionOpenInitResponse { const message = createBaseMsgConnectionOpenInitResponse(); return message; }, @@ -461,7 +459,7 @@ export const MsgConnectionOpenTry = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenTry { + fromPartial(object: DeepPartial): MsgConnectionOpenTry { const message = createBaseMsgConnectionOpenTry(); message.clientId = object.clientId ?? ""; message.previousConnectionId = object.previousConnectionId ?? ""; @@ -530,9 +528,7 @@ export const MsgConnectionOpenTryResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenTryResponse { + fromPartial(_: DeepPartial): MsgConnectionOpenTryResponse { const message = createBaseMsgConnectionOpenTryResponse(); return message; }, @@ -702,7 +698,7 @@ export const MsgConnectionOpenAck = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenAck { + fromPartial(object: DeepPartial): MsgConnectionOpenAck { const message = createBaseMsgConnectionOpenAck(); message.connectionId = object.connectionId ?? ""; message.counterpartyConnectionId = object.counterpartyConnectionId ?? ""; @@ -766,9 +762,7 @@ export const MsgConnectionOpenAckResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenAckResponse { + fromPartial(_: DeepPartial): MsgConnectionOpenAckResponse { const message = createBaseMsgConnectionOpenAckResponse(); return message; }, @@ -858,9 +852,7 @@ export const MsgConnectionOpenConfirm = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgConnectionOpenConfirm { + fromPartial(object: DeepPartial): MsgConnectionOpenConfirm { const message = createBaseMsgConnectionOpenConfirm(); message.connectionId = object.connectionId ?? ""; message.proofAck = object.proofAck ?? new Uint8Array(); @@ -909,9 +901,7 @@ export const MsgConnectionOpenConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenConfirmResponse { + fromPartial(_: DeepPartial): MsgConnectionOpenConfirmResponse { const message = createBaseMsgConnectionOpenConfirmResponse(); return message; }, diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 270f1404..eaf61a44 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -4,7 +4,7 @@ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.core.types.v1"; /** GenesisState defines the ibc module's genesis state. */ @@ -101,7 +101,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index 8d3fc6c6..c9b16b65 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, DeepPartial } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.localhost.v1"; /** * ClientState defines a loopback (localhost) client. It requires (read-only) @@ -77,7 +77,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: DeepPartial): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.height = diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 70491bbc..d97f73a1 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -4,7 +4,7 @@ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; import { Channel } from "../../../core/channel/v1/channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.solomachine.v1"; /** * DataType defines the type of solo machine proof being created. This is done @@ -388,7 +388,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: DeepPartial): ClientState { const message = createBaseClientState(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -479,7 +479,7 @@ export const ConsensusState = { return obj; }, - fromPartial, I>>(object: I): ConsensusState { + fromPartial(object: DeepPartial): ConsensusState { const message = createBaseConsensusState(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -591,7 +591,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: DeepPartial
): Header { const message = createBaseHeader(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -695,7 +695,7 @@ export const Misbehaviour = { return obj; }, - fromPartial, I>>(object: I): Misbehaviour { + fromPartial(object: DeepPartial): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.sequence = @@ -800,7 +800,7 @@ export const SignatureAndData = { return obj; }, - fromPartial, I>>(object: I): SignatureAndData { + fromPartial(object: DeepPartial): SignatureAndData { const message = createBaseSignatureAndData(); message.signature = object.signature ?? new Uint8Array(); message.dataType = object.dataType ?? 0; @@ -876,9 +876,7 @@ export const TimestampedSignatureData = { return obj; }, - fromPartial, I>>( - object: I, - ): TimestampedSignatureData { + fromPartial(object: DeepPartial): TimestampedSignatureData { const message = createBaseTimestampedSignatureData(); message.signatureData = object.signatureData ?? new Uint8Array(); message.timestamp = @@ -983,7 +981,7 @@ export const SignBytes = { return obj; }, - fromPartial, I>>(object: I): SignBytes { + fromPartial(object: DeepPartial): SignBytes { const message = createBaseSignBytes(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -1061,7 +1059,7 @@ export const HeaderData = { return obj; }, - fromPartial, I>>(object: I): HeaderData { + fromPartial(object: DeepPartial): HeaderData { const message = createBaseHeaderData(); message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null @@ -1134,7 +1132,7 @@ export const ClientStateData = { return obj; }, - fromPartial, I>>(object: I): ClientStateData { + fromPartial(object: DeepPartial): ClientStateData { const message = createBaseClientStateData(); message.path = object.path ?? new Uint8Array(); message.clientState = @@ -1207,7 +1205,7 @@ export const ConsensusStateData = { return obj; }, - fromPartial, I>>(object: I): ConsensusStateData { + fromPartial(object: DeepPartial): ConsensusStateData { const message = createBaseConsensusStateData(); message.path = object.path ?? new Uint8Array(); message.consensusState = @@ -1280,7 +1278,7 @@ export const ConnectionStateData = { return obj; }, - fromPartial, I>>(object: I): ConnectionStateData { + fromPartial(object: DeepPartial): ConnectionStateData { const message = createBaseConnectionStateData(); message.path = object.path ?? new Uint8Array(); message.connection = @@ -1353,7 +1351,7 @@ export const ChannelStateData = { return obj; }, - fromPartial, I>>(object: I): ChannelStateData { + fromPartial(object: DeepPartial): ChannelStateData { const message = createBaseChannelStateData(); message.path = object.path ?? new Uint8Array(); message.channel = @@ -1428,7 +1426,7 @@ export const PacketCommitmentData = { return obj; }, - fromPartial, I>>(object: I): PacketCommitmentData { + fromPartial(object: DeepPartial): PacketCommitmentData { const message = createBasePacketCommitmentData(); message.path = object.path ?? new Uint8Array(); message.commitment = object.commitment ?? new Uint8Array(); @@ -1502,9 +1500,7 @@ export const PacketAcknowledgementData = { return obj; }, - fromPartial, I>>( - object: I, - ): PacketAcknowledgementData { + fromPartial(object: DeepPartial): PacketAcknowledgementData { const message = createBasePacketAcknowledgementData(); message.path = object.path ?? new Uint8Array(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); @@ -1562,9 +1558,7 @@ export const PacketReceiptAbsenceData = { return obj; }, - fromPartial, I>>( - object: I, - ): PacketReceiptAbsenceData { + fromPartial(object: DeepPartial): PacketReceiptAbsenceData { const message = createBasePacketReceiptAbsenceData(); message.path = object.path ?? new Uint8Array(); return message; @@ -1632,7 +1626,7 @@ export const NextSequenceRecvData = { return obj; }, - fromPartial, I>>(object: I): NextSequenceRecvData { + fromPartial(object: DeepPartial): NextSequenceRecvData { const message = createBaseNextSequenceRecvData(); message.path = object.path ?? new Uint8Array(); message.nextSeqRecv = diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 438cff86..9b6791a2 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -11,7 +11,6 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, - Exact, fromJsonTimestamp, bytesFromBase64, fromTimestamp, @@ -310,7 +309,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: DeepPartial): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.trustLevel = @@ -421,7 +420,7 @@ export const ConsensusState = { return obj; }, - fromPartial, I>>(object: I): ConsensusState { + fromPartial(object: DeepPartial): ConsensusState { const message = createBaseConsensusState(); message.timestamp = object.timestamp !== undefined && object.timestamp !== null @@ -507,7 +506,7 @@ export const Misbehaviour = { return obj; }, - fromPartial, I>>(object: I): Misbehaviour { + fromPartial(object: DeepPartial): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.header1 = @@ -612,7 +611,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: DeepPartial
): Header { const message = createBaseHeader(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -694,7 +693,7 @@ export const Fraction = { return obj; }, - fromPartial, I>>(object: I): Fraction { + fromPartial(object: DeepPartial): Fraction { const message = createBaseFraction(); message.numerator = object.numerator !== undefined && object.numerator !== null diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 4e98d301..cbe95b1d 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -9,7 +9,6 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, - Exact, Long, fromJsonTimestamp, bytesFromBase64, @@ -805,7 +804,7 @@ export const Request = { return obj; }, - fromPartial, I>>(object: I): Request { + fromPartial(object: DeepPartial): Request { const message = createBaseRequest(); message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; @@ -916,7 +915,7 @@ export const RequestEcho = { return obj; }, - fromPartial, I>>(object: I): RequestEcho { + fromPartial(object: DeepPartial): RequestEcho { const message = createBaseRequestEcho(); message.message = object.message ?? ""; return message; @@ -959,7 +958,7 @@ export const RequestFlush = { return obj; }, - fromPartial, I>>(_: I): RequestFlush { + fromPartial(_: DeepPartial): RequestFlush { const message = createBaseRequestFlush(); return message; }, @@ -1037,7 +1036,7 @@ export const RequestInfo = { return obj; }, - fromPartial, I>>(object: I): RequestInfo { + fromPartial(object: DeepPartial): RequestInfo { const message = createBaseRequestInfo(); message.version = object.version ?? ""; message.blockVersion = @@ -1112,7 +1111,7 @@ export const RequestSetOption = { return obj; }, - fromPartial, I>>(object: I): RequestSetOption { + fromPartial(object: DeepPartial): RequestSetOption { const message = createBaseRequestSetOption(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -1241,7 +1240,7 @@ export const RequestInitChain = { return obj; }, - fromPartial, I>>(object: I): RequestInitChain { + fromPartial(object: DeepPartial): RequestInitChain { const message = createBaseRequestInitChain(); message.time = object.time !== undefined && object.time !== null ? Timestamp.fromPartial(object.time) : undefined; @@ -1343,7 +1342,7 @@ export const RequestQuery = { return obj; }, - fromPartial, I>>(object: I): RequestQuery { + fromPartial(object: DeepPartial): RequestQuery { const message = createBaseRequestQuery(); message.data = object.data ?? new Uint8Array(); message.path = object.path ?? ""; @@ -1450,7 +1449,7 @@ export const RequestBeginBlock = { return obj; }, - fromPartial, I>>(object: I): RequestBeginBlock { + fromPartial(object: DeepPartial): RequestBeginBlock { const message = createBaseRequestBeginBlock(); message.hash = object.hash ?? new Uint8Array(); message.header = @@ -1525,7 +1524,7 @@ export const RequestCheckTx = { return obj; }, - fromPartial, I>>(object: I): RequestCheckTx { + fromPartial(object: DeepPartial): RequestCheckTx { const message = createBaseRequestCheckTx(); message.tx = object.tx ?? new Uint8Array(); message.type = object.type ?? 0; @@ -1583,7 +1582,7 @@ export const RequestDeliverTx = { return obj; }, - fromPartial, I>>(object: I): RequestDeliverTx { + fromPartial(object: DeepPartial): RequestDeliverTx { const message = createBaseRequestDeliverTx(); message.tx = object.tx ?? new Uint8Array(); return message; @@ -1639,7 +1638,7 @@ export const RequestEndBlock = { return obj; }, - fromPartial, I>>(object: I): RequestEndBlock { + fromPartial(object: DeepPartial): RequestEndBlock { const message = createBaseRequestEndBlock(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1683,7 +1682,7 @@ export const RequestCommit = { return obj; }, - fromPartial, I>>(_: I): RequestCommit { + fromPartial(_: DeepPartial): RequestCommit { const message = createBaseRequestCommit(); return message; }, @@ -1725,7 +1724,7 @@ export const RequestListSnapshots = { return obj; }, - fromPartial, I>>(_: I): RequestListSnapshots { + fromPartial(_: DeepPartial): RequestListSnapshots { const message = createBaseRequestListSnapshots(); return message; }, @@ -1793,7 +1792,7 @@ export const RequestOfferSnapshot = { return obj; }, - fromPartial, I>>(object: I): RequestOfferSnapshot { + fromPartial(object: DeepPartial): RequestOfferSnapshot { const message = createBaseRequestOfferSnapshot(); message.snapshot = object.snapshot !== undefined && object.snapshot !== null @@ -1875,9 +1874,7 @@ export const RequestLoadSnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): RequestLoadSnapshotChunk { + fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { const message = createBaseRequestLoadSnapshotChunk(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -1959,9 +1956,7 @@ export const RequestApplySnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): RequestApplySnapshotChunk { + fromPartial(object: DeepPartial): RequestApplySnapshotChunk { const message = createBaseRequestApplySnapshotChunk(); message.index = object.index ?? 0; message.chunk = object.chunk ?? new Uint8Array(); @@ -2214,7 +2209,7 @@ export const Response = { return obj; }, - fromPartial, I>>(object: I): Response { + fromPartial(object: DeepPartial): Response { const message = createBaseResponse(); message.exception = object.exception !== undefined && object.exception !== null @@ -2329,7 +2324,7 @@ export const ResponseException = { return obj; }, - fromPartial, I>>(object: I): ResponseException { + fromPartial(object: DeepPartial): ResponseException { const message = createBaseResponseException(); message.error = object.error ?? ""; return message; @@ -2385,7 +2380,7 @@ export const ResponseEcho = { return obj; }, - fromPartial, I>>(object: I): ResponseEcho { + fromPartial(object: DeepPartial): ResponseEcho { const message = createBaseResponseEcho(); message.message = object.message ?? ""; return message; @@ -2428,7 +2423,7 @@ export const ResponseFlush = { return obj; }, - fromPartial, I>>(_: I): ResponseFlush { + fromPartial(_: DeepPartial): ResponseFlush { const message = createBaseResponseFlush(); return message; }, @@ -2533,7 +2528,7 @@ export const ResponseInfo = { return obj; }, - fromPartial, I>>(object: I): ResponseInfo { + fromPartial(object: DeepPartial): ResponseInfo { const message = createBaseResponseInfo(); message.data = object.data ?? ""; message.version = object.version ?? ""; @@ -2621,7 +2616,7 @@ export const ResponseSetOption = { return obj; }, - fromPartial, I>>(object: I): ResponseSetOption { + fromPartial(object: DeepPartial): ResponseSetOption { const message = createBaseResponseSetOption(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2715,7 +2710,7 @@ export const ResponseInitChain = { return obj; }, - fromPartial, I>>(object: I): ResponseInitChain { + fromPartial(object: DeepPartial): ResponseInitChain { const message = createBaseResponseInitChain(); message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null @@ -2867,7 +2862,7 @@ export const ResponseQuery = { return obj; }, - fromPartial, I>>(object: I): ResponseQuery { + fromPartial(object: DeepPartial): ResponseQuery { const message = createBaseResponseQuery(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2942,7 +2937,7 @@ export const ResponseBeginBlock = { return obj; }, - fromPartial, I>>(object: I): ResponseBeginBlock { + fromPartial(object: DeepPartial): ResponseBeginBlock { const message = createBaseResponseBeginBlock(); message.events = object.events?.map((e) => Event.fromPartial(e)) || []; return message; @@ -3082,7 +3077,7 @@ export const ResponseCheckTx = { return obj; }, - fromPartial, I>>(object: I): ResponseCheckTx { + fromPartial(object: DeepPartial): ResponseCheckTx { const message = createBaseResponseCheckTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3233,7 +3228,7 @@ export const ResponseDeliverTx = { return obj; }, - fromPartial, I>>(object: I): ResponseDeliverTx { + fromPartial(object: DeepPartial): ResponseDeliverTx { const message = createBaseResponseDeliverTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3341,7 +3336,7 @@ export const ResponseEndBlock = { return obj; }, - fromPartial, I>>(object: I): ResponseEndBlock { + fromPartial(object: DeepPartial): ResponseEndBlock { const message = createBaseResponseEndBlock(); message.validatorUpdates = object.validatorUpdates?.map((e) => ValidatorUpdate.fromPartial(e)) || []; message.consensusParamUpdates = @@ -3414,7 +3409,7 @@ export const ResponseCommit = { return obj; }, - fromPartial, I>>(object: I): ResponseCommit { + fromPartial(object: DeepPartial): ResponseCommit { const message = createBaseResponseCommit(); message.data = object.data ?? new Uint8Array(); message.retainHeight = @@ -3482,7 +3477,7 @@ export const ResponseListSnapshots = { return obj; }, - fromPartial, I>>(object: I): ResponseListSnapshots { + fromPartial(object: DeepPartial): ResponseListSnapshots { const message = createBaseResponseListSnapshots(); message.snapshots = object.snapshots?.map((e) => Snapshot.fromPartial(e)) || []; return message; @@ -3538,7 +3533,7 @@ export const ResponseOfferSnapshot = { return obj; }, - fromPartial, I>>(object: I): ResponseOfferSnapshot { + fromPartial(object: DeepPartial): ResponseOfferSnapshot { const message = createBaseResponseOfferSnapshot(); message.result = object.result ?? 0; return message; @@ -3595,9 +3590,7 @@ export const ResponseLoadSnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): ResponseLoadSnapshotChunk { + fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { const message = createBaseResponseLoadSnapshotChunk(); message.chunk = object.chunk ?? new Uint8Array(); return message; @@ -3703,9 +3696,7 @@ export const ResponseApplySnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): ResponseApplySnapshotChunk { + fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { const message = createBaseResponseApplySnapshotChunk(); message.result = object.result ?? 0; message.refetchChunks = object.refetchChunks?.map((e) => e) || []; @@ -3800,7 +3791,7 @@ export const ConsensusParams = { return obj; }, - fromPartial, I>>(object: I): ConsensusParams { + fromPartial(object: DeepPartial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -3880,7 +3871,7 @@ export const BlockParams = { return obj; }, - fromPartial, I>>(object: I): BlockParams { + fromPartial(object: DeepPartial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -3956,7 +3947,7 @@ export const LastCommitInfo = { return obj; }, - fromPartial, I>>(object: I): LastCommitInfo { + fromPartial(object: DeepPartial): LastCommitInfo { const message = createBaseLastCommitInfo(); message.round = object.round ?? 0; message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || []; @@ -4032,7 +4023,7 @@ export const Event = { return obj; }, - fromPartial, I>>(object: I): Event { + fromPartial(object: DeepPartial): Event { const message = createBaseEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => EventAttribute.fromPartial(e)) || []; @@ -4113,7 +4104,7 @@ export const EventAttribute = { return obj; }, - fromPartial, I>>(object: I): EventAttribute { + fromPartial(object: DeepPartial): EventAttribute { const message = createBaseEventAttribute(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -4206,7 +4197,7 @@ export const TxResult = { return obj; }, - fromPartial, I>>(object: I): TxResult { + fromPartial(object: DeepPartial): TxResult { const message = createBaseTxResult(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -4281,7 +4272,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.power = @@ -4351,7 +4342,7 @@ export const ValidatorUpdate = { return obj; }, - fromPartial, I>>(object: I): ValidatorUpdate { + fromPartial(object: DeepPartial): ValidatorUpdate { const message = createBaseValidatorUpdate(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null @@ -4424,7 +4415,7 @@ export const VoteInfo = { return obj; }, - fromPartial, I>>(object: I): VoteInfo { + fromPartial(object: DeepPartial): VoteInfo { const message = createBaseVoteInfo(); message.validator = object.validator !== undefined && object.validator !== null @@ -4530,7 +4521,7 @@ export const Evidence = { return obj; }, - fromPartial, I>>(object: I): Evidence { + fromPartial(object: DeepPartial): Evidence { const message = createBaseEvidence(); message.type = object.type ?? 0; message.validator = @@ -4644,7 +4635,7 @@ export const Snapshot = { return obj; }, - fromPartial, I>>(object: I): Snapshot { + fromPartial(object: DeepPartial): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index 0e934fb4..adf582ef 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; /** PublicKey defines the keys available for use with Tendermint Validators */ @@ -72,7 +72,7 @@ export const PublicKey = { return obj; }, - fromPartial, I>>(object: I): PublicKey { + fromPartial(object: DeepPartial): PublicKey { const message = createBasePublicKey(); message.ed25519 = object.ed25519 ?? undefined; message.secp256k1 = object.secp256k1 ?? undefined; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 57f6a7a3..6e84072c 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; export interface Proof { total: Long; @@ -127,7 +127,7 @@ export const Proof = { return obj; }, - fromPartial, I>>(object: I): Proof { + fromPartial(object: DeepPartial): Proof { const message = createBaseProof(); message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.ZERO; @@ -200,7 +200,7 @@ export const ValueOp = { return obj; }, - fromPartial, I>>(object: I): ValueOp { + fromPartial(object: DeepPartial): ValueOp { const message = createBaseValueOp(); message.key = object.key ?? new Uint8Array(); message.proof = @@ -280,7 +280,7 @@ export const DominoOp = { return obj; }, - fromPartial, I>>(object: I): DominoOp { + fromPartial(object: DeepPartial): DominoOp { const message = createBaseDominoOp(); message.key = object.key ?? ""; message.input = object.input ?? ""; @@ -362,7 +362,7 @@ export const ProofOp = { return obj; }, - fromPartial, I>>(object: I): ProofOp { + fromPartial(object: DeepPartial): ProofOp { const message = createBaseProofOp(); message.type = object.type ?? ""; message.key = object.key ?? new Uint8Array(); @@ -426,7 +426,7 @@ export const ProofOps = { return obj; }, - fromPartial, I>>(object: I): ProofOps { + fromPartial(object: DeepPartial): ProofOps { const message = createBaseProofOps(); message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || []; return message; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 63eda28d..3a3dd206 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; export interface NetAddress { id: string; @@ -99,7 +99,7 @@ export const NetAddress = { return obj; }, - fromPartial, I>>(object: I): NetAddress { + fromPartial(object: DeepPartial): NetAddress { const message = createBaseNetAddress(); message.id = object.id ?? ""; message.ip = object.ip ?? ""; @@ -179,7 +179,7 @@ export const ProtocolVersion = { return obj; }, - fromPartial, I>>(object: I): ProtocolVersion { + fromPartial(object: DeepPartial): ProtocolVersion { const message = createBaseProtocolVersion(); message.p2p = object.p2p !== undefined && object.p2p !== null ? Long.fromValue(object.p2p) : Long.UZERO; message.block = @@ -322,7 +322,7 @@ export const DefaultNodeInfo = { return obj; }, - fromPartial, I>>(object: I): DefaultNodeInfo { + fromPartial(object: DeepPartial): DefaultNodeInfo { const message = createBaseDefaultNodeInfo(); message.protocolVersion = object.protocolVersion !== undefined && object.protocolVersion !== null @@ -402,7 +402,7 @@ export const DefaultNodeInfoOther = { return obj; }, - fromPartial, I>>(object: I): DefaultNodeInfoOther { + fromPartial(object: DeepPartial): DefaultNodeInfoOther { const message = createBaseDefaultNodeInfoOther(); message.txIndex = object.txIndex ?? ""; message.rpcAddress = object.rpcAddress ?? ""; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 7fd10541..0bfb1e9b 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -3,7 +3,7 @@ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../helpers"; +import { isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Block { header?: Header; @@ -96,7 +96,7 @@ export const Block = { return obj; }, - fromPartial, I>>(object: I): Block { + fromPartial(object: DeepPartial): Block { const message = createBaseBlock(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index ba7f1e61..3fb3ef88 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -4,7 +4,7 @@ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator } from "./validator"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; +import { isSet, DeepPartial, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; @@ -102,7 +102,7 @@ export const Evidence = { return obj; }, - fromPartial, I>>(object: I): Evidence { + fromPartial(object: DeepPartial): Evidence { const message = createBaseEvidence(); message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null @@ -211,7 +211,7 @@ export const DuplicateVoteEvidence = { return obj; }, - fromPartial, I>>(object: I): DuplicateVoteEvidence { + fromPartial(object: DeepPartial): DuplicateVoteEvidence { const message = createBaseDuplicateVoteEvidence(); message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; @@ -340,9 +340,7 @@ export const LightClientAttackEvidence = { return obj; }, - fromPartial, I>>( - object: I, - ): LightClientAttackEvidence { + fromPartial(object: DeepPartial): LightClientAttackEvidence { const message = createBaseLightClientAttackEvidence(); message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null @@ -420,7 +418,7 @@ export const EvidenceList = { return obj; }, - fromPartial, I>>(object: I): EvidenceList { + fromPartial(object: DeepPartial): EvidenceList { const message = createBaseEvidenceList(); message.evidence = object.evidence?.map((e) => Evidence.fromPartial(e)) || []; return message; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index ed94658a..2eccfa83 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../helpers"; +import { isSet, DeepPartial, Long } from "../../helpers"; export const protobufPackage = "tendermint.types"; /** * ConsensusParams contains consensus critical parameters that determine the @@ -175,7 +175,7 @@ export const ConsensusParams = { return obj; }, - fromPartial, I>>(object: I): ConsensusParams { + fromPartial(object: DeepPartial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -266,7 +266,7 @@ export const BlockParams = { return obj; }, - fromPartial, I>>(object: I): BlockParams { + fromPartial(object: DeepPartial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -353,7 +353,7 @@ export const EvidenceParams = { return obj; }, - fromPartial, I>>(object: I): EvidenceParams { + fromPartial(object: DeepPartial): EvidenceParams { const message = createBaseEvidenceParams(); message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null @@ -424,7 +424,7 @@ export const ValidatorParams = { return obj; }, - fromPartial, I>>(object: I): ValidatorParams { + fromPartial(object: DeepPartial): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pubKeyTypes?.map((e) => e) || []; return message; @@ -480,7 +480,7 @@ export const VersionParams = { return obj; }, - fromPartial, I>>(object: I): VersionParams { + fromPartial(object: DeepPartial): VersionParams { const message = createBaseVersionParams(); message.appVersion = object.appVersion !== undefined && object.appVersion !== null @@ -551,7 +551,7 @@ export const HashedParams = { return obj; }, - fromPartial, I>>(object: I): HashedParams { + fromPartial(object: DeepPartial): HashedParams { const message = createBaseHashedParams(); message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index 6309a44f..c780c376 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -10,7 +10,6 @@ import { bytesFromBase64, base64FromBytes, DeepPartial, - Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -309,7 +308,7 @@ export const PartSetHeader = { return obj; }, - fromPartial, I>>(object: I): PartSetHeader { + fromPartial(object: DeepPartial): PartSetHeader { const message = createBasePartSetHeader(); message.total = object.total ?? 0; message.hash = object.hash ?? new Uint8Array(); @@ -389,7 +388,7 @@ export const Part = { return obj; }, - fromPartial, I>>(object: I): Part { + fromPartial(object: DeepPartial): Part { const message = createBasePart(); message.index = object.index ?? 0; message.bytes = object.bytes ?? new Uint8Array(); @@ -461,7 +460,7 @@ export const BlockID = { return obj; }, - fromPartial, I>>(object: I): BlockID { + fromPartial(object: DeepPartial): BlockID { const message = createBaseBlockID(); message.hash = object.hash ?? new Uint8Array(); message.partSetHeader = @@ -699,7 +698,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: DeepPartial
): Header { const message = createBaseHeader(); message.version = object.version !== undefined && object.version !== null @@ -782,7 +781,7 @@ export const Data = { return obj; }, - fromPartial, I>>(object: I): Data { + fromPartial(object: DeepPartial): Data { const message = createBaseData(); message.txs = object.txs?.map((e) => e) || []; return message; @@ -924,7 +923,7 @@ export const Vote = { return obj; }, - fromPartial, I>>(object: I): Vote { + fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.type = object.type ?? 0; message.height = @@ -1036,7 +1035,7 @@ export const Commit = { return obj; }, - fromPartial, I>>(object: I): Commit { + fromPartial(object: DeepPartial): Commit { const message = createBaseCommit(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1140,7 +1139,7 @@ export const CommitSig = { return obj; }, - fromPartial, I>>(object: I): CommitSig { + fromPartial(object: DeepPartial): CommitSig { const message = createBaseCommitSig(); message.blockIdFlag = object.blockIdFlag ?? 0; message.validatorAddress = object.validatorAddress ?? new Uint8Array(); @@ -1272,7 +1271,7 @@ export const Proposal = { return obj; }, - fromPartial, I>>(object: I): Proposal { + fromPartial(object: DeepPartial): Proposal { const message = createBaseProposal(); message.type = object.type ?? 0; message.height = @@ -1352,7 +1351,7 @@ export const SignedHeader = { return obj; }, - fromPartial, I>>(object: I): SignedHeader { + fromPartial(object: DeepPartial): SignedHeader { const message = createBaseSignedHeader(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -1424,7 +1423,7 @@ export const LightBlock = { return obj; }, - fromPartial, I>>(object: I): LightBlock { + fromPartial(object: DeepPartial): LightBlock { const message = createBaseLightBlock(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -1521,7 +1520,7 @@ export const BlockMeta = { return obj; }, - fromPartial, I>>(object: I): BlockMeta { + fromPartial(object: DeepPartial): BlockMeta { const message = createBaseBlockMeta(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -1612,7 +1611,7 @@ export const TxProof = { return obj; }, - fromPartial, I>>(object: I): TxProof { + fromPartial(object: DeepPartial): TxProof { const message = createBaseTxProof(); message.rootHash = object.rootHash ?? new Uint8Array(); message.data = object.data ?? new Uint8Array(); diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 8c604715..207d2748 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface ValidatorSet { validators: Validator[]; @@ -101,7 +101,7 @@ export const ValidatorSet = { return obj; }, - fromPartial, I>>(object: I): ValidatorSet { + fromPartial(object: DeepPartial): ValidatorSet { const message = createBaseValidatorSet(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.proposer = @@ -201,7 +201,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.pubKey = @@ -281,7 +281,7 @@ export const SimpleValidator = { return obj; }, - fromPartial, I>>(object: I): SimpleValidator { + fromPartial(object: DeepPartial): SimpleValidator { const message = createBaseSimpleValidator(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index 42e909cb..ee26bf30 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.version"; /** * App includes the protocol and software version for the application. @@ -84,7 +84,7 @@ export const App = { return obj; }, - fromPartial, I>>(object: I): App { + fromPartial(object: DeepPartial): App { const message = createBaseApp(); message.protocol = object.protocol !== undefined && object.protocol !== null @@ -155,7 +155,7 @@ export const Consensus = { return obj; }, - fromPartial, I>>(object: I): Consensus { + fromPartial(object: DeepPartial): Consensus { const message = createBaseConsensus(); message.block = object.block !== undefined && object.block !== null ? Long.fromValue(object.block) : Long.UZERO; From 2870c306a94446af6b4c6cfe6a2dd8c49a90270c Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 10:02:20 -0700 Subject: [PATCH 29/38] de-dup protos --- package-lock.json | 74 +-- package.json | 2 +- src/cosmos/authz/v1beta1/authz.ts | 112 ----- src/cosmos/authz/v1beta1/genesis.ts | 111 ++++- src/cosmos/authz/v1beta1/query.ts | 368 +-------------- src/cosmos/bank/v1beta1/query.ts | 187 -------- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 424 ------------------ src/cosmos/feegrant/v1beta1/query.ts | 182 -------- src/cosmos/tx/signing/v1beta1/signing.ts | 21 - src/cosmos/tx/v1beta1/service.ts | 231 +--------- src/helpers.ts | 2 +- 11 files changed, 153 insertions(+), 1561 deletions(-) diff --git a/package-lock.json b/package-lock.json index 525f9732..ad8c81d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.59.0", + "@osmonauts/telescope": "^0.61.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.54.0.tgz", - "integrity": "sha512-hlK1yevZKLzn8LZ9KaDHs6pb4TFw8ca0bLk2+SPYpDWt9DS1BIn+Ad5/d01sEXrReb1esILR1uG8w+8VzyAATQ==", + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.56.0.tgz", + "integrity": "sha512-pOT5v6DneNycPVdp8i1pvg1UzdWuOY7b334Z8uOIfwTMwlYdzUV6b5ARu6Qknoc8gEGd8MbyMhvesfWA/ArHEA==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.28.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/proto-parser": "^0.30.0", + "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.28.0.tgz", - "integrity": "sha512-DgEpbMgX5mQsZ9x/svHRSe9wggnbEfEszCYdzdmTKqN4kdxBvl1VjsVgxPoOO2h7LfP1l6cdHt9v10oN2MX+Vw==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.0.tgz", + "integrity": "sha512-2BcXrE3/yp2cev8X3uUXKvgMjg7t5qJcGZQerBjihbhIee1YtKdXQDlpcj4fzQqhM6JObBDmClt3mDDCeRhViQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/types": "^0.22.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.59.0.tgz", - "integrity": "sha512-x+eG++roGjQ9xD3gEOQ9Ba7omLUJ8ZsDsb7Q10r7eCgiGljm6C0mkK+aEWuONG0OD8ezcVLrcXKXrOOL6ZfNxQ==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.61.0.tgz", + "integrity": "sha512-DDVCNSMAMwxZZ70WB3g+Cawe6nTmSnNa0FzMDb6tu3zzR2+iET2U8pO1xHgUhvnScBvPiI26f73gsLfzUUSvMg==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,9 +2189,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.54.0", - "@osmonauts/proto-parser": "^0.28.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/ast": "^0.56.0", + "@osmonauts/proto-parser": "^0.30.0", + "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2342,9 +2342,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.21.0.tgz", - "integrity": "sha512-pGjU0YNoEt4XRlpmojofAsdFsX7D65aGfyByoQV7r+rDKUvrTHSl4roTDelw06uoLjORmDYRy7xHSiPdglq67w==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.0.tgz", + "integrity": "sha512-b2nHnXseMzgYZPBotKatevrKYMHObKZ+nVz63Km07yfmW2QqYmJkfUdBv+ieP3qvDrOQPMs1mdGvlYLWW7e4LA==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -6490,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.54.0.tgz", - "integrity": "sha512-hlK1yevZKLzn8LZ9KaDHs6pb4TFw8ca0bLk2+SPYpDWt9DS1BIn+Ad5/d01sEXrReb1esILR1uG8w+8VzyAATQ==", + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.56.0.tgz", + "integrity": "sha512-pOT5v6DneNycPVdp8i1pvg1UzdWuOY7b334Z8uOIfwTMwlYdzUV6b5ARu6Qknoc8gEGd8MbyMhvesfWA/ArHEA==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.28.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/proto-parser": "^0.30.0", + "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.28.0.tgz", - "integrity": "sha512-DgEpbMgX5mQsZ9x/svHRSe9wggnbEfEszCYdzdmTKqN4kdxBvl1VjsVgxPoOO2h7LfP1l6cdHt9v10oN2MX+Vw==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.0.tgz", + "integrity": "sha512-2BcXrE3/yp2cev8X3uUXKvgMjg7t5qJcGZQerBjihbhIee1YtKdXQDlpcj4fzQqhM6JObBDmClt3mDDCeRhViQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/types": "^0.22.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.59.0.tgz", - "integrity": "sha512-x+eG++roGjQ9xD3gEOQ9Ba7omLUJ8ZsDsb7Q10r7eCgiGljm6C0mkK+aEWuONG0OD8ezcVLrcXKXrOOL6ZfNxQ==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.61.0.tgz", + "integrity": "sha512-DDVCNSMAMwxZZ70WB3g+Cawe6nTmSnNa0FzMDb6tu3zzR2+iET2U8pO1xHgUhvnScBvPiI26f73gsLfzUUSvMg==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,9 +6537,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.54.0", - "@osmonauts/proto-parser": "^0.28.0", - "@osmonauts/types": "^0.21.0", + "@osmonauts/ast": "^0.56.0", + "@osmonauts/proto-parser": "^0.30.0", + "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6674,9 +6674,9 @@ } }, "@osmonauts/types": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.21.0.tgz", - "integrity": "sha512-pGjU0YNoEt4XRlpmojofAsdFsX7D65aGfyByoQV7r+rDKUvrTHSl4roTDelw06uoLjORmDYRy7xHSiPdglq67w==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.0.tgz", + "integrity": "sha512-b2nHnXseMzgYZPBotKatevrKYMHObKZ+nVz63Km07yfmW2QqYmJkfUdBv+ieP3qvDrOQPMs1mdGvlYLWW7e4LA==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", diff --git a/package.json b/package.json index 66b4d1b1..901098f8 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.59.0", + "@osmonauts/telescope": "^0.61.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 9130a2e8..8ea3549b 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -23,19 +23,6 @@ export interface Grant { authorization?: Any; expiration?: Timestamp; } -/** - * GrantAuthorization extends a grant with both the addresses of the grantee and granter. - * It is used in genesis.proto and query.proto - * - * Since: cosmos-sdk 0.45.2 - */ - -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization?: Any; - expiration?: Timestamp; -} function createBaseGenericAuthorization(): GenericAuthorization { return { @@ -167,102 +154,3 @@ export const Grant = { return message; }, }; - -function createBaseGrantAuthorization(): GrantAuthorization { - return { - granter: "", - grantee: "", - authorization: undefined, - expiration: undefined, - }; -} - -export const GrantAuthorization = { - encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - - if (message.expiration !== undefined) { - Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantAuthorization(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - - case 2: - message.grantee = reader.string(); - break; - - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - - case 4: - message.expiration = Timestamp.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): GrantAuthorization { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, - expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined, - }; - }, - - toJSON(message: GrantAuthorization): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && - (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = fromTimestamp(message.expiration).toISOString()); - return obj; - }, - - fromPartial(object: DeepPartial): GrantAuthorization { - const message = createBaseGrantAuthorization(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.authorization = - object.authorization !== undefined && object.authorization !== null - ? Any.fromPartial(object.authorization) - : undefined; - message.expiration = - object.expiration !== undefined && object.expiration !== null - ? Timestamp.fromPartial(object.expiration) - : undefined; - return message; - }, -}; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index bc7e79e6..5e89ab09 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,13 +1,23 @@ //@ts-nocheck /* eslint-disable */ +import { Any } from "../../../google/protobuf/any"; +import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial } from "../../../helpers"; +import { DeepPartial, isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** GenesisState defines the authz module's genesis state. */ export interface GenesisState { authorization: GrantAuthorization[]; } +/** GrantAuthorization defines the GenesisState/GrantAuthorization type. */ + +export interface GrantAuthorization { + granter: string; + grantee: string; + authorization?: Any; + expiration?: Timestamp; +} function createBaseGenesisState(): GenesisState { return { @@ -72,3 +82,102 @@ export const GenesisState = { return message; }, }; + +function createBaseGrantAuthorization(): GrantAuthorization { + return { + granter: "", + grantee: "", + authorization: undefined, + expiration: undefined, + }; +} + +export const GrantAuthorization = { + encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.granter !== "") { + writer.uint32(10).string(message.granter); + } + + if (message.grantee !== "") { + writer.uint32(18).string(message.grantee); + } + + if (message.authorization !== undefined) { + Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); + } + + if (message.expiration !== undefined) { + Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGrantAuthorization(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.granter = reader.string(); + break; + + case 2: + message.grantee = reader.string(); + break; + + case 3: + message.authorization = Any.decode(reader, reader.uint32()); + break; + + case 4: + message.expiration = Timestamp.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): GrantAuthorization { + return { + granter: isSet(object.granter) ? String(object.granter) : "", + grantee: isSet(object.grantee) ? String(object.grantee) : "", + authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, + expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined, + }; + }, + + toJSON(message: GrantAuthorization): unknown { + const obj: any = {}; + message.granter !== undefined && (obj.granter = message.granter); + message.grantee !== undefined && (obj.grantee = message.grantee); + message.authorization !== undefined && + (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); + message.expiration !== undefined && (obj.expiration = fromTimestamp(message.expiration).toISOString()); + return obj; + }, + + fromPartial(object: DeepPartial): GrantAuthorization { + const message = createBaseGrantAuthorization(); + message.granter = object.granter ?? ""; + message.grantee = object.grantee ?? ""; + message.authorization = + object.authorization !== undefined && object.authorization !== null + ? Any.fromPartial(object.authorization) + : undefined; + message.expiration = + object.expiration !== undefined && object.expiration !== null + ? Timestamp.fromPartial(object.expiration) + : undefined; + return message; + }, +}; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 3d5adeb9..5d88d6f7 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { Grant, GrantAuthorization } from "./authz"; +import { Grant } from "./authz"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; @@ -26,40 +26,6 @@ export interface QueryGrantsResponse { pagination?: PageResponse; } -/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ - -export interface QueryGranterGrantsRequest { - granter: string; - /** pagination defines an pagination for the request. */ - - pagination?: PageRequest; -} -/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ - -export interface QueryGranterGrantsResponse { - /** grants is a list of grants granted by the granter. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - - pagination?: PageResponse; -} -/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ - -export interface QueryGranteeGrantsRequest { - grantee: string; - /** pagination defines an pagination for the request. */ - - pagination?: PageRequest; -} -/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ - -export interface QueryGranteeGrantsResponse { - /** grants is a list of grants granted to the grantee. */ - grants: GrantAuthorization[]; - /** pagination defines an pagination for the response. */ - - pagination?: PageResponse; -} function createBaseQueryGrantsRequest(): QueryGrantsRequest { return { @@ -234,329 +200,11 @@ export const QueryGrantsResponse = { return message; }, }; - -function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { - return { - granter: "", - pagination: undefined, - }; -} - -export const QueryGranterGrantsRequest = { - encode(message: QueryGranterGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranterGrantsRequest(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): QueryGranterGrantsRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGranterGrantsRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranterGrantsRequest { - const message = createBaseQueryGranterGrantsRequest(); - message.granter = object.granter ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { - return { - grants: [], - pagination: undefined, - }; -} - -export const QueryGranterGrantsResponse = { - encode(message: QueryGranterGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranterGrantsResponse(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.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): QueryGranterGrantsResponse { - return { - grants: Array.isArray(object?.grants) - ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGranterGrantsResponse): unknown { - const obj: any = {}; - - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); - } else { - obj.grants = []; - } - - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranterGrantsResponse { - const message = createBaseQueryGranterGrantsResponse(); - message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { - return { - grantee: "", - pagination: undefined, - }; -} - -export const QueryGranteeGrantsRequest = { - encode(message: QueryGranteeGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.grantee !== "") { - writer.uint32(10).string(message.grantee); - } - - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranteeGrantsRequest(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.grantee = reader.string(); - break; - - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): QueryGranteeGrantsRequest { - return { - grantee: isSet(object.grantee) ? String(object.grantee) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGranteeGrantsRequest): unknown { - const obj: any = {}; - message.grantee !== undefined && (obj.grantee = message.grantee); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { - const message = createBaseQueryGranteeGrantsRequest(); - message.grantee = object.grantee ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { - return { - grants: [], - pagination: undefined, - }; -} - -export const QueryGranteeGrantsResponse = { - encode(message: QueryGranteeGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.grants) { - GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); - } - - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGranteeGrantsResponse(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.grants.push(GrantAuthorization.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): QueryGranteeGrantsResponse { - return { - grants: Array.isArray(object?.grants) - ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGranteeGrantsResponse): unknown { - const obj: any = {}; - - if (message.grants) { - obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); - } else { - obj.grants = []; - } - - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { - const message = createBaseQueryGranteeGrantsResponse(); - message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; /** Query defines the gRPC querier service. */ export interface Query { /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: QueryGrantsRequest): Promise; - /** - * GranterGrants returns list of `GrantAuthorization`, granted by granter. - * - * Since: cosmos-sdk 0.45.2 - */ - - GranterGrants(request: QueryGranterGrantsRequest): Promise; - /** - * GranteeGrants returns a list of `GrantAuthorization` by grantee. - * - * Since: cosmos-sdk 0.45.2 - */ - - GranteeGrants(request: QueryGranteeGrantsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; @@ -564,8 +212,6 @@ export class QueryClientImpl implements Query { constructor(rpc: Rpc) { this.rpc = rpc; this.Grants = this.Grants.bind(this); - this.GranterGrants = this.GranterGrants.bind(this); - this.GranteeGrants = this.GranteeGrants.bind(this); } Grants(request: QueryGrantsRequest): Promise { @@ -573,16 +219,4 @@ export class QueryClientImpl implements Query { const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data); return promise.then((data) => QueryGrantsResponse.decode(new _m0.Reader(data))); } - - GranterGrants(request: QueryGranterGrantsRequest): Promise { - const data = QueryGranterGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data); - return promise.then((data) => QueryGranterGrantsResponse.decode(new _m0.Reader(data))); - } - - GranteeGrants(request: QueryGranteeGrantsRequest): Promise { - const data = QueryGranteeGrantsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data); - return promise.then((data) => QueryGranteeGrantsResponse.decode(new _m0.Reader(data))); - } } diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index bd5148f6..31d048ec 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -42,30 +42,6 @@ export interface QueryAllBalancesResponse { pagination?: PageResponse; } -/** - * QuerySpendableBalancesRequest defines the gRPC request structure for querying - * an account's spendable balances. - */ - -export interface QuerySpendableBalancesRequest { - /** address is the address to query spendable balances for. */ - address: string; - /** pagination defines an optional pagination for the request. */ - - pagination?: PageRequest; -} -/** - * QuerySpendableBalancesResponse defines the gRPC response structure for querying - * an account's spendable balances. - */ - -export interface QuerySpendableBalancesResponse { - /** balances is the spendable balances of all the coins. */ - balances: Coin[]; - /** pagination defines the pagination in the response. */ - - pagination?: PageResponse; -} /** * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC * method. @@ -425,156 +401,6 @@ export const QueryAllBalancesResponse = { }, }; -function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { - return { - address: "", - pagination: undefined, - }; -} - -export const QuerySpendableBalancesRequest = { - encode(message: QuerySpendableBalancesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpendableBalancesRequest(); - - 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): QuerySpendableBalancesRequest { - return { - address: isSet(object.address) ? String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QuerySpendableBalancesRequest): 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): QuerySpendableBalancesRequest { - const message = createBaseQuerySpendableBalancesRequest(); - message.address = object.address ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { - return { - balances: [], - pagination: undefined, - }; -} - -export const QuerySpendableBalancesResponse = { - encode(message: QuerySpendableBalancesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySpendableBalancesResponse(); - - 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): QuerySpendableBalancesResponse { - return { - balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QuerySpendableBalancesResponse): 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): QuerySpendableBalancesResponse { - const message = createBaseQuerySpendableBalancesResponse(); - message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined, @@ -1188,12 +1014,6 @@ export interface Query { /** AllBalances queries the balance of all coins for a single account. */ AllBalances(request: QueryAllBalancesRequest): Promise; - /** - * SpendableBalances queries the spenable balance of all coins for a single - * account. - */ - - SpendableBalances(request: QuerySpendableBalancesRequest): Promise; /** TotalSupply queries the total supply of all coins. */ TotalSupply(request?: QueryTotalSupplyRequest): Promise; @@ -1217,7 +1037,6 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Balance = this.Balance.bind(this); this.AllBalances = this.AllBalances.bind(this); - this.SpendableBalances = this.SpendableBalances.bind(this); this.TotalSupply = this.TotalSupply.bind(this); this.SupplyOf = this.SupplyOf.bind(this); this.Params = this.Params.bind(this); @@ -1237,12 +1056,6 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryAllBalancesResponse.decode(new _m0.Reader(data))); } - SpendableBalances(request: QuerySpendableBalancesRequest): Promise { - const data = QuerySpendableBalancesRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalances", data); - return promise.then((data) => QuerySpendableBalancesResponse.decode(new _m0.Reader(data))); - } - TotalSupply( request: QueryTotalSupplyRequest = { pagination: undefined, diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 87914262..02a8267a 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -18,42 +18,6 @@ export interface Metadata { /** SHA-256 chunk hashes */ chunkHashes: Uint8Array[]; } -/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ - -export interface SnapshotItem { - store?: SnapshotStoreItem; - iavl?: SnapshotIAVLItem; - extension?: SnapshotExtensionMeta; - extensionPayload?: SnapshotExtensionPayload; -} -/** SnapshotStoreItem contains metadata about a snapshotted store. */ - -export interface SnapshotStoreItem { - name: string; -} -/** SnapshotIAVLItem is an exported IAVL node. */ - -export interface SnapshotIAVLItem { - key: Uint8Array; - value: Uint8Array; - /** version is block height */ - - version: Long; - /** height is depth of the tree. */ - - height: number; -} -/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ - -export interface SnapshotExtensionMeta { - name: string; - format: number; -} -/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ - -export interface SnapshotExtensionPayload { - payload: Uint8Array; -} function createBaseSnapshot(): Snapshot { return { @@ -230,391 +194,3 @@ export const Metadata = { return message; }, }; - -function createBaseSnapshotItem(): SnapshotItem { - return { - store: undefined, - iavl: undefined, - extension: undefined, - extensionPayload: undefined, - }; -} - -export const SnapshotItem = { - encode(message: SnapshotItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.store !== undefined) { - SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); - } - - if (message.iavl !== undefined) { - SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); - } - - if (message.extension !== undefined) { - SnapshotExtensionMeta.encode(message.extension, writer.uint32(26).fork()).ldelim(); - } - - if (message.extensionPayload !== undefined) { - SnapshotExtensionPayload.encode(message.extensionPayload, writer.uint32(34).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotItem(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.store = SnapshotStoreItem.decode(reader, reader.uint32()); - break; - - case 2: - message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); - break; - - case 3: - message.extension = SnapshotExtensionMeta.decode(reader, reader.uint32()); - break; - - case 4: - message.extensionPayload = SnapshotExtensionPayload.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): SnapshotItem { - return { - store: isSet(object.store) ? SnapshotStoreItem.fromJSON(object.store) : undefined, - iavl: isSet(object.iavl) ? SnapshotIAVLItem.fromJSON(object.iavl) : undefined, - extension: isSet(object.extension) ? SnapshotExtensionMeta.fromJSON(object.extension) : undefined, - extensionPayload: isSet(object.extensionPayload) - ? SnapshotExtensionPayload.fromJSON(object.extensionPayload) - : undefined, - }; - }, - - toJSON(message: SnapshotItem): unknown { - const obj: any = {}; - message.store !== undefined && - (obj.store = message.store ? SnapshotStoreItem.toJSON(message.store) : undefined); - message.iavl !== undefined && - (obj.iavl = message.iavl ? SnapshotIAVLItem.toJSON(message.iavl) : undefined); - message.extension !== undefined && - (obj.extension = message.extension ? SnapshotExtensionMeta.toJSON(message.extension) : undefined); - message.extensionPayload !== undefined && - (obj.extensionPayload = message.extensionPayload - ? SnapshotExtensionPayload.toJSON(message.extensionPayload) - : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotItem { - const message = createBaseSnapshotItem(); - message.store = - object.store !== undefined && object.store !== null - ? SnapshotStoreItem.fromPartial(object.store) - : undefined; - message.iavl = - object.iavl !== undefined && object.iavl !== null - ? SnapshotIAVLItem.fromPartial(object.iavl) - : undefined; - message.extension = - object.extension !== undefined && object.extension !== null - ? SnapshotExtensionMeta.fromPartial(object.extension) - : undefined; - message.extensionPayload = - object.extensionPayload !== undefined && object.extensionPayload !== null - ? SnapshotExtensionPayload.fromPartial(object.extensionPayload) - : undefined; - return message; - }, -}; - -function createBaseSnapshotStoreItem(): SnapshotStoreItem { - return { - name: "", - }; -} - -export const SnapshotStoreItem = { - encode(message: SnapshotStoreItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotStoreItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotStoreItem(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): SnapshotStoreItem { - return { - name: isSet(object.name) ? String(object.name) : "", - }; - }, - - toJSON(message: SnapshotStoreItem): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotStoreItem { - const message = createBaseSnapshotStoreItem(); - message.name = object.name ?? ""; - return message; - }, -}; - -function createBaseSnapshotIAVLItem(): SnapshotIAVLItem { - return { - key: new Uint8Array(), - value: new Uint8Array(), - version: Long.ZERO, - height: 0, - }; -} - -export const SnapshotIAVLItem = { - encode(message: SnapshotIAVLItem, writer: _m0.Writer = _m0.Writer.create()): _m0.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.version.isZero()) { - writer.uint32(24).int64(message.version); - } - - if (message.height !== 0) { - writer.uint32(32).int32(message.height); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotIAVLItem { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotIAVLItem(); - - 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.version = reader.int64() as Long; - break; - - case 4: - message.height = reader.int32(); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): SnapshotIAVLItem { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, - height: isSet(object.height) ? Number(object.height) : 0, - }; - }, - - toJSON(message: SnapshotIAVLItem): 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.version !== undefined && (obj.version = (message.version || Long.ZERO).toString()); - message.height !== undefined && (obj.height = Math.round(message.height)); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotIAVLItem { - const message = createBaseSnapshotIAVLItem(); - message.key = object.key ?? new Uint8Array(); - message.value = object.value ?? new Uint8Array(); - message.version = - object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; - message.height = object.height ?? 0; - return message; - }, -}; - -function createBaseSnapshotExtensionMeta(): SnapshotExtensionMeta { - return { - name: "", - format: 0, - }; -} - -export const SnapshotExtensionMeta = { - encode(message: SnapshotExtensionMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - - if (message.format !== 0) { - writer.uint32(16).uint32(message.format); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionMeta { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotExtensionMeta(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - - case 2: - message.format = reader.uint32(); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): SnapshotExtensionMeta { - return { - name: isSet(object.name) ? String(object.name) : "", - format: isSet(object.format) ? Number(object.format) : 0, - }; - }, - - toJSON(message: SnapshotExtensionMeta): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.format !== undefined && (obj.format = Math.round(message.format)); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotExtensionMeta { - const message = createBaseSnapshotExtensionMeta(); - message.name = object.name ?? ""; - message.format = object.format ?? 0; - return message; - }, -}; - -function createBaseSnapshotExtensionPayload(): SnapshotExtensionPayload { - return { - payload: new Uint8Array(), - }; -} - -export const SnapshotExtensionPayload = { - encode(message: SnapshotExtensionPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.payload.length !== 0) { - writer.uint32(10).bytes(message.payload); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionPayload { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSnapshotExtensionPayload(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.payload = reader.bytes(); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): SnapshotExtensionPayload { - return { - payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), - }; - }, - - toJSON(message: SnapshotExtensionPayload): unknown { - const obj: any = {}; - message.payload !== undefined && - (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); - return obj; - }, - - fromPartial(object: DeepPartial): SnapshotExtensionPayload { - const message = createBaseSnapshotExtensionPayload(); - message.payload = object.payload ?? new Uint8Array(); - return message; - }, -}; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 2c808f56..b169cdfc 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -37,23 +37,6 @@ export interface QueryAllowancesResponse { pagination?: PageResponse; } -/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ - -export interface QueryAllowancesByGranterRequest { - granter: string; - /** pagination defines an pagination for the request. */ - - pagination?: PageRequest; -} -/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ - -export interface QueryAllowancesByGranterResponse { - /** allowances that have been issued by the granter. */ - allowances: Grant[]; - /** pagination defines an pagination for the response. */ - - pagination?: PageResponse; -} function createBaseQueryAllowanceRequest(): QueryAllowanceRequest { return { @@ -334,158 +317,6 @@ export const QueryAllowancesResponse = { return message; }, }; - -function createBaseQueryAllowancesByGranterRequest(): QueryAllowancesByGranterRequest { - return { - granter: "", - pagination: undefined, - }; -} - -export const QueryAllowancesByGranterRequest = { - encode(message: QueryAllowancesByGranterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesByGranterRequest(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): QueryAllowancesByGranterRequest { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryAllowancesByGranterRequest): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { - const message = createBaseQueryAllowancesByGranterRequest(); - message.granter = object.granter ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryAllowancesByGranterResponse(): QueryAllowancesByGranterResponse { - return { - allowances: [], - pagination: undefined, - }; -} - -export const QueryAllowancesByGranterResponse = { - encode(message: QueryAllowancesByGranterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.allowances) { - Grant.encode(v!, writer.uint32(10).fork()).ldelim(); - } - - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllowancesByGranterResponse(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.allowances.push(Grant.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): QueryAllowancesByGranterResponse { - return { - allowances: Array.isArray(object?.allowances) - ? object.allowances.map((e: any) => Grant.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryAllowancesByGranterResponse): unknown { - const obj: any = {}; - - if (message.allowances) { - obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); - } else { - obj.allowances = []; - } - - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { - const message = createBaseQueryAllowancesByGranterResponse(); - message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; /** Query defines the gRPC querier service. */ export interface Query { @@ -494,12 +325,6 @@ export interface Query { /** Allowances returns all the grants for address. */ Allowances(request: QueryAllowancesRequest): Promise; - /** - * AllowancesByGranter returns all the grants given by an address - * Since v0.46 - */ - - AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; @@ -508,7 +333,6 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Allowance = this.Allowance.bind(this); this.Allowances = this.Allowances.bind(this); - this.AllowancesByGranter = this.AllowancesByGranter.bind(this); } Allowance(request: QueryAllowanceRequest): Promise { @@ -522,10 +346,4 @@ export class QueryClientImpl implements Query { const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowances", data); return promise.then((data) => QueryAllowancesResponse.decode(new _m0.Reader(data))); } - - AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise { - const data = QueryAllowancesByGranterRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "AllowancesByGranter", data); - return promise.then((data) => QueryAllowancesByGranterResponse.decode(new _m0.Reader(data))); - } } diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 62e76c81..a238ae1f 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -32,20 +32,6 @@ export enum SignMode { * Amino JSON and will be removed in the future */ SIGN_MODE_LEGACY_AMINO_JSON = 127, - - /** - * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - * - * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - * but is not implemented on the SDK by default. To enable EIP-191, you need - * to pass a custom `TxConfig` that has an implementation of - * `SignModeHandler` for EIP-191. The SDK may decide to fully support - * EIP-191 in the future. - * - * Since: cosmos-sdk 0.45.2 - */ - SIGN_MODE_EIP_191 = 191, UNRECOGNIZED = -1, } export function signModeFromJSON(object: any): SignMode { @@ -66,10 +52,6 @@ export function signModeFromJSON(object: any): SignMode { case "SIGN_MODE_LEGACY_AMINO_JSON": return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; - case 191: - case "SIGN_MODE_EIP_191": - return SignMode.SIGN_MODE_EIP_191; - case -1: case "UNRECOGNIZED": default: @@ -90,9 +72,6 @@ export function signModeToJSON(object: SignMode): string { case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: return "SIGN_MODE_LEGACY_AMINO_JSON"; - case SignMode.SIGN_MODE_EIP_191: - return "SIGN_MODE_EIP_191"; - case SignMode.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 279c1a15..1c0eb060 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -3,10 +3,8 @@ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; -import { BlockID } from "../../../tendermint/types/types"; -import { Block } from "../../../tendermint/types/block"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ @@ -133,7 +131,7 @@ export function broadcastModeToJSON(object: BroadcastMode): string { export interface GetTxsEventRequest { /** events is the list of transaction event type. */ events: string[]; - /** pagination defines a pagination for the request. */ + /** pagination defines an pagination for the request. */ pagination?: PageRequest; orderBy: OrderBy; @@ -149,7 +147,7 @@ export interface GetTxsEventResponse { /** tx_responses is the list of queried TxResponses. */ txResponses: TxResponse[]; - /** pagination defines a pagination for the response. */ + /** pagination defines an pagination for the response. */ pagination?: PageResponse; } @@ -223,35 +221,6 @@ export interface GetTxResponse { txResponse?: TxResponse; } -/** - * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs - * RPC method. - * - * Since: cosmos-sdk 0.45.2 - */ - -export interface GetBlockWithTxsRequest { - /** height is the height of the block to query. */ - height: Long; - /** pagination defines a pagination for the request. */ - - pagination?: PageRequest; -} -/** - * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - * - * Since: cosmos-sdk 0.45.2 - */ - -export interface GetBlockWithTxsResponse { - /** txs are the transactions in the block. */ - txs: Tx[]; - blockId?: BlockID; - block?: Block; - /** pagination defines a pagination for the response. */ - - pagination?: PageResponse; -} function createBaseGetTxsEventRequest(): GetTxsEventRequest { return { @@ -838,186 +807,6 @@ export const GetTxResponse = { return message; }, }; - -function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { - return { - height: Long.ZERO, - pagination: undefined, - }; -} - -export const GetBlockWithTxsRequest = { - encode(message: GetBlockWithTxsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (!message.height.isZero()) { - writer.uint32(8).int64(message.height); - } - - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsRequest(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.height = reader.int64() as Long; - break; - - case 2: - message.pagination = PageRequest.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): GetBlockWithTxsRequest { - return { - height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: GetBlockWithTxsRequest): unknown { - const obj: any = {}; - message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString()); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetBlockWithTxsRequest { - const message = createBaseGetBlockWithTxsRequest(); - message.height = - object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { - return { - txs: [], - blockId: undefined, - block: undefined, - pagination: undefined, - }; -} - -export const GetBlockWithTxsResponse = { - encode(message: GetBlockWithTxsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.txs) { - Tx.encode(v!, writer.uint32(10).fork()).ldelim(); - } - - if (message.blockId !== undefined) { - BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); - } - - if (message.block !== undefined) { - Block.encode(message.block, writer.uint32(26).fork()).ldelim(); - } - - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetBlockWithTxsResponse(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.txs.push(Tx.decode(reader, reader.uint32())); - break; - - case 2: - message.blockId = BlockID.decode(reader, reader.uint32()); - break; - - case 3: - message.block = Block.decode(reader, reader.uint32()); - break; - - case 4: - message.pagination = PageResponse.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): GetBlockWithTxsResponse { - return { - txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromJSON(e)) : [], - blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, - block: isSet(object.block) ? Block.fromJSON(object.block) : undefined, - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: GetBlockWithTxsResponse): unknown { - const obj: any = {}; - - if (message.txs) { - obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); - } else { - obj.txs = []; - } - - message.blockId !== undefined && - (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); - message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial(object: DeepPartial): GetBlockWithTxsResponse { - const message = createBaseGetBlockWithTxsResponse(); - message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; - message.blockId = - object.blockId !== undefined && object.blockId !== null - ? BlockID.fromPartial(object.blockId) - : undefined; - message.block = - object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; /** Service defines a gRPC service for interacting with transactions. */ export interface Service { @@ -1032,13 +821,6 @@ export interface Service { /** GetTxsEvent fetches txs by event. */ GetTxsEvent(request: GetTxsEventRequest): Promise; - /** - * GetBlockWithTxs fetches a block with decoded txs. - * - * Since: cosmos-sdk 0.45.2 - */ - - GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; } export class QueryClientImpl implements Service { private readonly rpc: Rpc; @@ -1049,7 +831,6 @@ export class QueryClientImpl implements Service { this.GetTx = this.GetTx.bind(this); this.BroadcastTx = this.BroadcastTx.bind(this); this.GetTxsEvent = this.GetTxsEvent.bind(this); - this.GetBlockWithTxs = this.GetBlockWithTxs.bind(this); } Simulate(request: SimulateRequest): Promise { @@ -1075,10 +856,4 @@ export class QueryClientImpl implements Service { const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetTxsEvent", data); return promise.then((data) => GetTxsEventResponse.decode(new _m0.Reader(data))); } - - GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise { - const data = GetBlockWithTxsRequest.encode(request).finish(); - const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetBlockWithTxs", data); - return promise.then((data) => GetBlockWithTxsResponse.decode(new _m0.Reader(data))); - } } diff --git a/src/helpers.ts b/src/helpers.ts index ac9337a0..797f2141 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.59.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.61.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From 4f5d7ba21b6afd8fa729f4dc85b7f61287bb7e57 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 11:07:58 -0700 Subject: [PATCH 30/38] use cosmos-sdk protos first --- scripts/codegen.js | 5 +- src/cosmos/authz/v1beta1/authz.ts | 112 +++++ src/cosmos/authz/v1beta1/genesis.ts | 112 +---- src/cosmos/authz/v1beta1/query.ts | 368 ++++++++++++++- src/cosmos/bank/v1beta1/query.ts | 187 ++++++++ src/cosmos/base/snapshots/v1beta1/snapshot.ts | 424 ++++++++++++++++++ src/cosmos/feegrant/v1beta1/query.ts | 182 ++++++++ src/cosmos/tx/signing/v1beta1/signing.ts | 21 + src/cosmos/tx/v1beta1/service.ts | 231 +++++++++- 9 files changed, 1526 insertions(+), 116 deletions(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index af1f050b..0367c5fb 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -5,13 +5,14 @@ const telescope = require('@osmonauts/telescope').default; telescope({ protoDirs: [ + 'cosmos-sdk-0.45/proto', + 'cosmos-sdk-0.45/third_party/proto', 'wasmd-0.28/proto', 'wasmd-0.28/third_party/proto', - 'cosmos-sdk-0.45/proto', - 'cosmos-sdk-0.45/third_party/proto' ], outPath: join(__dirname, '/../src'), options: { + logLevel: 2, useSDKTypes: false, tsDisable: { disableAll: true diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 8ea3549b..9130a2e8 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -23,6 +23,19 @@ export interface Grant { authorization?: Any; expiration?: Timestamp; } +/** + * GrantAuthorization extends a grant with both the addresses of the grantee and granter. + * It is used in genesis.proto and query.proto + * + * Since: cosmos-sdk 0.45.2 + */ + +export interface GrantAuthorization { + granter: string; + grantee: string; + authorization?: Any; + expiration?: Timestamp; +} function createBaseGenericAuthorization(): GenericAuthorization { return { @@ -154,3 +167,102 @@ export const Grant = { return message; }, }; + +function createBaseGrantAuthorization(): GrantAuthorization { + return { + granter: "", + grantee: "", + authorization: undefined, + expiration: undefined, + }; +} + +export const GrantAuthorization = { + encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.granter !== "") { + writer.uint32(10).string(message.granter); + } + + if (message.grantee !== "") { + writer.uint32(18).string(message.grantee); + } + + if (message.authorization !== undefined) { + Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); + } + + if (message.expiration !== undefined) { + Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGrantAuthorization(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.granter = reader.string(); + break; + + case 2: + message.grantee = reader.string(); + break; + + case 3: + message.authorization = Any.decode(reader, reader.uint32()); + break; + + case 4: + message.expiration = Timestamp.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): GrantAuthorization { + return { + granter: isSet(object.granter) ? String(object.granter) : "", + grantee: isSet(object.grantee) ? String(object.grantee) : "", + authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, + expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined, + }; + }, + + toJSON(message: GrantAuthorization): unknown { + const obj: any = {}; + message.granter !== undefined && (obj.granter = message.granter); + message.grantee !== undefined && (obj.grantee = message.grantee); + message.authorization !== undefined && + (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); + message.expiration !== undefined && (obj.expiration = fromTimestamp(message.expiration).toISOString()); + return obj; + }, + + fromPartial(object: DeepPartial): GrantAuthorization { + const message = createBaseGrantAuthorization(); + message.granter = object.granter ?? ""; + message.grantee = object.grantee ?? ""; + message.authorization = + object.authorization !== undefined && object.authorization !== null + ? Any.fromPartial(object.authorization) + : undefined; + message.expiration = + object.expiration !== undefined && object.expiration !== null + ? Timestamp.fromPartial(object.expiration) + : undefined; + return message; + }, +}; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 5e89ab09..5196c2a0 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,23 +1,14 @@ //@ts-nocheck /* eslint-disable */ -import { Any } from "../../../google/protobuf/any"; -import { Timestamp } from "../../../google/protobuf/timestamp"; +import { GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; +import { DeepPartial } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** GenesisState defines the authz module's genesis state. */ export interface GenesisState { authorization: GrantAuthorization[]; } -/** GrantAuthorization defines the GenesisState/GrantAuthorization type. */ - -export interface GrantAuthorization { - granter: string; - grantee: string; - authorization?: Any; - expiration?: Timestamp; -} function createBaseGenesisState(): GenesisState { return { @@ -82,102 +73,3 @@ export const GenesisState = { return message; }, }; - -function createBaseGrantAuthorization(): GrantAuthorization { - return { - granter: "", - grantee: "", - authorization: undefined, - expiration: undefined, - }; -} - -export const GrantAuthorization = { - encode(message: GrantAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - - if (message.authorization !== undefined) { - Any.encode(message.authorization, writer.uint32(26).fork()).ldelim(); - } - - if (message.expiration !== undefined) { - Timestamp.encode(message.expiration, writer.uint32(34).fork()).ldelim(); - } - - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GrantAuthorization { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGrantAuthorization(); - - while (reader.pos < end) { - const tag = reader.uint32(); - - switch (tag >>> 3) { - case 1: - message.granter = reader.string(); - break; - - case 2: - message.grantee = reader.string(); - break; - - case 3: - message.authorization = Any.decode(reader, reader.uint32()); - break; - - case 4: - message.expiration = Timestamp.decode(reader, reader.uint32()); - break; - - default: - reader.skipType(tag & 7); - break; - } - } - - return message; - }, - - fromJSON(object: any): GrantAuthorization { - return { - granter: isSet(object.granter) ? String(object.granter) : "", - grantee: isSet(object.grantee) ? String(object.grantee) : "", - authorization: isSet(object.authorization) ? Any.fromJSON(object.authorization) : undefined, - expiration: isSet(object.expiration) ? fromJsonTimestamp(object.expiration) : undefined, - }; - }, - - toJSON(message: GrantAuthorization): unknown { - const obj: any = {}; - message.granter !== undefined && (obj.granter = message.granter); - message.grantee !== undefined && (obj.grantee = message.grantee); - message.authorization !== undefined && - (obj.authorization = message.authorization ? Any.toJSON(message.authorization) : undefined); - message.expiration !== undefined && (obj.expiration = fromTimestamp(message.expiration).toISOString()); - return obj; - }, - - fromPartial(object: DeepPartial): GrantAuthorization { - const message = createBaseGrantAuthorization(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.authorization = - object.authorization !== undefined && object.authorization !== null - ? Any.fromPartial(object.authorization) - : undefined; - message.expiration = - object.expiration !== undefined && object.expiration !== null - ? Timestamp.fromPartial(object.expiration) - : undefined; - return message; - }, -}; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 5d88d6f7..3d5adeb9 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { Grant } from "./authz"; +import { Grant, GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; @@ -26,6 +26,40 @@ export interface QueryGrantsResponse { pagination?: PageResponse; } +/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ + +export interface QueryGranterGrantsRequest { + granter: string; + /** pagination defines an pagination for the request. */ + + pagination?: PageRequest; +} +/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ + +export interface QueryGranterGrantsResponse { + /** grants is a list of grants granted by the granter. */ + grants: GrantAuthorization[]; + /** pagination defines an pagination for the response. */ + + pagination?: PageResponse; +} +/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */ + +export interface QueryGranteeGrantsRequest { + grantee: string; + /** pagination defines an pagination for the request. */ + + pagination?: PageRequest; +} +/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ + +export interface QueryGranteeGrantsResponse { + /** grants is a list of grants granted to the grantee. */ + grants: GrantAuthorization[]; + /** pagination defines an pagination for the response. */ + + pagination?: PageResponse; +} function createBaseQueryGrantsRequest(): QueryGrantsRequest { return { @@ -200,11 +234,329 @@ export const QueryGrantsResponse = { return message; }, }; + +function createBaseQueryGranterGrantsRequest(): QueryGranterGrantsRequest { + return { + granter: "", + pagination: undefined, + }; +} + +export const QueryGranterGrantsRequest = { + encode(message: QueryGranterGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.granter !== "") { + writer.uint32(10).string(message.granter); + } + + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGranterGrantsRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.granter = reader.string(); + break; + + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): QueryGranterGrantsRequest { + return { + granter: isSet(object.granter) ? String(object.granter) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryGranterGrantsRequest): unknown { + const obj: any = {}; + message.granter !== undefined && (obj.granter = message.granter); + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryGranterGrantsRequest { + const message = createBaseQueryGranterGrantsRequest(); + message.granter = object.granter ?? ""; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQueryGranterGrantsResponse(): QueryGranterGrantsResponse { + return { + grants: [], + pagination: undefined, + }; +} + +export const QueryGranterGrantsResponse = { + encode(message: QueryGranterGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.grants) { + GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); + } + + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGranterGrantsResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.grants.push(GrantAuthorization.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): QueryGranterGrantsResponse { + return { + grants: Array.isArray(object?.grants) + ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) + : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryGranterGrantsResponse): unknown { + const obj: any = {}; + + if (message.grants) { + obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); + } else { + obj.grants = []; + } + + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryGranterGrantsResponse { + const message = createBaseQueryGranterGrantsResponse(); + message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQueryGranteeGrantsRequest(): QueryGranteeGrantsRequest { + return { + grantee: "", + pagination: undefined, + }; +} + +export const QueryGranteeGrantsRequest = { + encode(message: QueryGranteeGrantsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.grantee !== "") { + writer.uint32(10).string(message.grantee); + } + + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGranteeGrantsRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.grantee = reader.string(); + break; + + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): QueryGranteeGrantsRequest { + return { + grantee: isSet(object.grantee) ? String(object.grantee) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryGranteeGrantsRequest): unknown { + const obj: any = {}; + message.grantee !== undefined && (obj.grantee = message.grantee); + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { + const message = createBaseQueryGranteeGrantsRequest(); + message.grantee = object.grantee ?? ""; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQueryGranteeGrantsResponse(): QueryGranteeGrantsResponse { + return { + grants: [], + pagination: undefined, + }; +} + +export const QueryGranteeGrantsResponse = { + encode(message: QueryGranteeGrantsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.grants) { + GrantAuthorization.encode(v!, writer.uint32(10).fork()).ldelim(); + } + + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGranteeGrantsResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.grants.push(GrantAuthorization.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): QueryGranteeGrantsResponse { + return { + grants: Array.isArray(object?.grants) + ? object.grants.map((e: any) => GrantAuthorization.fromJSON(e)) + : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryGranteeGrantsResponse): unknown { + const obj: any = {}; + + if (message.grants) { + obj.grants = message.grants.map((e) => (e ? GrantAuthorization.toJSON(e) : undefined)); + } else { + obj.grants = []; + } + + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { + const message = createBaseQueryGranteeGrantsResponse(); + message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; /** Query defines the gRPC querier service. */ export interface Query { /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: QueryGrantsRequest): Promise; + /** + * GranterGrants returns list of `GrantAuthorization`, granted by granter. + * + * Since: cosmos-sdk 0.45.2 + */ + + GranterGrants(request: QueryGranterGrantsRequest): Promise; + /** + * GranteeGrants returns a list of `GrantAuthorization` by grantee. + * + * Since: cosmos-sdk 0.45.2 + */ + + GranteeGrants(request: QueryGranteeGrantsRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; @@ -212,6 +564,8 @@ export class QueryClientImpl implements Query { constructor(rpc: Rpc) { this.rpc = rpc; this.Grants = this.Grants.bind(this); + this.GranterGrants = this.GranterGrants.bind(this); + this.GranteeGrants = this.GranteeGrants.bind(this); } Grants(request: QueryGrantsRequest): Promise { @@ -219,4 +573,16 @@ export class QueryClientImpl implements Query { const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data); return promise.then((data) => QueryGrantsResponse.decode(new _m0.Reader(data))); } + + GranterGrants(request: QueryGranterGrantsRequest): Promise { + const data = QueryGranterGrantsRequest.encode(request).finish(); + const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data); + return promise.then((data) => QueryGranterGrantsResponse.decode(new _m0.Reader(data))); + } + + GranteeGrants(request: QueryGranteeGrantsRequest): Promise { + const data = QueryGranteeGrantsRequest.encode(request).finish(); + const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data); + return promise.then((data) => QueryGranteeGrantsResponse.decode(new _m0.Reader(data))); + } } diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 31d048ec..bd5148f6 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -42,6 +42,30 @@ export interface QueryAllBalancesResponse { pagination?: PageResponse; } +/** + * QuerySpendableBalancesRequest defines the gRPC request structure for querying + * an account's spendable balances. + */ + +export interface QuerySpendableBalancesRequest { + /** address is the address to query spendable balances for. */ + address: string; + /** pagination defines an optional pagination for the request. */ + + pagination?: PageRequest; +} +/** + * QuerySpendableBalancesResponse defines the gRPC response structure for querying + * an account's spendable balances. + */ + +export interface QuerySpendableBalancesResponse { + /** balances is the spendable balances of all the coins. */ + balances: Coin[]; + /** pagination defines the pagination in the response. */ + + pagination?: PageResponse; +} /** * QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC * method. @@ -401,6 +425,156 @@ export const QueryAllBalancesResponse = { }, }; +function createBaseQuerySpendableBalancesRequest(): QuerySpendableBalancesRequest { + return { + address: "", + pagination: undefined, + }; +} + +export const QuerySpendableBalancesRequest = { + encode(message: QuerySpendableBalancesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQuerySpendableBalancesRequest(); + + 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): QuerySpendableBalancesRequest { + return { + address: isSet(object.address) ? String(object.address) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QuerySpendableBalancesRequest): 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): QuerySpendableBalancesRequest { + const message = createBaseQuerySpendableBalancesRequest(); + message.address = object.address ?? ""; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQuerySpendableBalancesResponse(): QuerySpendableBalancesResponse { + return { + balances: [], + pagination: undefined, + }; +} + +export const QuerySpendableBalancesResponse = { + encode(message: QuerySpendableBalancesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): QuerySpendableBalancesResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQuerySpendableBalancesResponse(); + + 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): QuerySpendableBalancesResponse { + return { + balances: Array.isArray(object?.balances) ? object.balances.map((e: any) => Coin.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QuerySpendableBalancesResponse): 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): QuerySpendableBalancesResponse { + const message = createBaseQuerySpendableBalancesResponse(); + message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + function createBaseQueryTotalSupplyRequest(): QueryTotalSupplyRequest { return { pagination: undefined, @@ -1014,6 +1188,12 @@ export interface Query { /** AllBalances queries the balance of all coins for a single account. */ AllBalances(request: QueryAllBalancesRequest): Promise; + /** + * SpendableBalances queries the spenable balance of all coins for a single + * account. + */ + + SpendableBalances(request: QuerySpendableBalancesRequest): Promise; /** TotalSupply queries the total supply of all coins. */ TotalSupply(request?: QueryTotalSupplyRequest): Promise; @@ -1037,6 +1217,7 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Balance = this.Balance.bind(this); this.AllBalances = this.AllBalances.bind(this); + this.SpendableBalances = this.SpendableBalances.bind(this); this.TotalSupply = this.TotalSupply.bind(this); this.SupplyOf = this.SupplyOf.bind(this); this.Params = this.Params.bind(this); @@ -1056,6 +1237,12 @@ export class QueryClientImpl implements Query { return promise.then((data) => QueryAllBalancesResponse.decode(new _m0.Reader(data))); } + SpendableBalances(request: QuerySpendableBalancesRequest): Promise { + const data = QuerySpendableBalancesRequest.encode(request).finish(); + const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "SpendableBalances", data); + return promise.then((data) => QuerySpendableBalancesResponse.decode(new _m0.Reader(data))); + } + TotalSupply( request: QueryTotalSupplyRequest = { pagination: undefined, diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 02a8267a..87914262 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -18,6 +18,42 @@ export interface Metadata { /** SHA-256 chunk hashes */ chunkHashes: Uint8Array[]; } +/** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ + +export interface SnapshotItem { + store?: SnapshotStoreItem; + iavl?: SnapshotIAVLItem; + extension?: SnapshotExtensionMeta; + extensionPayload?: SnapshotExtensionPayload; +} +/** SnapshotStoreItem contains metadata about a snapshotted store. */ + +export interface SnapshotStoreItem { + name: string; +} +/** SnapshotIAVLItem is an exported IAVL node. */ + +export interface SnapshotIAVLItem { + key: Uint8Array; + value: Uint8Array; + /** version is block height */ + + version: Long; + /** height is depth of the tree. */ + + height: number; +} +/** SnapshotExtensionMeta contains metadata about an external snapshotter. */ + +export interface SnapshotExtensionMeta { + name: string; + format: number; +} +/** SnapshotExtensionPayload contains payloads of an external snapshotter. */ + +export interface SnapshotExtensionPayload { + payload: Uint8Array; +} function createBaseSnapshot(): Snapshot { return { @@ -194,3 +230,391 @@ export const Metadata = { return message; }, }; + +function createBaseSnapshotItem(): SnapshotItem { + return { + store: undefined, + iavl: undefined, + extension: undefined, + extensionPayload: undefined, + }; +} + +export const SnapshotItem = { + encode(message: SnapshotItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.store !== undefined) { + SnapshotStoreItem.encode(message.store, writer.uint32(10).fork()).ldelim(); + } + + if (message.iavl !== undefined) { + SnapshotIAVLItem.encode(message.iavl, writer.uint32(18).fork()).ldelim(); + } + + if (message.extension !== undefined) { + SnapshotExtensionMeta.encode(message.extension, writer.uint32(26).fork()).ldelim(); + } + + if (message.extensionPayload !== undefined) { + SnapshotExtensionPayload.encode(message.extensionPayload, writer.uint32(34).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotItem { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSnapshotItem(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.store = SnapshotStoreItem.decode(reader, reader.uint32()); + break; + + case 2: + message.iavl = SnapshotIAVLItem.decode(reader, reader.uint32()); + break; + + case 3: + message.extension = SnapshotExtensionMeta.decode(reader, reader.uint32()); + break; + + case 4: + message.extensionPayload = SnapshotExtensionPayload.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): SnapshotItem { + return { + store: isSet(object.store) ? SnapshotStoreItem.fromJSON(object.store) : undefined, + iavl: isSet(object.iavl) ? SnapshotIAVLItem.fromJSON(object.iavl) : undefined, + extension: isSet(object.extension) ? SnapshotExtensionMeta.fromJSON(object.extension) : undefined, + extensionPayload: isSet(object.extensionPayload) + ? SnapshotExtensionPayload.fromJSON(object.extensionPayload) + : undefined, + }; + }, + + toJSON(message: SnapshotItem): unknown { + const obj: any = {}; + message.store !== undefined && + (obj.store = message.store ? SnapshotStoreItem.toJSON(message.store) : undefined); + message.iavl !== undefined && + (obj.iavl = message.iavl ? SnapshotIAVLItem.toJSON(message.iavl) : undefined); + message.extension !== undefined && + (obj.extension = message.extension ? SnapshotExtensionMeta.toJSON(message.extension) : undefined); + message.extensionPayload !== undefined && + (obj.extensionPayload = message.extensionPayload + ? SnapshotExtensionPayload.toJSON(message.extensionPayload) + : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): SnapshotItem { + const message = createBaseSnapshotItem(); + message.store = + object.store !== undefined && object.store !== null + ? SnapshotStoreItem.fromPartial(object.store) + : undefined; + message.iavl = + object.iavl !== undefined && object.iavl !== null + ? SnapshotIAVLItem.fromPartial(object.iavl) + : undefined; + message.extension = + object.extension !== undefined && object.extension !== null + ? SnapshotExtensionMeta.fromPartial(object.extension) + : undefined; + message.extensionPayload = + object.extensionPayload !== undefined && object.extensionPayload !== null + ? SnapshotExtensionPayload.fromPartial(object.extensionPayload) + : undefined; + return message; + }, +}; + +function createBaseSnapshotStoreItem(): SnapshotStoreItem { + return { + name: "", + }; +} + +export const SnapshotStoreItem = { + encode(message: SnapshotStoreItem, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotStoreItem { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSnapshotStoreItem(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): SnapshotStoreItem { + return { + name: isSet(object.name) ? String(object.name) : "", + }; + }, + + toJSON(message: SnapshotStoreItem): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + return obj; + }, + + fromPartial(object: DeepPartial): SnapshotStoreItem { + const message = createBaseSnapshotStoreItem(); + message.name = object.name ?? ""; + return message; + }, +}; + +function createBaseSnapshotIAVLItem(): SnapshotIAVLItem { + return { + key: new Uint8Array(), + value: new Uint8Array(), + version: Long.ZERO, + height: 0, + }; +} + +export const SnapshotIAVLItem = { + encode(message: SnapshotIAVLItem, writer: _m0.Writer = _m0.Writer.create()): _m0.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.version.isZero()) { + writer.uint32(24).int64(message.version); + } + + if (message.height !== 0) { + writer.uint32(32).int32(message.height); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotIAVLItem { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSnapshotIAVLItem(); + + 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.version = reader.int64() as Long; + break; + + case 4: + message.height = reader.int32(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): SnapshotIAVLItem { + return { + key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), + value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), + version: isSet(object.version) ? Long.fromValue(object.version) : Long.ZERO, + height: isSet(object.height) ? Number(object.height) : 0, + }; + }, + + toJSON(message: SnapshotIAVLItem): 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.version !== undefined && (obj.version = (message.version || Long.ZERO).toString()); + message.height !== undefined && (obj.height = Math.round(message.height)); + return obj; + }, + + fromPartial(object: DeepPartial): SnapshotIAVLItem { + const message = createBaseSnapshotIAVLItem(); + message.key = object.key ?? new Uint8Array(); + message.value = object.value ?? new Uint8Array(); + message.version = + object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; + message.height = object.height ?? 0; + return message; + }, +}; + +function createBaseSnapshotExtensionMeta(): SnapshotExtensionMeta { + return { + name: "", + format: 0, + }; +} + +export const SnapshotExtensionMeta = { + encode(message: SnapshotExtensionMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + + if (message.format !== 0) { + writer.uint32(16).uint32(message.format); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionMeta { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSnapshotExtensionMeta(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + + case 2: + message.format = reader.uint32(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): SnapshotExtensionMeta { + return { + name: isSet(object.name) ? String(object.name) : "", + format: isSet(object.format) ? Number(object.format) : 0, + }; + }, + + toJSON(message: SnapshotExtensionMeta): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.format !== undefined && (obj.format = Math.round(message.format)); + return obj; + }, + + fromPartial(object: DeepPartial): SnapshotExtensionMeta { + const message = createBaseSnapshotExtensionMeta(); + message.name = object.name ?? ""; + message.format = object.format ?? 0; + return message; + }, +}; + +function createBaseSnapshotExtensionPayload(): SnapshotExtensionPayload { + return { + payload: new Uint8Array(), + }; +} + +export const SnapshotExtensionPayload = { + encode(message: SnapshotExtensionPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.payload.length !== 0) { + writer.uint32(10).bytes(message.payload); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): SnapshotExtensionPayload { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSnapshotExtensionPayload(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.payload = reader.bytes(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): SnapshotExtensionPayload { + return { + payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(), + }; + }, + + toJSON(message: SnapshotExtensionPayload): unknown { + const obj: any = {}; + message.payload !== undefined && + (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : new Uint8Array())); + return obj; + }, + + fromPartial(object: DeepPartial): SnapshotExtensionPayload { + const message = createBaseSnapshotExtensionPayload(); + message.payload = object.payload ?? new Uint8Array(); + return message; + }, +}; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index b169cdfc..2c808f56 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -37,6 +37,23 @@ export interface QueryAllowancesResponse { pagination?: PageResponse; } +/** QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. */ + +export interface QueryAllowancesByGranterRequest { + granter: string; + /** pagination defines an pagination for the request. */ + + pagination?: PageRequest; +} +/** QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. */ + +export interface QueryAllowancesByGranterResponse { + /** allowances that have been issued by the granter. */ + allowances: Grant[]; + /** pagination defines an pagination for the response. */ + + pagination?: PageResponse; +} function createBaseQueryAllowanceRequest(): QueryAllowanceRequest { return { @@ -317,6 +334,158 @@ export const QueryAllowancesResponse = { return message; }, }; + +function createBaseQueryAllowancesByGranterRequest(): QueryAllowancesByGranterRequest { + return { + granter: "", + pagination: undefined, + }; +} + +export const QueryAllowancesByGranterRequest = { + encode(message: QueryAllowancesByGranterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.granter !== "") { + writer.uint32(10).string(message.granter); + } + + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryAllowancesByGranterRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.granter = reader.string(); + break; + + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): QueryAllowancesByGranterRequest { + return { + granter: isSet(object.granter) ? String(object.granter) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryAllowancesByGranterRequest): unknown { + const obj: any = {}; + message.granter !== undefined && (obj.granter = message.granter); + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { + const message = createBaseQueryAllowancesByGranterRequest(); + message.granter = object.granter ?? ""; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQueryAllowancesByGranterResponse(): QueryAllowancesByGranterResponse { + return { + allowances: [], + pagination: undefined, + }; +} + +export const QueryAllowancesByGranterResponse = { + encode(message: QueryAllowancesByGranterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.allowances) { + Grant.encode(v!, writer.uint32(10).fork()).ldelim(); + } + + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllowancesByGranterResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryAllowancesByGranterResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.allowances.push(Grant.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): QueryAllowancesByGranterResponse { + return { + allowances: Array.isArray(object?.allowances) + ? object.allowances.map((e: any) => Grant.fromJSON(e)) + : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryAllowancesByGranterResponse): unknown { + const obj: any = {}; + + if (message.allowances) { + obj.allowances = message.allowances.map((e) => (e ? Grant.toJSON(e) : undefined)); + } else { + obj.allowances = []; + } + + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { + const message = createBaseQueryAllowancesByGranterResponse(); + message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; /** Query defines the gRPC querier service. */ export interface Query { @@ -325,6 +494,12 @@ export interface Query { /** Allowances returns all the grants for address. */ Allowances(request: QueryAllowancesRequest): Promise; + /** + * AllowancesByGranter returns all the grants given by an address + * Since v0.46 + */ + + AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; @@ -333,6 +508,7 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Allowance = this.Allowance.bind(this); this.Allowances = this.Allowances.bind(this); + this.AllowancesByGranter = this.AllowancesByGranter.bind(this); } Allowance(request: QueryAllowanceRequest): Promise { @@ -346,4 +522,10 @@ export class QueryClientImpl implements Query { const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "Allowances", data); return promise.then((data) => QueryAllowancesResponse.decode(new _m0.Reader(data))); } + + AllowancesByGranter(request: QueryAllowancesByGranterRequest): Promise { + const data = QueryAllowancesByGranterRequest.encode(request).finish(); + const promise = this.rpc.request("cosmos.feegrant.v1beta1.Query", "AllowancesByGranter", data); + return promise.then((data) => QueryAllowancesByGranterResponse.decode(new _m0.Reader(data))); + } } diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index a238ae1f..62e76c81 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -32,6 +32,20 @@ export enum SignMode { * Amino JSON and will be removed in the future */ SIGN_MODE_LEGACY_AMINO_JSON = 127, + + /** + * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + * + * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + * but is not implemented on the SDK by default. To enable EIP-191, you need + * to pass a custom `TxConfig` that has an implementation of + * `SignModeHandler` for EIP-191. The SDK may decide to fully support + * EIP-191 in the future. + * + * Since: cosmos-sdk 0.45.2 + */ + SIGN_MODE_EIP_191 = 191, UNRECOGNIZED = -1, } export function signModeFromJSON(object: any): SignMode { @@ -52,6 +66,10 @@ export function signModeFromJSON(object: any): SignMode { case "SIGN_MODE_LEGACY_AMINO_JSON": return SignMode.SIGN_MODE_LEGACY_AMINO_JSON; + case 191: + case "SIGN_MODE_EIP_191": + return SignMode.SIGN_MODE_EIP_191; + case -1: case "UNRECOGNIZED": default: @@ -72,6 +90,9 @@ export function signModeToJSON(object: SignMode): string { case SignMode.SIGN_MODE_LEGACY_AMINO_JSON: return "SIGN_MODE_LEGACY_AMINO_JSON"; + case SignMode.SIGN_MODE_EIP_191: + return "SIGN_MODE_EIP_191"; + case SignMode.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 1c0eb060..279c1a15 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -3,8 +3,10 @@ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; +import { BlockID } from "../../../tendermint/types/types"; +import { Block } from "../../../tendermint/types/block"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ @@ -131,7 +133,7 @@ export function broadcastModeToJSON(object: BroadcastMode): string { export interface GetTxsEventRequest { /** events is the list of transaction event type. */ events: string[]; - /** pagination defines an pagination for the request. */ + /** pagination defines a pagination for the request. */ pagination?: PageRequest; orderBy: OrderBy; @@ -147,7 +149,7 @@ export interface GetTxsEventResponse { /** tx_responses is the list of queried TxResponses. */ txResponses: TxResponse[]; - /** pagination defines an pagination for the response. */ + /** pagination defines a pagination for the response. */ pagination?: PageResponse; } @@ -221,6 +223,35 @@ export interface GetTxResponse { txResponse?: TxResponse; } +/** + * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs + * RPC method. + * + * Since: cosmos-sdk 0.45.2 + */ + +export interface GetBlockWithTxsRequest { + /** height is the height of the block to query. */ + height: Long; + /** pagination defines a pagination for the request. */ + + pagination?: PageRequest; +} +/** + * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. + * + * Since: cosmos-sdk 0.45.2 + */ + +export interface GetBlockWithTxsResponse { + /** txs are the transactions in the block. */ + txs: Tx[]; + blockId?: BlockID; + block?: Block; + /** pagination defines a pagination for the response. */ + + pagination?: PageResponse; +} function createBaseGetTxsEventRequest(): GetTxsEventRequest { return { @@ -807,6 +838,186 @@ export const GetTxResponse = { return message; }, }; + +function createBaseGetBlockWithTxsRequest(): GetBlockWithTxsRequest { + return { + height: Long.ZERO, + pagination: undefined, + }; +} + +export const GetBlockWithTxsRequest = { + encode(message: GetBlockWithTxsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (!message.height.isZero()) { + writer.uint32(8).int64(message.height); + } + + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetBlockWithTxsRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.height = reader.int64() as Long; + break; + + case 2: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): GetBlockWithTxsRequest { + return { + height: isSet(object.height) ? Long.fromValue(object.height) : Long.ZERO, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: GetBlockWithTxsRequest): unknown { + const obj: any = {}; + message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString()); + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): GetBlockWithTxsRequest { + const message = createBaseGetBlockWithTxsRequest(); + message.height = + object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseGetBlockWithTxsResponse(): GetBlockWithTxsResponse { + return { + txs: [], + blockId: undefined, + block: undefined, + pagination: undefined, + }; +} + +export const GetBlockWithTxsResponse = { + encode(message: GetBlockWithTxsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.txs) { + Tx.encode(v!, writer.uint32(10).fork()).ldelim(); + } + + if (message.blockId !== undefined) { + BlockID.encode(message.blockId, writer.uint32(18).fork()).ldelim(); + } + + if (message.block !== undefined) { + Block.encode(message.block, writer.uint32(26).fork()).ldelim(); + } + + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(34).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetBlockWithTxsResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.txs.push(Tx.decode(reader, reader.uint32())); + break; + + case 2: + message.blockId = BlockID.decode(reader, reader.uint32()); + break; + + case 3: + message.block = Block.decode(reader, reader.uint32()); + break; + + case 4: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromJSON(object: any): GetBlockWithTxsResponse { + return { + txs: Array.isArray(object?.txs) ? object.txs.map((e: any) => Tx.fromJSON(e)) : [], + blockId: isSet(object.blockId) ? BlockID.fromJSON(object.blockId) : undefined, + block: isSet(object.block) ? Block.fromJSON(object.block) : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: GetBlockWithTxsResponse): unknown { + const obj: any = {}; + + if (message.txs) { + obj.txs = message.txs.map((e) => (e ? Tx.toJSON(e) : undefined)); + } else { + obj.txs = []; + } + + message.blockId !== undefined && + (obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined); + message.block !== undefined && (obj.block = message.block ? Block.toJSON(message.block) : undefined); + message.pagination !== undefined && + (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial(object: DeepPartial): GetBlockWithTxsResponse { + const message = createBaseGetBlockWithTxsResponse(); + message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; + message.blockId = + object.blockId !== undefined && object.blockId !== null + ? BlockID.fromPartial(object.blockId) + : undefined; + message.block = + object.block !== undefined && object.block !== null ? Block.fromPartial(object.block) : undefined; + message.pagination = + object.pagination !== undefined && object.pagination !== null + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; /** Service defines a gRPC service for interacting with transactions. */ export interface Service { @@ -821,6 +1032,13 @@ export interface Service { /** GetTxsEvent fetches txs by event. */ GetTxsEvent(request: GetTxsEventRequest): Promise; + /** + * GetBlockWithTxs fetches a block with decoded txs. + * + * Since: cosmos-sdk 0.45.2 + */ + + GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; } export class QueryClientImpl implements Service { private readonly rpc: Rpc; @@ -831,6 +1049,7 @@ export class QueryClientImpl implements Service { this.GetTx = this.GetTx.bind(this); this.BroadcastTx = this.BroadcastTx.bind(this); this.GetTxsEvent = this.GetTxsEvent.bind(this); + this.GetBlockWithTxs = this.GetBlockWithTxs.bind(this); } Simulate(request: SimulateRequest): Promise { @@ -856,4 +1075,10 @@ export class QueryClientImpl implements Service { const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetTxsEvent", data); return promise.then((data) => GetTxsEventResponse.decode(new _m0.Reader(data))); } + + GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise { + const data = GetBlockWithTxsRequest.encode(request).finish(); + const promise = this.rpc.request("cosmos.tx.v1beta1.Service", "GetBlockWithTxs", data); + return promise.then((data) => GetBlockWithTxsResponse.decode(new _m0.Reader(data))); + } } From 5e187726c976574bab29f8ebfe207b6f45c40afa Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 11:11:42 -0700 Subject: [PATCH 31/38] scope TS compiler memory issue to Google protos only --- scripts/codegen.js | 12 +++ src/confio/proofs.ts | 32 +++--- src/cosmos/auth/v1beta1/auth.ts | 8 +- src/cosmos/auth/v1beta1/genesis.ts | 4 +- src/cosmos/auth/v1beta1/query.ts | 14 +-- src/cosmos/authz/v1beta1/authz.ts | 8 +- src/cosmos/authz/v1beta1/genesis.ts | 4 +- src/cosmos/authz/v1beta1/query.ts | 22 +++-- src/cosmos/authz/v1beta1/tx.ts | 14 +-- src/cosmos/bank/v1beta1/authz.ts | 4 +- src/cosmos/bank/v1beta1/bank.ts | 16 +-- src/cosmos/bank/v1beta1/genesis.ts | 6 +- src/cosmos/bank/v1beta1/query.ts | 50 ++++++---- src/cosmos/bank/v1beta1/tx.ts | 10 +- src/cosmos/base/abci/v1beta1/abci.ts | 22 ++--- src/cosmos/base/kv/v1beta1/kv.ts | 6 +- src/cosmos/base/query/v1beta1/pagination.ts | 6 +- .../base/reflection/v1beta1/reflection.ts | 16 ++- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 18 ++-- src/cosmos/base/store/v1beta1/commit_info.ts | 8 +- src/cosmos/base/store/v1beta1/listening.ts | 4 +- src/cosmos/base/store/v1beta1/snapshot.ts | 8 +- src/cosmos/base/tendermint/v1beta1/query.ts | 42 +++++--- src/cosmos/base/v1beta1/coin.ts | 10 +- src/cosmos/capability/v1beta1/capability.ts | 8 +- src/cosmos/capability/v1beta1/genesis.ts | 6 +- src/cosmos/crisis/v1beta1/genesis.ts | 4 +- src/cosmos/crisis/v1beta1/tx.ts | 6 +- src/cosmos/crypto/ed25519/keys.ts | 6 +- src/cosmos/crypto/multisig/keys.ts | 4 +- .../crypto/multisig/v1beta1/multisig.ts | 6 +- src/cosmos/crypto/secp256k1/keys.ts | 6 +- .../distribution/v1beta1/distribution.ts | 38 ++++--- src/cosmos/distribution/v1beta1/genesis.ts | 30 ++++-- src/cosmos/distribution/v1beta1/query.ts | 68 ++++++++----- src/cosmos/distribution/v1beta1/tx.ts | 30 ++++-- src/cosmos/evidence/v1beta1/evidence.ts | 4 +- src/cosmos/evidence/v1beta1/genesis.ts | 4 +- src/cosmos/evidence/v1beta1/query.ts | 12 ++- src/cosmos/evidence/v1beta1/tx.ts | 8 +- src/cosmos/feegrant/v1beta1/feegrant.ts | 10 +- src/cosmos/feegrant/v1beta1/genesis.ts | 4 +- src/cosmos/feegrant/v1beta1/query.ts | 18 ++-- src/cosmos/feegrant/v1beta1/tx.ts | 10 +- src/cosmos/genutil/v1beta1/genesis.ts | 4 +- src/cosmos/gov/v1beta1/genesis.ts | 4 +- src/cosmos/gov/v1beta1/gov.ts | 19 ++-- src/cosmos/gov/v1beta1/query.ts | 36 +++---- src/cosmos/gov/v1beta1/tx.ts | 20 ++-- src/cosmos/mint/v1beta1/genesis.ts | 4 +- src/cosmos/mint/v1beta1/mint.ts | 6 +- src/cosmos/mint/v1beta1/query.ts | 18 ++-- src/cosmos/params/v1beta1/params.ts | 6 +- src/cosmos/params/v1beta1/query.ts | 6 +- src/cosmos/slashing/v1beta1/genesis.ts | 10 +- src/cosmos/slashing/v1beta1/query.ts | 20 ++-- src/cosmos/slashing/v1beta1/slashing.ts | 5 +- src/cosmos/slashing/v1beta1/tx.ts | 6 +- src/cosmos/staking/v1beta1/authz.ts | 8 +- src/cosmos/staking/v1beta1/genesis.ts | 6 +- src/cosmos/staking/v1beta1/query.ts | 94 +++++++++++------- src/cosmos/staking/v1beta1/staking.ts | 46 +++++---- src/cosmos/staking/v1beta1/tx.ts | 24 ++--- src/cosmos/tx/signing/v1beta1/signing.ts | 18 ++-- src/cosmos/tx/v1beta1/service.ts | 22 ++--- src/cosmos/tx/v1beta1/tx.ts | 22 ++--- src/cosmos/upgrade/v1beta1/query.ts | 30 ++++-- src/cosmos/upgrade/v1beta1/upgrade.ts | 12 ++- src/cosmos/vesting/v1beta1/tx.ts | 8 +- src/cosmos/vesting/v1beta1/vesting.ts | 16 +-- src/cosmwasm/wasm/v1/genesis.ts | 12 +-- src/cosmwasm/wasm/v1/ibc.ts | 6 +- src/cosmwasm/wasm/v1/proposal.ts | 28 +++--- src/cosmwasm/wasm/v1/query.ts | 66 +++++++++---- src/cosmwasm/wasm/v1/tx.ts | 32 +++--- src/cosmwasm/wasm/v1/types.ts | 20 ++-- .../controller/v1/controller.ts | 4 +- .../controller/v1/query.ts | 6 +- .../interchain_accounts/host/v1/host.ts | 4 +- .../interchain_accounts/host/v1/query.ts | 6 +- .../interchain_accounts/v1/account.ts | 4 +- .../interchain_accounts/v1/genesis.ts | 14 +-- .../interchain_accounts/v1/metadata.ts | 4 +- .../interchain_accounts/v1/packet.ts | 8 +- src/ibc/applications/transfer/v1/genesis.ts | 4 +- src/ibc/applications/transfer/v1/query.ts | 20 ++-- src/ibc/applications/transfer/v1/transfer.ts | 6 +- src/ibc/applications/transfer/v1/tx.ts | 6 +- src/ibc/applications/transfer/v2/packet.ts | 4 +- src/ibc/core/channel/v1/channel.ts | 14 +-- src/ibc/core/channel/v1/genesis.ts | 6 +- src/ibc/core/channel/v1/query.ts | 98 ++++++++++++++----- src/ibc/core/channel/v1/tx.ts | 54 ++++++---- src/ibc/core/client/v1/client.ts | 18 ++-- src/ibc/core/client/v1/genesis.ts | 10 +- src/ibc/core/client/v1/query.ts | 62 ++++++++---- src/ibc/core/client/v1/tx.ts | 20 ++-- src/ibc/core/commitment/v1/commitment.ts | 10 +- src/ibc/core/connection/v1/connection.ts | 16 +-- src/ibc/core/connection/v1/genesis.ts | 4 +- src/ibc/core/connection/v1/query.ts | 36 ++++--- src/ibc/core/connection/v1/tx.ts | 28 ++++-- src/ibc/core/types/v1/genesis.ts | 4 +- .../lightclients/localhost/v1/localhost.ts | 4 +- .../solomachine/v1/solomachine.ts | 40 ++++---- .../lightclients/tendermint/v1/tendermint.ts | 11 ++- src/tendermint/abci/types.ts | 97 +++++++++--------- src/tendermint/crypto/keys.ts | 4 +- src/tendermint/crypto/proof.ts | 12 +-- src/tendermint/p2p/types.ts | 10 +- src/tendermint/types/block.ts | 4 +- src/tendermint/types/evidence.ts | 12 ++- src/tendermint/types/params.ts | 14 +-- src/tendermint/types/types.ts | 27 ++--- src/tendermint/types/validator.ts | 8 +- src/tendermint/version/types.ts | 6 +- 116 files changed, 1173 insertions(+), 806 deletions(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index 0367c5fb..624099ad 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -54,6 +54,8 @@ telescope({ toJSON: true }, typingsFormat: { + useDeepPartial: true, + useExact: true, timestamp: 'timestamp', duration: 'duration' } @@ -69,6 +71,16 @@ telescope({ }, aminoEncoding: { enabled: false + }, + packages: { + google: { + prototypes: { + typingsFormat: { + useDeepPartial: true, + useExact: false + } + }, + } } } }).then(() => { diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 7e7cd637..4b620f08 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; 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. */ @@ -467,7 +467,7 @@ export const ExistenceProof = { return obj; }, - fromPartial(object: DeepPartial): ExistenceProof { + fromPartial, I>>(object: I): ExistenceProof { const message = createBaseExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -551,7 +551,7 @@ export const NonExistenceProof = { return obj; }, - fromPartial(object: DeepPartial): NonExistenceProof { + fromPartial, I>>(object: I): NonExistenceProof { const message = createBaseNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = @@ -649,7 +649,7 @@ export const CommitmentProof = { return obj; }, - fromPartial(object: DeepPartial): CommitmentProof { + fromPartial, I>>(object: I): CommitmentProof { const message = createBaseCommitmentProof(); message.exist = object.exist !== undefined && object.exist !== null @@ -763,7 +763,7 @@ export const LeafOp = { return obj; }, - fromPartial(object: DeepPartial): LeafOp { + fromPartial, I>>(object: I): LeafOp { const message = createBaseLeafOp(); message.hash = object.hash ?? 0; message.prehashKey = object.prehashKey ?? 0; @@ -847,7 +847,7 @@ export const InnerOp = { return obj; }, - fromPartial(object: DeepPartial): InnerOp { + fromPartial, I>>(object: I): InnerOp { const message = createBaseInnerOp(); message.hash = object.hash ?? 0; message.prefix = object.prefix ?? new Uint8Array(); @@ -940,7 +940,7 @@ export const ProofSpec = { return obj; }, - fromPartial(object: DeepPartial): ProofSpec { + fromPartial, I>>(object: I): ProofSpec { const message = createBaseProofSpec(); message.leafSpec = object.leafSpec !== undefined && object.leafSpec !== null @@ -1082,7 +1082,7 @@ export const InnerSpec = { return obj; }, - fromPartial(object: DeepPartial): InnerSpec { + fromPartial, I>>(object: I): InnerSpec { const message = createBaseInnerSpec(); message.childOrder = object.childOrder?.map((e) => e) || []; message.childSize = object.childSize ?? 0; @@ -1149,7 +1149,7 @@ export const BatchProof = { return obj; }, - fromPartial(object: DeepPartial): BatchProof { + fromPartial, I>>(object: I): BatchProof { const message = createBaseBatchProof(); message.entries = object.entries?.map((e) => BatchEntry.fromPartial(e)) || []; return message; @@ -1218,7 +1218,7 @@ export const BatchEntry = { return obj; }, - fromPartial(object: DeepPartial): BatchEntry { + fromPartial, I>>(object: I): BatchEntry { const message = createBaseBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1307,7 +1307,7 @@ export const CompressedBatchProof = { return obj; }, - fromPartial(object: DeepPartial): CompressedBatchProof { + fromPartial, I>>(object: I): CompressedBatchProof { const message = createBaseCompressedBatchProof(); message.entries = object.entries?.map((e) => CompressedBatchEntry.fromPartial(e)) || []; message.lookupInners = object.lookupInners?.map((e) => InnerOp.fromPartial(e)) || []; @@ -1377,7 +1377,7 @@ export const CompressedBatchEntry = { return obj; }, - fromPartial(object: DeepPartial): CompressedBatchEntry { + fromPartial, I>>(object: I): CompressedBatchEntry { const message = createBaseCompressedBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1493,7 +1493,9 @@ export const CompressedExistenceProof = { return obj; }, - fromPartial(object: DeepPartial): CompressedExistenceProof { + fromPartial, I>>( + object: I, + ): CompressedExistenceProof { const message = createBaseCompressedExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -1578,7 +1580,9 @@ export const CompressedNonExistenceProof = { return obj; }, - fromPartial(object: DeepPartial): CompressedNonExistenceProof { + fromPartial, I>>( + object: I, + ): CompressedNonExistenceProof { const message = createBaseCompressedNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index a84c85f6..1cddc1a2 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * BaseAccount defines a base account type. It contains all the necessary fields @@ -116,7 +116,7 @@ export const BaseAccount = { return obj; }, - fromPartial(object: DeepPartial): BaseAccount { + fromPartial, I>>(object: I): BaseAccount { const message = createBaseBaseAccount(); message.address = object.address ?? ""; message.pubKey = @@ -211,7 +211,7 @@ export const ModuleAccount = { return obj; }, - fromPartial(object: DeepPartial): ModuleAccount { + fromPartial, I>>(object: I): ModuleAccount { const message = createBaseModuleAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -328,7 +328,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 15332a95..113ff256 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -3,7 +3,7 @@ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** GenesisState defines the auth module's genesis state. */ @@ -81,7 +81,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index dc870dfe..3cc46570 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -101,7 +101,7 @@ export const QueryAccountsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAccountsRequest { + fromPartial, I>>(object: I): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -178,7 +178,7 @@ export const QueryAccountsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAccountsResponse { + fromPartial, I>>(object: I): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); message.accounts = object.accounts?.map((e) => Any.fromPartial(e)) || []; message.pagination = @@ -238,7 +238,7 @@ export const QueryAccountRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAccountRequest { + fromPartial, I>>(object: I): QueryAccountRequest { const message = createBaseQueryAccountRequest(); message.address = object.address ?? ""; return message; @@ -295,7 +295,7 @@ export const QueryAccountResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAccountResponse { + fromPartial, I>>(object: I): QueryAccountResponse { const message = createBaseQueryAccountResponse(); message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; @@ -339,7 +339,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -394,7 +394,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 9130a2e8..1975e211 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -3,7 +3,7 @@ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * GenericAuthorization gives the grantee unrestricted permissions to execute @@ -86,7 +86,7 @@ export const GenericAuthorization = { return obj; }, - fromPartial(object: DeepPartial): GenericAuthorization { + fromPartial, I>>(object: I): GenericAuthorization { const message = createBaseGenericAuthorization(); message.msg = object.msg ?? ""; return message; @@ -154,7 +154,7 @@ export const Grant = { return obj; }, - fromPartial(object: DeepPartial): Grant { + fromPartial, I>>(object: I): Grant { const message = createBaseGrant(); message.authorization = object.authorization !== undefined && object.authorization !== null @@ -251,7 +251,7 @@ export const GrantAuthorization = { return obj; }, - fromPartial(object: DeepPartial): GrantAuthorization { + fromPartial, I>>(object: I): GrantAuthorization { const message = createBaseGrantAuthorization(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 5196c2a0..42ccae5a 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial } from "../../../helpers"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** GenesisState defines the authz module's genesis state. */ @@ -67,7 +67,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.authorization = object.authorization?.map((e) => GrantAuthorization.fromPartial(e)) || []; return message; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 3d5adeb9..828da480 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ @@ -144,7 +144,7 @@ export const QueryGrantsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryGrantsRequest { + fromPartial, I>>(object: I): QueryGrantsRequest { const message = createBaseQueryGrantsRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -224,7 +224,7 @@ export const QueryGrantsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryGrantsResponse { + fromPartial, I>>(object: I): QueryGrantsResponse { const message = createBaseQueryGrantsResponse(); message.grants = object.grants?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -296,7 +296,9 @@ export const QueryGranterGrantsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryGranterGrantsRequest { + fromPartial, I>>( + object: I, + ): QueryGranterGrantsRequest { const message = createBaseQueryGranterGrantsRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -376,7 +378,9 @@ export const QueryGranterGrantsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryGranterGrantsResponse { + fromPartial, I>>( + object: I, + ): QueryGranterGrantsResponse { const message = createBaseQueryGranterGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = @@ -448,7 +452,9 @@ export const QueryGranteeGrantsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryGranteeGrantsRequest { + fromPartial, I>>( + object: I, + ): QueryGranteeGrantsRequest { const message = createBaseQueryGranteeGrantsRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -528,7 +534,9 @@ export const QueryGranteeGrantsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryGranteeGrantsResponse { + fromPartial, I>>( + object: I, + ): QueryGranteeGrantsResponse { const message = createBaseQueryGranteeGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 3763322a..725c3867 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -3,7 +3,7 @@ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee @@ -124,7 +124,7 @@ export const MsgGrant = { return obj; }, - fromPartial(object: DeepPartial): MsgGrant { + fromPartial, I>>(object: I): MsgGrant { const message = createBaseMsgGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -189,7 +189,7 @@ export const MsgExecResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgExecResponse { + fromPartial, I>>(object: I): MsgExecResponse { const message = createBaseMsgExecResponse(); message.results = object.results?.map((e) => e) || []; return message; @@ -262,7 +262,7 @@ export const MsgExec = { return obj; }, - fromPartial(object: DeepPartial): MsgExec { + fromPartial, I>>(object: I): MsgExec { const message = createBaseMsgExec(); message.grantee = object.grantee ?? ""; message.msgs = object.msgs?.map((e) => Any.fromPartial(e)) || []; @@ -306,7 +306,7 @@ export const MsgGrantResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgGrantResponse { + fromPartial, I>>(_: I): MsgGrantResponse { const message = createBaseMsgGrantResponse(); return message; }, @@ -383,7 +383,7 @@ export const MsgRevoke = { return obj; }, - fromPartial(object: DeepPartial): MsgRevoke { + fromPartial, I>>(object: I): MsgRevoke { const message = createBaseMsgRevoke(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -428,7 +428,7 @@ export const MsgRevokeResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgRevokeResponse { + fromPartial, I>>(_: I): MsgRevokeResponse { const message = createBaseMsgRevokeResponse(); return message; }, diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index 27d6d834..b61ae105 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial } from "../../../helpers"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** * SendAuthorization allows the grantee to spend up to spend_limit coins from @@ -72,7 +72,7 @@ export const SendAuthorization = { return obj; }, - fromPartial(object: DeepPartial): SendAuthorization { + fromPartial, I>>(object: I): SendAuthorization { const message = createBaseSendAuthorization(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 83fad1da..278208a0 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** Params defines the parameters for the bank module. */ @@ -167,7 +167,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled?.map((e) => SendEnabled.fromPartial(e)) || []; message.defaultSendEnabled = object.defaultSendEnabled ?? false; @@ -235,7 +235,7 @@ export const SendEnabled = { return obj; }, - fromPartial(object: DeepPartial): SendEnabled { + fromPartial, I>>(object: I): SendEnabled { const message = createBaseSendEnabled(); message.denom = object.denom ?? ""; message.enabled = object.enabled ?? false; @@ -309,7 +309,7 @@ export const Input = { return obj; }, - fromPartial(object: DeepPartial): Input { + fromPartial, I>>(object: I): Input { const message = createBaseInput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -383,7 +383,7 @@ export const Output = { return obj; }, - fromPartial(object: DeepPartial): Output { + fromPartial, I>>(object: I): Output { const message = createBaseOutput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -446,7 +446,7 @@ export const Supply = { return obj; }, - fromPartial(object: DeepPartial): Supply { + fromPartial, I>>(object: I): Supply { const message = createBaseSupply(); message.total = object.total?.map((e) => Coin.fromPartial(e)) || []; return message; @@ -530,7 +530,7 @@ export const DenomUnit = { return obj; }, - fromPartial(object: DeepPartial): DenomUnit { + fromPartial, I>>(object: I): DenomUnit { const message = createBaseDenomUnit(); message.denom = object.denom ?? ""; message.exponent = object.exponent ?? 0; @@ -651,7 +651,7 @@ export const Metadata = { return obj; }, - fromPartial(object: DeepPartial): Metadata { + fromPartial, I>>(object: I): Metadata { const message = createBaseMetadata(); message.description = object.description ?? ""; message.denomUnits = object.denomUnits?.map((e) => DenomUnit.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index fc071b7a..ceec77b2 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -3,7 +3,7 @@ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** GenesisState defines the bank module's genesis state. */ @@ -136,7 +136,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -213,7 +213,7 @@ export const Balance = { return obj; }, - fromPartial(object: DeepPartial): Balance { + fromPartial, I>>(object: I): Balance { const message = createBaseBalance(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index bd5148f6..5e01d985 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; import { Params, Metadata } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ @@ -209,7 +209,7 @@ export const QueryBalanceRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryBalanceRequest { + fromPartial, I>>(object: I): QueryBalanceRequest { const message = createBaseQueryBalanceRequest(); message.address = object.address ?? ""; message.denom = object.denom ?? ""; @@ -267,7 +267,7 @@ export const QueryBalanceResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryBalanceResponse { + fromPartial, I>>(object: I): QueryBalanceResponse { const message = createBaseQueryBalanceResponse(); message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; @@ -336,7 +336,7 @@ export const QueryAllBalancesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllBalancesRequest { + fromPartial, I>>(object: I): QueryAllBalancesRequest { const message = createBaseQueryAllBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -414,7 +414,9 @@ export const QueryAllBalancesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllBalancesResponse { + fromPartial, I>>( + object: I, + ): QueryAllBalancesResponse { const message = createBaseQueryAllBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -486,7 +488,9 @@ export const QuerySpendableBalancesRequest = { return obj; }, - fromPartial(object: DeepPartial): QuerySpendableBalancesRequest { + fromPartial, I>>( + object: I, + ): QuerySpendableBalancesRequest { const message = createBaseQuerySpendableBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -564,7 +568,9 @@ export const QuerySpendableBalancesResponse = { return obj; }, - fromPartial(object: DeepPartial): QuerySpendableBalancesResponse { + fromPartial, I>>( + object: I, + ): QuerySpendableBalancesResponse { const message = createBaseQuerySpendableBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -625,7 +631,7 @@ export const QueryTotalSupplyRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryTotalSupplyRequest { + fromPartial, I>>(object: I): QueryTotalSupplyRequest { const message = createBaseQueryTotalSupplyRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -702,7 +708,9 @@ export const QueryTotalSupplyResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryTotalSupplyResponse { + fromPartial, I>>( + object: I, + ): QueryTotalSupplyResponse { const message = createBaseQueryTotalSupplyResponse(); message.supply = object.supply?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -762,7 +770,7 @@ export const QuerySupplyOfRequest = { return obj; }, - fromPartial(object: DeepPartial): QuerySupplyOfRequest { + fromPartial, I>>(object: I): QuerySupplyOfRequest { const message = createBaseQuerySupplyOfRequest(); message.denom = object.denom ?? ""; return message; @@ -818,7 +826,7 @@ export const QuerySupplyOfResponse = { return obj; }, - fromPartial(object: DeepPartial): QuerySupplyOfResponse { + fromPartial, I>>(object: I): QuerySupplyOfResponse { const message = createBaseQuerySupplyOfResponse(); message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; @@ -862,7 +870,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -917,7 +925,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -975,7 +983,9 @@ export const QueryDenomsMetadataRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomsMetadataRequest { + fromPartial, I>>( + object: I, + ): QueryDenomsMetadataRequest { const message = createBaseQueryDenomsMetadataRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1054,7 +1064,9 @@ export const QueryDenomsMetadataResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomsMetadataResponse { + fromPartial, I>>( + object: I, + ): QueryDenomsMetadataResponse { const message = createBaseQueryDenomsMetadataResponse(); message.metadatas = object.metadatas?.map((e) => Metadata.fromPartial(e)) || []; message.pagination = @@ -1114,7 +1126,9 @@ export const QueryDenomMetadataRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomMetadataRequest { + fromPartial, I>>( + object: I, + ): QueryDenomMetadataRequest { const message = createBaseQueryDenomMetadataRequest(); message.denom = object.denom ?? ""; return message; @@ -1171,7 +1185,9 @@ export const QueryDenomMetadataResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomMetadataResponse { + fromPartial, I>>( + object: I, + ): QueryDenomMetadataResponse { const message = createBaseQueryDenomMetadataResponse(); message.metadata = object.metadata !== undefined && object.metadata !== null diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index d5fc4066..4beb0925 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -3,7 +3,7 @@ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** MsgSend represents a message to send coins from one account to another. */ @@ -102,7 +102,7 @@ export const MsgSend = { return obj; }, - fromPartial(object: DeepPartial): MsgSend { + fromPartial, I>>(object: I): MsgSend { const message = createBaseMsgSend(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -147,7 +147,7 @@ export const MsgSendResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgSendResponse { + fromPartial, I>>(_: I): MsgSendResponse { const message = createBaseMsgSendResponse(); return message; }, @@ -224,7 +224,7 @@ export const MsgMultiSend = { return obj; }, - fromPartial(object: DeepPartial): MsgMultiSend { + fromPartial, I>>(object: I): MsgMultiSend { const message = createBaseMsgMultiSend(); message.inputs = object.inputs?.map((e) => Input.fromPartial(e)) || []; message.outputs = object.outputs?.map((e) => Output.fromPartial(e)) || []; @@ -268,7 +268,7 @@ export const MsgMultiSendResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgMultiSendResponse { + fromPartial, I>>(_: I): MsgMultiSendResponse { const message = createBaseMsgMultiSendResponse(); return message; }, diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index d3ff39b0..9ac05eba 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -3,7 +3,7 @@ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.abci.v1beta1"; /** * TxResponse defines a structure containing relevant tx data and metadata. The @@ -362,7 +362,7 @@ export const TxResponse = { return obj; }, - fromPartial(object: DeepPartial): TxResponse { + fromPartial, I>>(object: I): TxResponse { const message = createBaseTxResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -463,7 +463,7 @@ export const ABCIMessageLog = { return obj; }, - fromPartial(object: DeepPartial): ABCIMessageLog { + fromPartial, I>>(object: I): ABCIMessageLog { const message = createBaseABCIMessageLog(); message.msgIndex = object.msgIndex ?? 0; message.log = object.log ?? ""; @@ -540,7 +540,7 @@ export const StringEvent = { return obj; }, - fromPartial(object: DeepPartial): StringEvent { + fromPartial, I>>(object: I): StringEvent { const message = createBaseStringEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; @@ -608,7 +608,7 @@ export const Attribute = { return obj; }, - fromPartial(object: DeepPartial): Attribute { + fromPartial, I>>(object: I): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -676,7 +676,7 @@ export const GasInfo = { return obj; }, - fromPartial(object: DeepPartial): GasInfo { + fromPartial, I>>(object: I): GasInfo { const message = createBaseGasInfo(); message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null @@ -766,7 +766,7 @@ export const Result = { return obj; }, - fromPartial(object: DeepPartial): Result { + fromPartial, I>>(object: I): Result { const message = createBaseResult(); message.data = object.data ?? new Uint8Array(); message.log = object.log ?? ""; @@ -836,7 +836,7 @@ export const SimulationResponse = { return obj; }, - fromPartial(object: DeepPartial): SimulationResponse { + fromPartial, I>>(object: I): SimulationResponse { const message = createBaseSimulationResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -909,7 +909,7 @@ export const MsgData = { return obj; }, - fromPartial(object: DeepPartial): MsgData { + fromPartial, I>>(object: I): MsgData { const message = createBaseMsgData(); message.msgType = object.msgType ?? ""; message.data = object.data ?? new Uint8Array(); @@ -972,7 +972,7 @@ export const TxMsgData = { return obj; }, - fromPartial(object: DeepPartial): TxMsgData { + fromPartial, I>>(object: I): TxMsgData { const message = createBaseTxMsgData(); message.data = object.data?.map((e) => MsgData.fromPartial(e)) || []; return message; @@ -1089,7 +1089,7 @@ export const SearchTxsResult = { return obj; }, - fromPartial(object: DeepPartial): SearchTxsResult { + fromPartial, I>>(object: I): SearchTxsResult { const message = createBaseSearchTxsResult(); message.totalCount = object.totalCount !== undefined && object.totalCount !== null diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index 10added8..7751aa40 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.kv.v1beta1"; /** Pairs defines a repeated slice of Pair objects. */ @@ -70,7 +70,7 @@ export const Pairs = { return obj; }, - fromPartial(object: DeepPartial): Pairs { + fromPartial, I>>(object: I): Pairs { const message = createBasePairs(); message.pairs = object.pairs?.map((e) => Pair.fromPartial(e)) || []; return message; @@ -139,7 +139,7 @@ export const Pair = { return obj; }, - fromPartial(object: DeepPartial): Pair { + fromPartial, I>>(object: I): Pair { const message = createBasePair(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index 1af7c24f..d819f887 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.query.v1beta1"; /** * PageRequest is to be embedded in gRPC request messages for efficient @@ -167,7 +167,7 @@ export const PageRequest = { return obj; }, - fromPartial(object: DeepPartial): PageRequest { + fromPartial, I>>(object: I): PageRequest { const message = createBasePageRequest(); message.key = object.key ?? new Uint8Array(); message.offset = @@ -241,7 +241,7 @@ export const PageResponse = { return obj; }, - fromPartial(object: DeepPartial): PageResponse { + fromPartial, I>>(object: I): PageResponse { const message = createBasePageResponse(); message.nextKey = object.nextKey ?? new Uint8Array(); message.total = diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 5d13ab02..14ea6f61 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet } from "../../../../helpers"; +import { DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ @@ -66,7 +66,7 @@ export const ListAllInterfacesRequest = { return obj; }, - fromPartial(_: DeepPartial): ListAllInterfacesRequest { + fromPartial, I>>(_: I): ListAllInterfacesRequest { const message = createBaseListAllInterfacesRequest(); return message; }, @@ -129,7 +129,9 @@ export const ListAllInterfacesResponse = { return obj; }, - fromPartial(object: DeepPartial): ListAllInterfacesResponse { + fromPartial, I>>( + object: I, + ): ListAllInterfacesResponse { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interfaceNames?.map((e) => e) || []; return message; @@ -185,7 +187,9 @@ export const ListImplementationsRequest = { return obj; }, - fromPartial(object: DeepPartial): ListImplementationsRequest { + fromPartial, I>>( + object: I, + ): ListImplementationsRequest { const message = createBaseListImplementationsRequest(); message.interfaceName = object.interfaceName ?? ""; return message; @@ -249,7 +253,9 @@ export const ListImplementationsResponse = { return obj; }, - fromPartial(object: DeepPartial): ListImplementationsResponse { + fromPartial, I>>( + object: I, + ): ListImplementationsResponse { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementationMessageNames?.map((e) => e) || []; return message; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 87914262..1493f525 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.snapshots.v1beta1"; /** Snapshot contains Tendermint state sync snapshot info. */ @@ -150,7 +150,7 @@ export const Snapshot = { return obj; }, - fromPartial(object: DeepPartial): Snapshot { + fromPartial, I>>(object: I): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -224,7 +224,7 @@ export const Metadata = { return obj; }, - fromPartial(object: DeepPartial): Metadata { + fromPartial, I>>(object: I): Metadata { const message = createBaseMetadata(); message.chunkHashes = object.chunkHashes?.map((e) => e) || []; return message; @@ -321,7 +321,7 @@ export const SnapshotItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotItem { + fromPartial, I>>(object: I): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -392,7 +392,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotStoreItem { + fromPartial, I>>(object: I): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -483,7 +483,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotIAVLItem { + fromPartial, I>>(object: I): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -554,7 +554,7 @@ export const SnapshotExtensionMeta = { return obj; }, - fromPartial(object: DeepPartial): SnapshotExtensionMeta { + fromPartial, I>>(object: I): SnapshotExtensionMeta { const message = createBaseSnapshotExtensionMeta(); message.name = object.name ?? ""; message.format = object.format ?? 0; @@ -612,7 +612,9 @@ export const SnapshotExtensionPayload = { return obj; }, - fromPartial(object: DeepPartial): SnapshotExtensionPayload { + fromPartial, I>>( + object: I, + ): SnapshotExtensionPayload { const message = createBaseSnapshotExtensionPayload(); message.payload = object.payload ?? new Uint8Array(); return message; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 7cd6c0fd..4e0565d9 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * CommitInfo defines commit information used by the multi-store when committing @@ -99,7 +99,7 @@ export const CommitInfo = { return obj; }, - fromPartial(object: DeepPartial): CommitInfo { + fromPartial, I>>(object: I): CommitInfo { const message = createBaseCommitInfo(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; @@ -169,7 +169,7 @@ export const StoreInfo = { return obj; }, - fromPartial(object: DeepPartial): StoreInfo { + fromPartial, I>>(object: I): StoreInfo { const message = createBaseStoreInfo(); message.name = object.name ?? ""; message.commitId = @@ -241,7 +241,7 @@ export const CommitID = { return obj; }, - fromPartial(object: DeepPartial): CommitID { + fromPartial, I>>(object: I): CommitID { const message = createBaseCommitID(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index 57f0ec3d..fb494237 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) @@ -105,7 +105,7 @@ export const StoreKVPair = { return obj; }, - fromPartial(object: DeepPartial): StoreKVPair { + fromPartial, I>>(object: I): StoreKVPair { const message = createBaseStoreKVPair(); message.storeKey = object.storeKey ?? ""; message.delete = object.delete ?? false; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 32c0424d..5c32497b 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ @@ -85,7 +85,7 @@ export const SnapshotItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotItem { + fromPartial, I>>(object: I): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -148,7 +148,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotStoreItem { + fromPartial, I>>(object: I): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -239,7 +239,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial(object: DeepPartial): SnapshotIAVLItem { + fromPartial, I>>(object: I): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 1eefb189..fad4d1d3 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -6,7 +6,7 @@ import { BlockID } from "../../../../tendermint/types/types"; import { Block } from "../../../../tendermint/types/block"; import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.tendermint.v1beta1"; /** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ @@ -173,7 +173,9 @@ export const GetValidatorSetByHeightRequest = { return obj; }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightRequest { + fromPartial, I>>( + object: I, + ): GetValidatorSetByHeightRequest { const message = createBaseGetValidatorSetByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -265,7 +267,9 @@ export const GetValidatorSetByHeightResponse = { return obj; }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightResponse { + fromPartial, I>>( + object: I, + ): GetValidatorSetByHeightResponse { const message = createBaseGetValidatorSetByHeightResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -330,7 +334,9 @@ export const GetLatestValidatorSetRequest = { return obj; }, - fromPartial(object: DeepPartial): GetLatestValidatorSetRequest { + fromPartial, I>>( + object: I, + ): GetLatestValidatorSetRequest { const message = createBaseGetLatestValidatorSetRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -420,7 +426,9 @@ export const GetLatestValidatorSetResponse = { return obj; }, - fromPartial(object: DeepPartial): GetLatestValidatorSetResponse { + fromPartial, I>>( + object: I, + ): GetLatestValidatorSetResponse { const message = createBaseGetLatestValidatorSetResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -518,7 +526,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial, I>>(object: I): Validator { const message = createBaseValidator(); message.address = object.address ?? ""; message.pubKey = @@ -584,7 +592,7 @@ export const GetBlockByHeightRequest = { return obj; }, - fromPartial(object: DeepPartial): GetBlockByHeightRequest { + fromPartial, I>>(object: I): GetBlockByHeightRequest { const message = createBaseGetBlockByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -653,7 +661,9 @@ export const GetBlockByHeightResponse = { return obj; }, - fromPartial(object: DeepPartial): GetBlockByHeightResponse { + fromPartial, I>>( + object: I, + ): GetBlockByHeightResponse { const message = createBaseGetBlockByHeightResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -701,7 +711,7 @@ export const GetLatestBlockRequest = { return obj; }, - fromPartial(_: DeepPartial): GetLatestBlockRequest { + fromPartial, I>>(_: I): GetLatestBlockRequest { const message = createBaseGetLatestBlockRequest(); return message; }, @@ -768,7 +778,7 @@ export const GetLatestBlockResponse = { return obj; }, - fromPartial(object: DeepPartial): GetLatestBlockResponse { + fromPartial, I>>(object: I): GetLatestBlockResponse { const message = createBaseGetLatestBlockResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -816,7 +826,7 @@ export const GetSyncingRequest = { return obj; }, - fromPartial(_: DeepPartial): GetSyncingRequest { + fromPartial, I>>(_: I): GetSyncingRequest { const message = createBaseGetSyncingRequest(); return message; }, @@ -871,7 +881,7 @@ export const GetSyncingResponse = { return obj; }, - fromPartial(object: DeepPartial): GetSyncingResponse { + fromPartial, I>>(object: I): GetSyncingResponse { const message = createBaseGetSyncingResponse(); message.syncing = object.syncing ?? false; return message; @@ -914,7 +924,7 @@ export const GetNodeInfoRequest = { return obj; }, - fromPartial(_: DeepPartial): GetNodeInfoRequest { + fromPartial, I>>(_: I): GetNodeInfoRequest { const message = createBaseGetNodeInfoRequest(); return message; }, @@ -990,7 +1000,7 @@ export const GetNodeInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): GetNodeInfoResponse { + fromPartial, I>>(object: I): GetNodeInfoResponse { const message = createBaseGetNodeInfoResponse(); message.defaultNodeInfo = object.defaultNodeInfo !== undefined && object.defaultNodeInfo !== null @@ -1136,7 +1146,7 @@ export const VersionInfo = { return obj; }, - fromPartial(object: DeepPartial): VersionInfo { + fromPartial, I>>(object: I): VersionInfo { const message = createBaseVersionInfo(); message.name = object.name ?? ""; message.appName = object.appName ?? ""; @@ -1221,7 +1231,7 @@ export const Module = { return obj; }, - fromPartial(object: DeepPartial): Module { + fromPartial, I>>(object: I): Module { const message = createBaseModule(); message.path = object.path ?? ""; message.version = object.version ?? ""; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index cfa5483c..c111ef98 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.base.v1beta1"; /** * Coin defines a token with a denomination and an amount. @@ -96,7 +96,7 @@ export const Coin = { return obj; }, - fromPartial(object: DeepPartial): Coin { + fromPartial, I>>(object: I): Coin { const message = createBaseCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -164,7 +164,7 @@ export const DecCoin = { return obj; }, - fromPartial(object: DeepPartial): DecCoin { + fromPartial, I>>(object: I): DecCoin { const message = createBaseDecCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -221,7 +221,7 @@ export const IntProto = { return obj; }, - fromPartial(object: DeepPartial): IntProto { + fromPartial, I>>(object: I): IntProto { const message = createBaseIntProto(); message.int = object.int ?? ""; return message; @@ -277,7 +277,7 @@ export const DecProto = { return obj; }, - fromPartial(object: DeepPartial): DecProto { + fromPartial, I>>(object: I): DecProto { const message = createBaseDecProto(); message.dec = object.dec ?? ""; return message; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index 767a72d0..df39bfe3 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** * Capability defines an implementation of an object capability. The index @@ -78,7 +78,7 @@ export const Capability = { return obj; }, - fromPartial(object: DeepPartial): Capability { + fromPartial, I>>(object: I): Capability { const message = createBaseCapability(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -146,7 +146,7 @@ export const Owner = { return obj; }, - fromPartial(object: DeepPartial): Owner { + fromPartial, I>>(object: I): Owner { const message = createBaseOwner(); message.module = object.module ?? ""; message.name = object.name ?? ""; @@ -209,7 +209,7 @@ export const CapabilityOwners = { return obj; }, - fromPartial(object: DeepPartial): CapabilityOwners { + fromPartial, I>>(object: I): CapabilityOwners { const message = createBaseCapabilityOwners(); message.owners = object.owners?.map((e) => Owner.fromPartial(e)) || []; return message; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index ce2ebb5d..38f61d28 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** GenesisOwners defines the capability owners with their corresponding index. */ @@ -87,7 +87,7 @@ export const GenesisOwners = { return obj; }, - fromPartial(object: DeepPartial): GenesisOwners { + fromPartial, I>>(object: I): GenesisOwners { const message = createBaseGenesisOwners(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -165,7 +165,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index ee39c46f..3fb0e3b4 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** GenesisState defines the crisis module's genesis state. */ @@ -64,7 +64,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.constantFee = object.constantFee !== undefined && object.constantFee !== null diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index 4221e532..a35456b7 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** MsgVerifyInvariant represents a message to verify a particular invariance. */ @@ -85,7 +85,7 @@ export const MsgVerifyInvariant = { return obj; }, - fromPartial(object: DeepPartial): MsgVerifyInvariant { + fromPartial, I>>(object: I): MsgVerifyInvariant { const message = createBaseMsgVerifyInvariant(); message.sender = object.sender ?? ""; message.invariantModuleName = object.invariantModuleName ?? ""; @@ -130,7 +130,7 @@ export const MsgVerifyInvariantResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgVerifyInvariantResponse { + fromPartial, I>>(_: I): MsgVerifyInvariantResponse { const message = createBaseMsgVerifyInvariantResponse(); return message; }, diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index e3249392..5d91bf77 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.ed25519"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. @@ -73,7 +73,7 @@ export const PubKey = { return obj; }, - fromPartial(object: DeepPartial): PubKey { + fromPartial, I>>(object: I): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -130,7 +130,7 @@ export const PrivKey = { return obj; }, - fromPartial(object: DeepPartial): PrivKey { + fromPartial, I>>(object: I): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index ade2b281..bf5fce2e 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig"; /** * LegacyAminoPubKey specifies a public key type @@ -81,7 +81,7 @@ export const LegacyAminoPubKey = { return obj; }, - fromPartial(object: DeepPartial): LegacyAminoPubKey { + fromPartial, I>>(object: I): LegacyAminoPubKey { const message = createBaseLegacyAminoPubKey(); message.threshold = object.threshold ?? 0; message.publicKeys = object.publicKeys?.map((e) => Any.fromPartial(e)) || []; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 6387c990..78cf2176 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial, isSet } from "../../../../helpers"; +import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. @@ -81,7 +81,7 @@ export const MultiSignature = { return obj; }, - fromPartial(object: DeepPartial): MultiSignature { + fromPartial, I>>(object: I): MultiSignature { const message = createBaseMultiSignature(); message.signatures = object.signatures?.map((e) => e) || []; return message; @@ -149,7 +149,7 @@ export const CompactBitArray = { return obj; }, - fromPartial(object: DeepPartial): CompactBitArray { + fromPartial, I>>(object: I): CompactBitArray { const message = createBaseCompactBitArray(); message.extraBitsStored = object.extraBitsStored ?? 0; message.elems = object.elems ?? new Uint8Array(); diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index 7084a029..f09457fe 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.secp256k1"; /** * PubKey defines a secp256k1 public key @@ -70,7 +70,7 @@ export const PubKey = { return obj; }, - fromPartial(object: DeepPartial): PubKey { + fromPartial, I>>(object: I): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -127,7 +127,7 @@ export const PrivKey = { return obj; }, - fromPartial(object: DeepPartial): PrivKey { + fromPartial, I>>(object: I): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index dec2d0e9..462786d4 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** Params defines the set of params for the distribution module. */ @@ -208,7 +208,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.communityTax = object.communityTax ?? ""; message.baseProposerReward = object.baseProposerReward ?? ""; @@ -288,7 +288,9 @@ export const ValidatorHistoricalRewards = { return obj; }, - fromPartial(object: DeepPartial): ValidatorHistoricalRewards { + fromPartial, I>>( + object: I, + ): ValidatorHistoricalRewards { const message = createBaseValidatorHistoricalRewards(); message.cumulativeRewardRatio = object.cumulativeRewardRatio?.map((e) => DecCoin.fromPartial(e)) || []; message.referenceCount = object.referenceCount ?? 0; @@ -362,7 +364,7 @@ export const ValidatorCurrentRewards = { return obj; }, - fromPartial(object: DeepPartial): ValidatorCurrentRewards { + fromPartial, I>>(object: I): ValidatorCurrentRewards { const message = createBaseValidatorCurrentRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; message.period = @@ -428,7 +430,9 @@ export const ValidatorAccumulatedCommission = { return obj; }, - fromPartial(object: DeepPartial): ValidatorAccumulatedCommission { + fromPartial, I>>( + object: I, + ): ValidatorAccumulatedCommission { const message = createBaseValidatorAccumulatedCommission(); message.commission = object.commission?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -490,7 +494,9 @@ export const ValidatorOutstandingRewards = { return obj; }, - fromPartial(object: DeepPartial): ValidatorOutstandingRewards { + fromPartial, I>>( + object: I, + ): ValidatorOutstandingRewards { const message = createBaseValidatorOutstandingRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -558,7 +564,7 @@ export const ValidatorSlashEvent = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSlashEvent { + fromPartial, I>>(object: I): ValidatorSlashEvent { const message = createBaseValidatorSlashEvent(); message.validatorPeriod = object.validatorPeriod !== undefined && object.validatorPeriod !== null @@ -628,7 +634,7 @@ export const ValidatorSlashEvents = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSlashEvents { + fromPartial, I>>(object: I): ValidatorSlashEvents { const message = createBaseValidatorSlashEvents(); message.validatorSlashEvents = object.validatorSlashEvents?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; @@ -693,7 +699,7 @@ export const FeePool = { return obj; }, - fromPartial(object: DeepPartial): FeePool { + fromPartial, I>>(object: I): FeePool { const message = createBaseFeePool(); message.communityPool = object.communityPool?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -788,7 +794,9 @@ export const CommunityPoolSpendProposal = { return obj; }, - fromPartial(object: DeepPartial): CommunityPoolSpendProposal { + fromPartial, I>>( + object: I, + ): CommunityPoolSpendProposal { const message = createBaseCommunityPoolSpendProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -870,7 +878,7 @@ export const DelegatorStartingInfo = { return obj; }, - fromPartial(object: DeepPartial): DelegatorStartingInfo { + fromPartial, I>>(object: I): DelegatorStartingInfo { const message = createBaseDelegatorStartingInfo(); message.previousPeriod = object.previousPeriod !== undefined && object.previousPeriod !== null @@ -949,7 +957,9 @@ export const DelegationDelegatorReward = { return obj; }, - fromPartial(object: DeepPartial): DelegationDelegatorReward { + fromPartial, I>>( + object: I, + ): DelegationDelegatorReward { const message = createBaseDelegationDelegatorReward(); message.validatorAddress = object.validatorAddress ?? ""; message.reward = object.reward?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1053,8 +1063,8 @@ export const CommunityPoolSpendProposalWithDeposit = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): CommunityPoolSpendProposalWithDeposit { const message = createBaseCommunityPoolSpendProposalWithDeposit(); message.title = object.title ?? ""; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index d786720a..7d3e0d87 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -11,7 +11,7 @@ import { FeePool, } from "./distribution"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * DelegatorWithdrawInfo is the address for where distributions rewards are @@ -192,7 +192,7 @@ export const DelegatorWithdrawInfo = { return obj; }, - fromPartial(object: DeepPartial): DelegatorWithdrawInfo { + fromPartial, I>>(object: I): DelegatorWithdrawInfo { const message = createBaseDelegatorWithdrawInfo(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -268,7 +268,9 @@ export const ValidatorOutstandingRewardsRecord = { return obj; }, - fromPartial(object: DeepPartial): ValidatorOutstandingRewardsRecord { + fromPartial, I>>( + object: I, + ): ValidatorOutstandingRewardsRecord { const message = createBaseValidatorOutstandingRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.outstandingRewards = object.outstandingRewards?.map((e) => DecCoin.fromPartial(e)) || []; @@ -344,8 +346,8 @@ export const ValidatorAccumulatedCommissionRecord = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): ValidatorAccumulatedCommissionRecord { const message = createBaseValidatorAccumulatedCommissionRecord(); message.validatorAddress = object.validatorAddress ?? ""; @@ -429,7 +431,9 @@ export const ValidatorHistoricalRewardsRecord = { return obj; }, - fromPartial(object: DeepPartial): ValidatorHistoricalRewardsRecord { + fromPartial, I>>( + object: I, + ): ValidatorHistoricalRewardsRecord { const message = createBaseValidatorHistoricalRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.period = @@ -503,7 +507,9 @@ export const ValidatorCurrentRewardsRecord = { return obj; }, - fromPartial(object: DeepPartial): ValidatorCurrentRewardsRecord { + fromPartial, I>>( + object: I, + ): ValidatorCurrentRewardsRecord { const message = createBaseValidatorCurrentRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.rewards = @@ -590,7 +596,9 @@ export const DelegatorStartingInfoRecord = { return obj; }, - fromPartial(object: DeepPartial): DelegatorStartingInfoRecord { + fromPartial, I>>( + object: I, + ): DelegatorStartingInfoRecord { const message = createBaseDelegatorStartingInfoRecord(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -689,7 +697,9 @@ export const ValidatorSlashEventRecord = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSlashEventRecord { + fromPartial, I>>( + object: I, + ): ValidatorSlashEventRecord { const message = createBaseValidatorSlashEventRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.height = @@ -924,7 +934,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index ebc9648c..22ebdaf9 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -10,7 +10,7 @@ import { } from "./distribution"; import { DecCoin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Long, Rpc } from "../../../helpers"; +import { DeepPartial, Exact, isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -216,7 +216,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -271,7 +271,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -331,8 +331,8 @@ export const QueryValidatorOutstandingRewardsRequest = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryValidatorOutstandingRewardsRequest { const message = createBaseQueryValidatorOutstandingRewardsRequest(); message.validatorAddress = object.validatorAddress ?? ""; @@ -393,8 +393,8 @@ export const QueryValidatorOutstandingRewardsResponse = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryValidatorOutstandingRewardsResponse { const message = createBaseQueryValidatorOutstandingRewardsResponse(); message.rewards = @@ -454,7 +454,9 @@ export const QueryValidatorCommissionRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorCommissionRequest { + fromPartial, I>>( + object: I, + ): QueryValidatorCommissionRequest { const message = createBaseQueryValidatorCommissionRequest(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -515,7 +517,9 @@ export const QueryValidatorCommissionResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorCommissionResponse { + fromPartial, I>>( + object: I, + ): QueryValidatorCommissionResponse { const message = createBaseQueryValidatorCommissionResponse(); message.commission = object.commission !== undefined && object.commission !== null @@ -610,7 +614,9 @@ export const QueryValidatorSlashesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorSlashesRequest { + fromPartial, I>>( + object: I, + ): QueryValidatorSlashesRequest { const message = createBaseQueryValidatorSlashesRequest(); message.validatorAddress = object.validatorAddress ?? ""; message.startingHeight = @@ -698,7 +704,9 @@ export const QueryValidatorSlashesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorSlashesResponse { + fromPartial, I>>( + object: I, + ): QueryValidatorSlashesResponse { const message = createBaseQueryValidatorSlashesResponse(); message.slashes = object.slashes?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; message.pagination = @@ -769,7 +777,9 @@ export const QueryDelegationRewardsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationRewardsRequest { + fromPartial, I>>( + object: I, + ): QueryDelegationRewardsRequest { const message = createBaseQueryDelegationRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -832,7 +842,9 @@ export const QueryDelegationRewardsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationRewardsResponse { + fromPartial, I>>( + object: I, + ): QueryDelegationRewardsResponse { const message = createBaseQueryDelegationRewardsResponse(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -888,7 +900,9 @@ export const QueryDelegationTotalRewardsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsRequest { + fromPartial, I>>( + object: I, + ): QueryDelegationTotalRewardsRequest { const message = createBaseQueryDelegationTotalRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -968,7 +982,9 @@ export const QueryDelegationTotalRewardsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationTotalRewardsResponse { + fromPartial, I>>( + object: I, + ): QueryDelegationTotalRewardsResponse { const message = createBaseQueryDelegationTotalRewardsResponse(); message.rewards = object.rewards?.map((e) => DelegationDelegatorReward.fromPartial(e)) || []; message.total = object.total?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1025,7 +1041,9 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -1087,7 +1105,9 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => e) || []; return message; @@ -1146,8 +1166,8 @@ export const QueryDelegatorWithdrawAddressRequest = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryDelegatorWithdrawAddressRequest { const message = createBaseQueryDelegatorWithdrawAddressRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; @@ -1207,8 +1227,8 @@ export const QueryDelegatorWithdrawAddressResponse = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryDelegatorWithdrawAddressResponse { const message = createBaseQueryDelegatorWithdrawAddressResponse(); message.withdrawAddress = object.withdrawAddress ?? ""; @@ -1252,7 +1272,7 @@ export const QueryCommunityPoolRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryCommunityPoolRequest { + fromPartial, I>>(_: I): QueryCommunityPoolRequest { const message = createBaseQueryCommunityPoolRequest(); return message; }, @@ -1313,7 +1333,9 @@ export const QueryCommunityPoolResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryCommunityPoolResponse { + fromPartial, I>>( + object: I, + ): QueryCommunityPoolResponse { const message = createBaseQueryCommunityPoolResponse(); message.pool = object.pool?.map((e) => DecCoin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index b5b3387d..a39d2de4 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * MsgSetWithdrawAddress sets the withdraw address for @@ -112,7 +112,7 @@ export const MsgSetWithdrawAddress = { return obj; }, - fromPartial(object: DeepPartial): MsgSetWithdrawAddress { + fromPartial, I>>(object: I): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -156,7 +156,9 @@ export const MsgSetWithdrawAddressResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgSetWithdrawAddressResponse { + fromPartial, I>>( + _: I, + ): MsgSetWithdrawAddressResponse { const message = createBaseMsgSetWithdrawAddressResponse(); return message; }, @@ -222,7 +224,9 @@ export const MsgWithdrawDelegatorReward = { return obj; }, - fromPartial(object: DeepPartial): MsgWithdrawDelegatorReward { + fromPartial, I>>( + object: I, + ): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -266,7 +270,9 @@ export const MsgWithdrawDelegatorRewardResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgWithdrawDelegatorRewardResponse { + fromPartial, I>>( + _: I, + ): MsgWithdrawDelegatorRewardResponse { const message = createBaseMsgWithdrawDelegatorRewardResponse(); return message; }, @@ -321,7 +327,9 @@ export const MsgWithdrawValidatorCommission = { return obj; }, - fromPartial(object: DeepPartial): MsgWithdrawValidatorCommission { + fromPartial, I>>( + object: I, + ): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -364,8 +372,8 @@ export const MsgWithdrawValidatorCommissionResponse = { return obj; }, - fromPartial( - _: DeepPartial, + fromPartial, I>>( + _: I, ): MsgWithdrawValidatorCommissionResponse { const message = createBaseMsgWithdrawValidatorCommissionResponse(); return message; @@ -438,7 +446,7 @@ export const MsgFundCommunityPool = { return obj; }, - fromPartial(object: DeepPartial): MsgFundCommunityPool { + fromPartial, I>>(object: I): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.depositor = object.depositor ?? ""; @@ -482,7 +490,9 @@ export const MsgFundCommunityPoolResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgFundCommunityPoolResponse { + fromPartial, I>>( + _: I, + ): MsgFundCommunityPoolResponse { const message = createBaseMsgFundCommunityPoolResponse(); return message; }, diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index 264cd945..b562d7d8 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * Equivocation implements the Evidence interface and defines evidence of double @@ -98,7 +98,7 @@ export const Equivocation = { return obj; }, - fromPartial(object: DeepPartial): Equivocation { + fromPartial, I>>(object: I): Equivocation { const message = createBaseEquivocation(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index d8bfa3ed..5794e677 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial } from "../../../helpers"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** GenesisState defines the evidence module's genesis state. */ @@ -66,7 +66,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index ae9c47df..0c506f61 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ @@ -91,7 +91,7 @@ export const QueryEvidenceRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryEvidenceRequest { + fromPartial, I>>(object: I): QueryEvidenceRequest { const message = createBaseQueryEvidenceRequest(); message.evidenceHash = object.evidenceHash ?? new Uint8Array(); return message; @@ -148,7 +148,7 @@ export const QueryEvidenceResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryEvidenceResponse { + fromPartial, I>>(object: I): QueryEvidenceResponse { const message = createBaseQueryEvidenceResponse(); message.evidence = object.evidence !== undefined && object.evidence !== null @@ -208,7 +208,7 @@ export const QueryAllEvidenceRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllEvidenceRequest { + fromPartial, I>>(object: I): QueryAllEvidenceRequest { const message = createBaseQueryAllEvidenceRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -285,7 +285,9 @@ export const QueryAllEvidenceResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllEvidenceResponse { + fromPartial, I>>( + object: I, + ): QueryAllEvidenceResponse { const message = createBaseQueryAllEvidenceResponse(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index b7de61dc..0fed1698 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * MsgSubmitEvidence represents a message that supports submitting arbitrary @@ -81,7 +81,7 @@ export const MsgSubmitEvidence = { return obj; }, - fromPartial(object: DeepPartial): MsgSubmitEvidence { + fromPartial, I>>(object: I): MsgSubmitEvidence { const message = createBaseMsgSubmitEvidence(); message.submitter = object.submitter ?? ""; message.evidence = @@ -142,7 +142,9 @@ export const MsgSubmitEvidenceResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgSubmitEvidenceResponse { + fromPartial, I>>( + object: I, + ): MsgSubmitEvidenceResponse { const message = createBaseMsgSubmitEvidenceResponse(); message.hash = object.hash ?? new Uint8Array(); return message; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index f0f0ac47..295c702c 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -5,7 +5,7 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * BasicAllowance implements Allowance with a one-time grant of tokens @@ -144,7 +144,7 @@ export const BasicAllowance = { return obj; }, - fromPartial(object: DeepPartial): BasicAllowance { + fromPartial, I>>(object: I): BasicAllowance { const message = createBaseBasicAllowance(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; message.expiration = @@ -265,7 +265,7 @@ export const PeriodicAllowance = { return obj; }, - fromPartial(object: DeepPartial): PeriodicAllowance { + fromPartial, I>>(object: I): PeriodicAllowance { const message = createBasePeriodicAllowance(); message.basic = object.basic !== undefined && object.basic !== null @@ -352,7 +352,7 @@ export const AllowedMsgAllowance = { return obj; }, - fromPartial(object: DeepPartial): AllowedMsgAllowance { + fromPartial, I>>(object: I): AllowedMsgAllowance { const message = createBaseAllowedMsgAllowance(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -435,7 +435,7 @@ export const Grant = { return obj; }, - fromPartial(object: DeepPartial): Grant { + fromPartial, I>>(object: I): Grant { const message = createBaseGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index d05696b3..0a28e052 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial } from "../../../helpers"; +import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** GenesisState contains a set of fee allowances, persisted from the store */ @@ -67,7 +67,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; return message; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index 2c808f56..b452f275 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ @@ -115,7 +115,7 @@ export const QueryAllowanceRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowanceRequest { + fromPartial, I>>(object: I): QueryAllowanceRequest { const message = createBaseQueryAllowanceRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -173,7 +173,7 @@ export const QueryAllowanceResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowanceResponse { + fromPartial, I>>(object: I): QueryAllowanceResponse { const message = createBaseQueryAllowanceResponse(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -244,7 +244,7 @@ export const QueryAllowancesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowancesRequest { + fromPartial, I>>(object: I): QueryAllowancesRequest { const message = createBaseQueryAllowancesRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -324,7 +324,7 @@ export const QueryAllowancesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowancesResponse { + fromPartial, I>>(object: I): QueryAllowancesResponse { const message = createBaseQueryAllowancesResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -396,7 +396,9 @@ export const QueryAllowancesByGranterRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowancesByGranterRequest { + fromPartial, I>>( + object: I, + ): QueryAllowancesByGranterRequest { const message = createBaseQueryAllowancesByGranterRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -476,7 +478,9 @@ export const QueryAllowancesByGranterResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllowancesByGranterResponse { + fromPartial, I>>( + object: I, + ): QueryAllowancesByGranterResponse { const message = createBaseQueryAllowancesByGranterResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index a92a1617..caa2836b 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -107,7 +107,7 @@ export const MsgGrantAllowance = { return obj; }, - fromPartial(object: DeepPartial): MsgGrantAllowance { + fromPartial, I>>(object: I): MsgGrantAllowance { const message = createBaseMsgGrantAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -155,7 +155,7 @@ export const MsgGrantAllowanceResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgGrantAllowanceResponse { + fromPartial, I>>(_: I): MsgGrantAllowanceResponse { const message = createBaseMsgGrantAllowanceResponse(); return message; }, @@ -221,7 +221,7 @@ export const MsgRevokeAllowance = { return obj; }, - fromPartial(object: DeepPartial): MsgRevokeAllowance { + fromPartial, I>>(object: I): MsgRevokeAllowance { const message = createBaseMsgRevokeAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -265,7 +265,7 @@ export const MsgRevokeAllowanceResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgRevokeAllowanceResponse { + fromPartial, I>>(_: I): MsgRevokeAllowanceResponse { const message = createBaseMsgRevokeAllowanceResponse(); return message; }, diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 46affc8f..4b35676c 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; +import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.genutil.v1beta1"; /** GenesisState defines the raw genesis transaction in JSON. */ @@ -65,7 +65,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.genTxs = object.genTxs?.map((e) => e) || []; return message; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index 7a4260e3..7ac0d10c 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** GenesisState defines the gov module's genesis state. */ @@ -168,7 +168,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index ea0184b6..3d717289 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -8,6 +8,7 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, + Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -346,7 +347,7 @@ export const WeightedVoteOption = { return obj; }, - fromPartial(object: DeepPartial): WeightedVoteOption { + fromPartial, I>>(object: I): WeightedVoteOption { const message = createBaseWeightedVoteOption(); message.option = object.option ?? 0; message.weight = object.weight ?? ""; @@ -414,7 +415,7 @@ export const TextProposal = { return obj; }, - fromPartial(object: DeepPartial): TextProposal { + fromPartial, I>>(object: I): TextProposal { const message = createBaseTextProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -499,7 +500,7 @@ export const Deposit = { return obj; }, - fromPartial(object: DeepPartial): Deposit { + fromPartial, I>>(object: I): Deposit { const message = createBaseDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -665,7 +666,7 @@ export const Proposal = { return obj; }, - fromPartial(object: DeepPartial): Proposal { + fromPartial, I>>(object: I): Proposal { const message = createBaseProposal(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -781,7 +782,7 @@ export const TallyResult = { return obj; }, - fromPartial(object: DeepPartial): TallyResult { + fromPartial, I>>(object: I): TallyResult { const message = createBaseTallyResult(); message.yes = object.yes ?? ""; message.abstain = object.abstain ?? ""; @@ -881,7 +882,7 @@ export const Vote = { return obj; }, - fromPartial(object: DeepPartial): Vote { + fromPartial, I>>(object: I): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -967,7 +968,7 @@ export const DepositParams = { return obj; }, - fromPartial(object: DeepPartial): DepositParams { + fromPartial, I>>(object: I): DepositParams { const message = createBaseDepositParams(); message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || []; message.maxDepositPeriod = @@ -1028,7 +1029,7 @@ export const VotingParams = { return obj; }, - fromPartial(object: DeepPartial): VotingParams { + fromPartial, I>>(object: I): VotingParams { const message = createBaseVotingParams(); message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null @@ -1116,7 +1117,7 @@ export const TallyParams = { return obj; }, - fromPartial(object: DeepPartial): TallyParams { + fromPartial, I>>(object: I): TallyParams { const message = createBaseTallyParams(); message.quorum = object.quorum ?? new Uint8Array(); message.threshold = object.threshold ?? new Uint8Array(); diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 4a752e8b..2fd327bf 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -14,7 +14,7 @@ import { } from "./gov"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Rpc } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ @@ -201,7 +201,7 @@ export const QueryProposalRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryProposalRequest { + fromPartial, I>>(object: I): QueryProposalRequest { const message = createBaseQueryProposalRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -261,7 +261,7 @@ export const QueryProposalResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryProposalResponse { + fromPartial, I>>(object: I): QueryProposalResponse { const message = createBaseQueryProposalResponse(); message.proposal = object.proposal !== undefined && object.proposal !== null @@ -355,7 +355,7 @@ export const QueryProposalsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryProposalsRequest { + fromPartial, I>>(object: I): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); message.proposalStatus = object.proposalStatus ?? 0; message.voter = object.voter ?? ""; @@ -437,7 +437,7 @@ export const QueryProposalsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryProposalsResponse { + fromPartial, I>>(object: I): QueryProposalsResponse { const message = createBaseQueryProposalsResponse(); message.proposals = object.proposals?.map((e) => Proposal.fromPartial(e)) || []; message.pagination = @@ -508,7 +508,7 @@ export const QueryVoteRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryVoteRequest { + fromPartial, I>>(object: I): QueryVoteRequest { const message = createBaseQueryVoteRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -568,7 +568,7 @@ export const QueryVoteResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryVoteResponse { + fromPartial, I>>(object: I): QueryVoteResponse { const message = createBaseQueryVoteResponse(); message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; @@ -637,7 +637,7 @@ export const QueryVotesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryVotesRequest { + fromPartial, I>>(object: I): QueryVotesRequest { const message = createBaseQueryVotesRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -718,7 +718,7 @@ export const QueryVotesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryVotesResponse { + fromPartial, I>>(object: I): QueryVotesResponse { const message = createBaseQueryVotesResponse(); message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; message.pagination = @@ -778,7 +778,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsRequest { + fromPartial, I>>(object: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.paramsType = object.paramsType ?? ""; return message; @@ -859,7 +859,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.votingParams = object.votingParams !== undefined && object.votingParams !== null @@ -937,7 +937,7 @@ export const QueryDepositRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDepositRequest { + fromPartial, I>>(object: I): QueryDepositRequest { const message = createBaseQueryDepositRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -998,7 +998,7 @@ export const QueryDepositResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDepositResponse { + fromPartial, I>>(object: I): QueryDepositResponse { const message = createBaseQueryDepositResponse(); message.deposit = object.deposit !== undefined && object.deposit !== null @@ -1069,7 +1069,7 @@ export const QueryDepositsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDepositsRequest { + fromPartial, I>>(object: I): QueryDepositsRequest { const message = createBaseQueryDepositsRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1150,7 +1150,7 @@ export const QueryDepositsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDepositsResponse { + fromPartial, I>>(object: I): QueryDepositsResponse { const message = createBaseQueryDepositsResponse(); message.deposits = object.deposits?.map((e) => Deposit.fromPartial(e)) || []; message.pagination = @@ -1210,7 +1210,7 @@ export const QueryTallyResultRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryTallyResultRequest { + fromPartial, I>>(object: I): QueryTallyResultRequest { const message = createBaseQueryTallyResultRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1270,7 +1270,9 @@ export const QueryTallyResultResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryTallyResultResponse { + fromPartial, I>>( + object: I, + ): QueryTallyResultResponse { const message = createBaseQueryTallyResultResponse(); message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index bdae77d0..c23a55e5 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -4,7 +4,7 @@ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { VoteOption, WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -140,7 +140,7 @@ export const MsgSubmitProposal = { return obj; }, - fromPartial(object: DeepPartial): MsgSubmitProposal { + fromPartial, I>>(object: I): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; @@ -199,7 +199,9 @@ export const MsgSubmitProposalResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgSubmitProposalResponse { + fromPartial, I>>( + object: I, + ): MsgSubmitProposalResponse { const message = createBaseMsgSubmitProposalResponse(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -280,7 +282,7 @@ export const MsgVote = { return obj; }, - fromPartial(object: DeepPartial): MsgVote { + fromPartial, I>>(object: I): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -328,7 +330,7 @@ export const MsgVoteResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgVoteResponse { + fromPartial, I>>(_: I): MsgVoteResponse { const message = createBaseMsgVoteResponse(); return message; }, @@ -413,7 +415,7 @@ export const MsgVoteWeighted = { return obj; }, - fromPartial(object: DeepPartial): MsgVoteWeighted { + fromPartial, I>>(object: I): MsgVoteWeighted { const message = createBaseMsgVoteWeighted(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -461,7 +463,7 @@ export const MsgVoteWeightedResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgVoteWeightedResponse { + fromPartial, I>>(_: I): MsgVoteWeightedResponse { const message = createBaseMsgVoteWeightedResponse(); return message; }, @@ -544,7 +546,7 @@ export const MsgDeposit = { return obj; }, - fromPartial(object: DeepPartial): MsgDeposit { + fromPartial, I>>(object: I): MsgDeposit { const message = createBaseMsgDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -592,7 +594,7 @@ export const MsgDepositResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgDepositResponse { + fromPartial, I>>(_: I): MsgDepositResponse { const message = createBaseMsgDepositResponse(); return message; }, diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index 86b275d8..d7ce5fa1 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** GenesisState defines the mint module's genesis state. */ @@ -74,7 +74,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.minter = object.minter !== undefined && object.minter !== null ? Minter.fromPartial(object.minter) : undefined; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index 956554b3..a1b084f8 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** Minter represents the minting state. */ @@ -94,7 +94,7 @@ export const Minter = { return obj; }, - fromPartial(object: DeepPartial): Minter { + fromPartial, I>>(object: I): Minter { const message = createBaseMinter(); message.inflation = object.inflation ?? ""; message.annualProvisions = object.annualProvisions ?? ""; @@ -207,7 +207,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.mintDenom = object.mintDenom ?? ""; message.inflationRateChange = object.inflationRateChange ?? ""; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index 0c931ffa..e8112c54 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -77,7 +77,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -132,7 +132,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -176,7 +176,7 @@ export const QueryInflationRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryInflationRequest { + fromPartial, I>>(_: I): QueryInflationRequest { const message = createBaseQueryInflationRequest(); return message; }, @@ -234,7 +234,7 @@ export const QueryInflationResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryInflationResponse { + fromPartial, I>>(object: I): QueryInflationResponse { const message = createBaseQueryInflationResponse(); message.inflation = object.inflation ?? new Uint8Array(); return message; @@ -277,7 +277,9 @@ export const QueryAnnualProvisionsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryAnnualProvisionsRequest { + fromPartial, I>>( + _: I, + ): QueryAnnualProvisionsRequest { const message = createBaseQueryAnnualProvisionsRequest(); return message; }, @@ -337,7 +339,9 @@ export const QueryAnnualProvisionsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAnnualProvisionsResponse { + fromPartial, I>>( + object: I, + ): QueryAnnualProvisionsResponse { const message = createBaseQueryAnnualProvisionsResponse(); message.annualProvisions = object.annualProvisions ?? new Uint8Array(); return message; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index e5e38db6..07deeaad 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** ParameterChangeProposal defines a proposal to change one or more parameters. */ @@ -98,7 +98,7 @@ export const ParameterChangeProposal = { return obj; }, - fromPartial(object: DeepPartial): ParameterChangeProposal { + fromPartial, I>>(object: I): ParameterChangeProposal { const message = createBaseParameterChangeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -178,7 +178,7 @@ export const ParamChange = { return obj; }, - fromPartial(object: DeepPartial): ParamChange { + fromPartial, I>>(object: I): ParamChange { const message = createBaseParamChange(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 75853715..9e851c3a 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** QueryParamsRequest is request type for the Query/Params RPC method. */ @@ -80,7 +80,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsRequest { + fromPartial, I>>(object: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; @@ -138,7 +138,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.param = object.param !== undefined && object.param !== null ? ParamChange.fromPartial(object.param) : undefined; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index ca5d7d50..150a1fbf 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** GenesisState defines the slashing module's genesis state. */ @@ -139,7 +139,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -214,7 +214,7 @@ export const SigningInfo = { return obj; }, - fromPartial(object: DeepPartial): SigningInfo { + fromPartial, I>>(object: I): SigningInfo { const message = createBaseSigningInfo(); message.address = object.address ?? ""; message.validatorSigningInfo = @@ -293,7 +293,7 @@ export const ValidatorMissedBlocks = { return obj; }, - fromPartial(object: DeepPartial): ValidatorMissedBlocks { + fromPartial, I>>(object: I): ValidatorMissedBlocks { const message = createBaseValidatorMissedBlocks(); message.address = object.address ?? ""; message.missedBlocks = object.missedBlocks?.map((e) => MissedBlock.fromPartial(e)) || []; @@ -361,7 +361,7 @@ export const MissedBlock = { return obj; }, - fromPartial(object: DeepPartial): MissedBlock { + fromPartial, I>>(object: I): MissedBlock { const message = createBaseMissedBlock(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.ZERO; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index 64c99fa0..cdcccf4b 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Rpc } from "../../../helpers"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method */ @@ -86,7 +86,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -141,7 +141,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -198,7 +198,7 @@ export const QuerySigningInfoRequest = { return obj; }, - fromPartial(object: DeepPartial): QuerySigningInfoRequest { + fromPartial, I>>(object: I): QuerySigningInfoRequest { const message = createBaseQuerySigningInfoRequest(); message.consAddress = object.consAddress ?? ""; return message; @@ -259,7 +259,9 @@ export const QuerySigningInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): QuerySigningInfoResponse { + fromPartial, I>>( + object: I, + ): QuerySigningInfoResponse { const message = createBaseQuerySigningInfoResponse(); message.valSigningInfo = object.valSigningInfo !== undefined && object.valSigningInfo !== null @@ -319,7 +321,9 @@ export const QuerySigningInfosRequest = { return obj; }, - fromPartial(object: DeepPartial): QuerySigningInfosRequest { + fromPartial, I>>( + object: I, + ): QuerySigningInfosRequest { const message = createBaseQuerySigningInfosRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -396,7 +400,9 @@ export const QuerySigningInfosResponse = { return obj; }, - fromPartial(object: DeepPartial): QuerySigningInfosResponse { + fromPartial, I>>( + object: I, + ): QuerySigningInfosResponse { const message = createBaseQuerySigningInfosResponse(); message.info = object.info?.map((e) => ValidatorSigningInfo.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index bd86b0a3..9a5a9836 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -9,6 +9,7 @@ import { fromJsonTimestamp, fromTimestamp, DeepPartial, + Exact, bytesFromBase64, base64FromBytes, } from "../../../helpers"; @@ -163,7 +164,7 @@ export const ValidatorSigningInfo = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSigningInfo { + fromPartial, I>>(object: I): ValidatorSigningInfo { const message = createBaseValidatorSigningInfo(); message.address = object.address ?? ""; message.startHeight = @@ -303,7 +304,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.signedBlocksWindow = object.signedBlocksWindow !== undefined && object.signedBlocksWindow !== null diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 2cb6f0fd..80678571 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** MsgUnjail defines the Msg/Unjail request type */ @@ -61,7 +61,7 @@ export const MsgUnjail = { return obj; }, - fromPartial(object: DeepPartial): MsgUnjail { + fromPartial, I>>(object: I): MsgUnjail { const message = createBaseMsgUnjail(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -104,7 +104,7 @@ export const MsgUnjailResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgUnjailResponse { + fromPartial, I>>(_: I): MsgUnjailResponse { const message = createBaseMsgUnjailResponse(); return message; }, diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 05f2463b..746d6e95 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** * AuthorizationType defines the type of staking module authorization type @@ -190,7 +190,7 @@ export const StakeAuthorization = { return obj; }, - fromPartial(object: DeepPartial): StakeAuthorization { + fromPartial, I>>(object: I): StakeAuthorization { const message = createBaseStakeAuthorization(); message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null @@ -264,7 +264,9 @@ export const StakeAuthorization_Validators = { return obj; }, - fromPartial(object: DeepPartial): StakeAuthorization_Validators { + fromPartial, I>>( + object: I, + ): StakeAuthorization_Validators { const message = createBaseStakeAuthorization_Validators(); message.address = object.address?.map((e) => e) || []; return message; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index f60ca677..1422bbcb 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** GenesisState defines the staking module's genesis state. */ @@ -216,7 +216,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -293,7 +293,7 @@ export const LastValidatorPower = { return obj; }, - fromPartial(object: DeepPartial): LastValidatorPower { + fromPartial, I>>(object: I): LastValidatorPower { const message = createBaseLastValidatorPower(); message.address = object.address ?? ""; message.power = diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index bd45c65d..b119eac2 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -11,7 +11,7 @@ import { Params, } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ @@ -344,7 +344,7 @@ export const QueryValidatorsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorsRequest { + fromPartial, I>>(object: I): QueryValidatorsRequest { const message = createBaseQueryValidatorsRequest(); message.status = object.status ?? ""; message.pagination = @@ -424,7 +424,7 @@ export const QueryValidatorsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorsResponse { + fromPartial, I>>(object: I): QueryValidatorsResponse { const message = createBaseQueryValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -484,7 +484,7 @@ export const QueryValidatorRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorRequest { + fromPartial, I>>(object: I): QueryValidatorRequest { const message = createBaseQueryValidatorRequest(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -541,7 +541,7 @@ export const QueryValidatorResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorResponse { + fromPartial, I>>(object: I): QueryValidatorResponse { const message = createBaseQueryValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -612,7 +612,9 @@ export const QueryValidatorDelegationsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorDelegationsRequest { + fromPartial, I>>( + object: I, + ): QueryValidatorDelegationsRequest { const message = createBaseQueryValidatorDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; message.pagination = @@ -694,7 +696,9 @@ export const QueryValidatorDelegationsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryValidatorDelegationsResponse { + fromPartial, I>>( + object: I, + ): QueryValidatorDelegationsResponse { const message = createBaseQueryValidatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -770,8 +774,8 @@ export const QueryValidatorUnbondingDelegationsRequest = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryValidatorUnbondingDelegationsRequest { const message = createBaseQueryValidatorUnbondingDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; @@ -857,8 +861,8 @@ export const QueryValidatorUnbondingDelegationsResponse = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryValidatorUnbondingDelegationsResponse { const message = createBaseQueryValidatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -931,7 +935,7 @@ export const QueryDelegationRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationRequest { + fromPartial, I>>(object: I): QueryDelegationRequest { const message = createBaseQueryDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -993,7 +997,7 @@ export const QueryDelegationResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegationResponse { + fromPartial, I>>(object: I): QueryDelegationResponse { const message = createBaseQueryDelegationResponse(); message.delegationResponse = object.delegationResponse !== undefined && object.delegationResponse !== null @@ -1063,7 +1067,9 @@ export const QueryUnbondingDelegationRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryUnbondingDelegationRequest { + fromPartial, I>>( + object: I, + ): QueryUnbondingDelegationRequest { const message = createBaseQueryUnbondingDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1121,7 +1127,9 @@ export const QueryUnbondingDelegationResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUnbondingDelegationResponse { + fromPartial, I>>( + object: I, + ): QueryUnbondingDelegationResponse { const message = createBaseQueryUnbondingDelegationResponse(); message.unbond = object.unbond !== undefined && object.unbond !== null @@ -1192,7 +1200,9 @@ export const QueryDelegatorDelegationsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorDelegationsRequest { + fromPartial, I>>( + object: I, + ): QueryDelegatorDelegationsRequest { const message = createBaseQueryDelegatorDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1274,7 +1284,9 @@ export const QueryDelegatorDelegationsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorDelegationsResponse { + fromPartial, I>>( + object: I, + ): QueryDelegatorDelegationsResponse { const message = createBaseQueryDelegatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -1350,8 +1362,8 @@ export const QueryDelegatorUnbondingDelegationsRequest = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryDelegatorUnbondingDelegationsRequest { const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; @@ -1437,8 +1449,8 @@ export const QueryDelegatorUnbondingDelegationsResponse = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryDelegatorUnbondingDelegationsResponse { const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -1534,7 +1546,9 @@ export const QueryRedelegationsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryRedelegationsRequest { + fromPartial, I>>( + object: I, + ): QueryRedelegationsRequest { const message = createBaseQueryRedelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.srcValidatorAddr = object.srcValidatorAddr ?? ""; @@ -1618,7 +1632,9 @@ export const QueryRedelegationsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryRedelegationsResponse { + fromPartial, I>>( + object: I, + ): QueryRedelegationsResponse { const message = createBaseQueryRedelegationsResponse(); message.redelegationResponses = object.redelegationResponses?.map((e) => RedelegationResponse.fromPartial(e)) || []; @@ -1691,7 +1707,9 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsRequest { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1771,7 +1789,9 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorsResponse { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -1842,7 +1862,9 @@ export const QueryDelegatorValidatorRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorRequest { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorRequest { const message = createBaseQueryDelegatorValidatorRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1900,7 +1922,9 @@ export const QueryDelegatorValidatorResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDelegatorValidatorResponse { + fromPartial, I>>( + object: I, + ): QueryDelegatorValidatorResponse { const message = createBaseQueryDelegatorValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -1959,7 +1983,9 @@ export const QueryHistoricalInfoRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryHistoricalInfoRequest { + fromPartial, I>>( + object: I, + ): QueryHistoricalInfoRequest { const message = createBaseQueryHistoricalInfoRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -2016,7 +2042,9 @@ export const QueryHistoricalInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryHistoricalInfoResponse { + fromPartial, I>>( + object: I, + ): QueryHistoricalInfoResponse { const message = createBaseQueryHistoricalInfoResponse(); message.hist = object.hist !== undefined && object.hist !== null ? HistoricalInfo.fromPartial(object.hist) : undefined; @@ -2060,7 +2088,7 @@ export const QueryPoolRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryPoolRequest { + fromPartial, I>>(_: I): QueryPoolRequest { const message = createBaseQueryPoolRequest(); return message; }, @@ -2115,7 +2143,7 @@ export const QueryPoolResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPoolResponse { + fromPartial, I>>(object: I): QueryPoolResponse { const message = createBaseQueryPoolResponse(); message.pool = object.pool !== undefined && object.pool !== null ? Pool.fromPartial(object.pool) : undefined; @@ -2159,7 +2187,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -2214,7 +2242,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index 6aa81bf1..c846f164 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -6,7 +6,7 @@ import { Any } from "../../../google/protobuf/any"; import { Duration } from "../../../google/protobuf/duration"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** BondStatus is the status of a validator. */ @@ -404,7 +404,7 @@ export const HistoricalInfo = { return obj; }, - fromPartial(object: DeepPartial): HistoricalInfo { + fromPartial, I>>(object: I): HistoricalInfo { const message = createBaseHistoricalInfo(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -484,7 +484,7 @@ export const CommissionRates = { return obj; }, - fromPartial(object: DeepPartial): CommissionRates { + fromPartial, I>>(object: I): CommissionRates { const message = createBaseCommissionRates(); message.rate = object.rate ?? ""; message.maxRate = object.maxRate ?? ""; @@ -558,7 +558,7 @@ export const Commission = { return obj; }, - fromPartial(object: DeepPartial): Commission { + fromPartial, I>>(object: I): Commission { const message = createBaseCommission(); message.commissionRates = object.commissionRates !== undefined && object.commissionRates !== null @@ -665,7 +665,7 @@ export const Description = { return obj; }, - fromPartial(object: DeepPartial): Description { + fromPartial, I>>(object: I): Description { const message = createBaseDescription(); message.moniker = object.moniker ?? ""; message.identity = object.identity ?? ""; @@ -840,7 +840,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial, I>>(object: I): Validator { const message = createBaseValidator(); message.operatorAddress = object.operatorAddress ?? ""; message.consensusPubkey = @@ -927,7 +927,7 @@ export const ValAddresses = { return obj; }, - fromPartial(object: DeepPartial): ValAddresses { + fromPartial, I>>(object: I): ValAddresses { const message = createBaseValAddresses(); message.addresses = object.addresses?.map((e) => e) || []; return message; @@ -994,7 +994,7 @@ export const DVPair = { return obj; }, - fromPartial(object: DeepPartial): DVPair { + fromPartial, I>>(object: I): DVPair { const message = createBaseDVPair(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1057,7 +1057,7 @@ export const DVPairs = { return obj; }, - fromPartial(object: DeepPartial): DVPairs { + fromPartial, I>>(object: I): DVPairs { const message = createBaseDVPairs(); message.pairs = object.pairs?.map((e) => DVPair.fromPartial(e)) || []; return message; @@ -1135,7 +1135,7 @@ export const DVVTriplet = { return obj; }, - fromPartial(object: DeepPartial): DVVTriplet { + fromPartial, I>>(object: I): DVVTriplet { const message = createBaseDVVTriplet(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1201,7 +1201,7 @@ export const DVVTriplets = { return obj; }, - fromPartial(object: DeepPartial): DVVTriplets { + fromPartial, I>>(object: I): DVVTriplets { const message = createBaseDVVTriplets(); message.triplets = object.triplets?.map((e) => DVVTriplet.fromPartial(e)) || []; return message; @@ -1279,7 +1279,7 @@ export const Delegation = { return obj; }, - fromPartial(object: DeepPartial): Delegation { + fromPartial, I>>(object: I): Delegation { const message = createBaseDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1367,7 +1367,7 @@ export const UnbondingDelegation = { return obj; }, - fromPartial(object: DeepPartial): UnbondingDelegation { + fromPartial, I>>(object: I): UnbondingDelegation { const message = createBaseUnbondingDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1460,7 +1460,9 @@ export const UnbondingDelegationEntry = { return obj; }, - fromPartial(object: DeepPartial): UnbondingDelegationEntry { + fromPartial, I>>( + object: I, + ): UnbondingDelegationEntry { const message = createBaseUnbondingDelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1560,7 +1562,7 @@ export const RedelegationEntry = { return obj; }, - fromPartial(object: DeepPartial): RedelegationEntry { + fromPartial, I>>(object: I): RedelegationEntry { const message = createBaseRedelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1666,7 +1668,7 @@ export const Redelegation = { return obj; }, - fromPartial(object: DeepPartial): Redelegation { + fromPartial, I>>(object: I): Redelegation { const message = createBaseRedelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1771,7 +1773,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.unbondingTime = object.unbondingTime !== undefined && object.unbondingTime !== null @@ -1847,7 +1849,7 @@ export const DelegationResponse = { return obj; }, - fromPartial(object: DeepPartial): DelegationResponse { + fromPartial, I>>(object: I): DelegationResponse { const message = createBaseDelegationResponse(); message.delegation = object.delegation !== undefined && object.delegation !== null @@ -1924,7 +1926,9 @@ export const RedelegationEntryResponse = { return obj; }, - fromPartial(object: DeepPartial): RedelegationEntryResponse { + fromPartial, I>>( + object: I, + ): RedelegationEntryResponse { const message = createBaseRedelegationEntryResponse(); message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null @@ -2004,7 +2008,7 @@ export const RedelegationResponse = { return obj; }, - fromPartial(object: DeepPartial): RedelegationResponse { + fromPartial, I>>(object: I): RedelegationResponse { const message = createBaseRedelegationResponse(); message.redelegation = object.redelegation !== undefined && object.redelegation !== null @@ -2075,7 +2079,7 @@ export const Pool = { return obj; }, - fromPartial(object: DeepPartial): Pool { + fromPartial, I>>(object: I): Pool { const message = createBasePool(); message.notBondedTokens = object.notBondedTokens ?? ""; message.bondedTokens = object.bondedTokens ?? ""; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 0e359c14..54f869ee 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -5,7 +5,7 @@ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ @@ -201,7 +201,7 @@ export const MsgCreateValidator = { return obj; }, - fromPartial(object: DeepPartial): MsgCreateValidator { + fromPartial, I>>(object: I): MsgCreateValidator { const message = createBaseMsgCreateValidator(); message.description = object.description !== undefined && object.description !== null @@ -258,7 +258,7 @@ export const MsgCreateValidatorResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgCreateValidatorResponse { + fromPartial, I>>(_: I): MsgCreateValidatorResponse { const message = createBaseMsgCreateValidatorResponse(); return message; }, @@ -347,7 +347,7 @@ export const MsgEditValidator = { return obj; }, - fromPartial(object: DeepPartial): MsgEditValidator { + fromPartial, I>>(object: I): MsgEditValidator { const message = createBaseMsgEditValidator(); message.description = object.description !== undefined && object.description !== null @@ -396,7 +396,7 @@ export const MsgEditValidatorResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgEditValidatorResponse { + fromPartial, I>>(_: I): MsgEditValidatorResponse { const message = createBaseMsgEditValidatorResponse(); return message; }, @@ -473,7 +473,7 @@ export const MsgDelegate = { return obj; }, - fromPartial(object: DeepPartial): MsgDelegate { + fromPartial, I>>(object: I): MsgDelegate { const message = createBaseMsgDelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -519,7 +519,7 @@ export const MsgDelegateResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgDelegateResponse { + fromPartial, I>>(_: I): MsgDelegateResponse { const message = createBaseMsgDelegateResponse(); return message; }, @@ -607,7 +607,7 @@ export const MsgBeginRedelegate = { return obj; }, - fromPartial(object: DeepPartial): MsgBeginRedelegate { + fromPartial, I>>(object: I): MsgBeginRedelegate { const message = createBaseMsgBeginRedelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -668,7 +668,9 @@ export const MsgBeginRedelegateResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgBeginRedelegateResponse { + fromPartial, I>>( + object: I, + ): MsgBeginRedelegateResponse { const message = createBaseMsgBeginRedelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null @@ -749,7 +751,7 @@ export const MsgUndelegate = { return obj; }, - fromPartial(object: DeepPartial): MsgUndelegate { + fromPartial, I>>(object: I): MsgUndelegate { const message = createBaseMsgUndelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -809,7 +811,7 @@ export const MsgUndelegateResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgUndelegateResponse { + fromPartial, I>>(object: I): MsgUndelegateResponse { const message = createBaseMsgUndelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index 62e76c81..d4164184 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -3,7 +3,7 @@ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { DeepPartial, Exact, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.tx.signing.v1beta1"; /** SignMode represents a signing mode with its own security guarantees. */ @@ -208,7 +208,7 @@ export const SignatureDescriptors = { return obj; }, - fromPartial(object: DeepPartial): SignatureDescriptors { + fromPartial, I>>(object: I): SignatureDescriptors { const message = createBaseSignatureDescriptors(); message.signatures = object.signatures?.map((e) => SignatureDescriptor.fromPartial(e)) || []; return message; @@ -288,7 +288,7 @@ export const SignatureDescriptor = { return obj; }, - fromPartial(object: DeepPartial): SignatureDescriptor { + fromPartial, I>>(object: I): SignatureDescriptor { const message = createBaseSignatureDescriptor(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -368,7 +368,9 @@ export const SignatureDescriptor_Data = { return obj; }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data { + fromPartial, I>>( + object: I, + ): SignatureDescriptor_Data { const message = createBaseSignatureDescriptor_Data(); message.single = object.single !== undefined && object.single !== null @@ -445,7 +447,9 @@ export const SignatureDescriptor_Data_Single = { return obj; }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data_Single { + fromPartial, I>>( + object: I, + ): SignatureDescriptor_Data_Single { const message = createBaseSignatureDescriptor_Data_Single(); message.mode = object.mode ?? 0; message.signature = object.signature ?? new Uint8Array(); @@ -522,7 +526,9 @@ export const SignatureDescriptor_Data_Multi = { return obj; }, - fromPartial(object: DeepPartial): SignatureDescriptor_Data_Multi { + fromPartial, I>>( + object: I, + ): SignatureDescriptor_Data_Multi { const message = createBaseSignatureDescriptor_Data_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index 279c1a15..db1d8248 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -6,7 +6,7 @@ import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; import { BlockID } from "../../../tendermint/types/types"; import { Block } from "../../../tendermint/types/block"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ @@ -331,7 +331,7 @@ export const GetTxsEventRequest = { return obj; }, - fromPartial(object: DeepPartial): GetTxsEventRequest { + fromPartial, I>>(object: I): GetTxsEventRequest { const message = createBaseGetTxsEventRequest(); message.events = object.events?.map((e) => e) || []; message.pagination = @@ -428,7 +428,7 @@ export const GetTxsEventResponse = { return obj; }, - fromPartial(object: DeepPartial): GetTxsEventResponse { + fromPartial, I>>(object: I): GetTxsEventResponse { const message = createBaseGetTxsEventResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.txResponses = object.txResponses?.map((e) => TxResponse.fromPartial(e)) || []; @@ -501,7 +501,7 @@ export const BroadcastTxRequest = { return obj; }, - fromPartial(object: DeepPartial): BroadcastTxRequest { + fromPartial, I>>(object: I): BroadcastTxRequest { const message = createBaseBroadcastTxRequest(); message.txBytes = object.txBytes ?? new Uint8Array(); message.mode = object.mode ?? 0; @@ -559,7 +559,7 @@ export const BroadcastTxResponse = { return obj; }, - fromPartial(object: DeepPartial): BroadcastTxResponse { + fromPartial, I>>(object: I): BroadcastTxResponse { const message = createBaseBroadcastTxResponse(); message.txResponse = object.txResponse !== undefined && object.txResponse !== null @@ -630,7 +630,7 @@ export const SimulateRequest = { return obj; }, - fromPartial(object: DeepPartial): SimulateRequest { + fromPartial, I>>(object: I): SimulateRequest { const message = createBaseSimulateRequest(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txBytes = object.txBytes ?? new Uint8Array(); @@ -699,7 +699,7 @@ export const SimulateResponse = { return obj; }, - fromPartial(object: DeepPartial): SimulateResponse { + fromPartial, I>>(object: I): SimulateResponse { const message = createBaseSimulateResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -760,7 +760,7 @@ export const GetTxRequest = { return obj; }, - fromPartial(object: DeepPartial): GetTxRequest { + fromPartial, I>>(object: I): GetTxRequest { const message = createBaseGetTxRequest(); message.hash = object.hash ?? ""; return message; @@ -828,7 +828,7 @@ export const GetTxResponse = { return obj; }, - fromPartial(object: DeepPartial): GetTxResponse { + fromPartial, I>>(object: I): GetTxResponse { const message = createBaseGetTxResponse(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txResponse = @@ -900,7 +900,7 @@ export const GetBlockWithTxsRequest = { return obj; }, - fromPartial(object: DeepPartial): GetBlockWithTxsRequest { + fromPartial, I>>(object: I): GetBlockWithTxsRequest { const message = createBaseGetBlockWithTxsRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1002,7 +1002,7 @@ export const GetBlockWithTxsResponse = { return obj; }, - fromPartial(object: DeepPartial): GetBlockWithTxsResponse { + fromPartial, I>>(object: I): GetBlockWithTxsResponse { const message = createBaseGetBlockWithTxsResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.blockId = diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 7fe4c2cd..26ee4fdb 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -5,7 +5,7 @@ import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/s import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** Tx is the standard type used for broadcasting transactions. */ @@ -310,7 +310,7 @@ export const Tx = { return obj; }, - fromPartial(object: DeepPartial): Tx { + fromPartial, I>>(object: I): Tx { const message = createBaseTx(); message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; @@ -408,7 +408,7 @@ export const TxRaw = { return obj; }, - fromPartial(object: DeepPartial): TxRaw { + fromPartial, I>>(object: I): TxRaw { const message = createBaseTxRaw(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -506,7 +506,7 @@ export const SignDoc = { return obj; }, - fromPartial(object: DeepPartial): SignDoc { + fromPartial, I>>(object: I): SignDoc { const message = createBaseSignDoc(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -636,7 +636,7 @@ export const TxBody = { return obj; }, - fromPartial(object: DeepPartial): TxBody { + fromPartial, I>>(object: I): TxBody { const message = createBaseTxBody(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; message.memo = object.memo ?? ""; @@ -719,7 +719,7 @@ export const AuthInfo = { return obj; }, - fromPartial(object: DeepPartial): AuthInfo { + fromPartial, I>>(object: I): AuthInfo { const message = createBaseAuthInfo(); message.signerInfos = object.signerInfos?.map((e) => SignerInfo.fromPartial(e)) || []; message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; @@ -800,7 +800,7 @@ export const SignerInfo = { return obj; }, - fromPartial(object: DeepPartial): SignerInfo { + fromPartial, I>>(object: I): SignerInfo { const message = createBaseSignerInfo(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -880,7 +880,7 @@ export const ModeInfo = { return obj; }, - fromPartial(object: DeepPartial): ModeInfo { + fromPartial, I>>(object: I): ModeInfo { const message = createBaseModeInfo(); message.single = object.single !== undefined && object.single !== null @@ -943,7 +943,7 @@ export const ModeInfo_Single = { return obj; }, - fromPartial(object: DeepPartial): ModeInfo_Single { + fromPartial, I>>(object: I): ModeInfo_Single { const message = createBaseModeInfo_Single(); message.mode = object.mode ?? 0; return message; @@ -1019,7 +1019,7 @@ export const ModeInfo_Multi = { return obj; }, - fromPartial(object: DeepPartial): ModeInfo_Multi { + fromPartial, I>>(object: I): ModeInfo_Multi { const message = createBaseModeInfo_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null @@ -1118,7 +1118,7 @@ export const Fee = { return obj; }, - fromPartial(object: DeepPartial): Fee { + fromPartial, I>>(object: I): Fee { const message = createBaseFee(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.gasLimit = diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index d30e928d..3bc75d65 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -125,7 +125,7 @@ export const QueryCurrentPlanRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryCurrentPlanRequest { + fromPartial, I>>(_: I): QueryCurrentPlanRequest { const message = createBaseQueryCurrentPlanRequest(); return message; }, @@ -180,7 +180,9 @@ export const QueryCurrentPlanResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryCurrentPlanResponse { + fromPartial, I>>( + object: I, + ): QueryCurrentPlanResponse { const message = createBaseQueryCurrentPlanResponse(); message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; @@ -237,7 +239,7 @@ export const QueryAppliedPlanRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAppliedPlanRequest { + fromPartial, I>>(object: I): QueryAppliedPlanRequest { const message = createBaseQueryAppliedPlanRequest(); message.name = object.name ?? ""; return message; @@ -293,7 +295,9 @@ export const QueryAppliedPlanResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAppliedPlanResponse { + fromPartial, I>>( + object: I, + ): QueryAppliedPlanResponse { const message = createBaseQueryAppliedPlanResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -350,7 +354,9 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateRequest { + fromPartial, I>>( + object: I, + ): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); message.lastHeight = object.lastHeight !== undefined && object.lastHeight !== null @@ -414,7 +420,9 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { + fromPartial, I>>( + object: I, + ): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState ?? new Uint8Array(); return message; @@ -470,7 +478,9 @@ export const QueryModuleVersionsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryModuleVersionsRequest { + fromPartial, I>>( + object: I, + ): QueryModuleVersionsRequest { const message = createBaseQueryModuleVersionsRequest(); message.moduleName = object.moduleName ?? ""; return message; @@ -534,7 +544,9 @@ export const QueryModuleVersionsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryModuleVersionsResponse { + fromPartial, I>>( + object: I, + ): QueryModuleVersionsResponse { const message = createBaseQueryModuleVersionsResponse(); message.moduleVersions = object.moduleVersions?.map((e) => ModuleVersion.fromPartial(e)) || []; return message; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index 1f4e8861..ffaa2080 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -3,7 +3,7 @@ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** Plan specifies information about a planned upgrade and when it should occur. */ @@ -180,7 +180,7 @@ export const Plan = { return obj; }, - fromPartial(object: DeepPartial): Plan { + fromPartial, I>>(object: I): Plan { const message = createBasePlan(); message.name = object.name ?? ""; message.time = @@ -267,7 +267,7 @@ export const SoftwareUpgradeProposal = { return obj; }, - fromPartial(object: DeepPartial): SoftwareUpgradeProposal { + fromPartial, I>>(object: I): SoftwareUpgradeProposal { const message = createBaseSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -337,7 +337,9 @@ export const CancelSoftwareUpgradeProposal = { return obj; }, - fromPartial(object: DeepPartial): CancelSoftwareUpgradeProposal { + fromPartial, I>>( + object: I, + ): CancelSoftwareUpgradeProposal { const message = createBaseCancelSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -405,7 +407,7 @@ export const ModuleVersion = { return obj; }, - fromPartial(object: DeepPartial): ModuleVersion { + fromPartial, I>>(object: I): ModuleVersion { const message = createBaseModuleVersion(); message.name = object.name ?? ""; message.version = diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 4d8dcff9..2e62ae5c 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Rpc } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting @@ -119,7 +119,7 @@ export const MsgCreateVestingAccount = { return obj; }, - fromPartial(object: DeepPartial): MsgCreateVestingAccount { + fromPartial, I>>(object: I): MsgCreateVestingAccount { const message = createBaseMsgCreateVestingAccount(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -167,7 +167,9 @@ export const MsgCreateVestingAccountResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgCreateVestingAccountResponse { + fromPartial, I>>( + _: I, + ): MsgCreateVestingAccountResponse { const message = createBaseMsgCreateVestingAccountResponse(); return message; }, diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index e91d2ee7..03f5a6d5 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -3,7 +3,7 @@ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all @@ -179,7 +179,7 @@ export const BaseVestingAccount = { return obj; }, - fromPartial(object: DeepPartial): BaseVestingAccount { + fromPartial, I>>(object: I): BaseVestingAccount { const message = createBaseBaseVestingAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -259,7 +259,9 @@ export const ContinuousVestingAccount = { return obj; }, - fromPartial(object: DeepPartial): ContinuousVestingAccount { + fromPartial, I>>( + object: I, + ): ContinuousVestingAccount { const message = createBaseContinuousVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -327,7 +329,7 @@ export const DelayedVestingAccount = { return obj; }, - fromPartial(object: DeepPartial): DelayedVestingAccount { + fromPartial, I>>(object: I): DelayedVestingAccount { const message = createBaseDelayedVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -403,7 +405,7 @@ export const Period = { return obj; }, - fromPartial(object: DeepPartial): Period { + fromPartial, I>>(object: I): Period { const message = createBasePeriod(); message.length = object.length !== undefined && object.length !== null ? Long.fromValue(object.length) : Long.ZERO; @@ -496,7 +498,7 @@ export const PeriodicVestingAccount = { return obj; }, - fromPartial(object: DeepPartial): PeriodicVestingAccount { + fromPartial, I>>(object: I): PeriodicVestingAccount { const message = createBasePeriodicVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -565,7 +567,7 @@ export const PermanentLockedAccount = { return obj; }, - fromPartial(object: DeepPartial): PermanentLockedAccount { + fromPartial, I>>(object: I): PermanentLockedAccount { const message = createBasePermanentLockedAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index daee5486..e3331f54 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -3,7 +3,7 @@ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** GenesisState - genesis state of x/wasm */ @@ -168,7 +168,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -262,7 +262,7 @@ export const GenesisState_GenMsgs = { return obj; }, - fromPartial(object: DeepPartial): GenesisState_GenMsgs { + fromPartial, I>>(object: I): GenesisState_GenMsgs { const message = createBaseGenesisState_GenMsgs(); message.storeCode = object.storeCode !== undefined && object.storeCode !== null @@ -366,7 +366,7 @@ export const Code = { return obj; }, - fromPartial(object: DeepPartial): Code { + fromPartial, I>>(object: I): Code { const message = createBaseCode(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -460,7 +460,7 @@ export const Contract = { return obj; }, - fromPartial(object: DeepPartial): Contract { + fromPartial, I>>(object: I): Contract { const message = createBaseContract(); message.contractAddress = object.contractAddress ?? ""; message.contractInfo = @@ -533,7 +533,7 @@ export const Sequence = { return obj; }, - fromPartial(object: DeepPartial): Sequence { + fromPartial, I>>(object: I): Sequence { const message = createBaseSequence(); message.idKey = object.idKey ?? new Uint8Array(); message.value = diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index c43ed682..c6505e0a 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgIBCSend */ @@ -118,7 +118,7 @@ export const MsgIBCSend = { return obj; }, - fromPartial(object: DeepPartial): MsgIBCSend { + fromPartial, I>>(object: I): MsgIBCSend { const message = createBaseMsgIBCSend(); message.channel = object.channel ?? ""; message.timeoutHeight = @@ -183,7 +183,7 @@ export const MsgIBCCloseChannel = { return obj; }, - fromPartial(object: DeepPartial): MsgIBCCloseChannel { + fromPartial, I>>(object: I): MsgIBCCloseChannel { const message = createBaseMsgIBCCloseChannel(); message.channel = object.channel ?? ""; return message; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index e76137df..0fe4a57e 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -3,7 +3,7 @@ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** StoreCodeProposal gov proposal content type to submit WASM code to the system */ @@ -302,7 +302,7 @@ export const StoreCodeProposal = { return obj; }, - fromPartial(object: DeepPartial): StoreCodeProposal { + fromPartial, I>>(object: I): StoreCodeProposal { const message = createBaseStoreCodeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -449,7 +449,9 @@ export const InstantiateContractProposal = { return obj; }, - fromPartial(object: DeepPartial): InstantiateContractProposal { + fromPartial, I>>( + object: I, + ): InstantiateContractProposal { const message = createBaseInstantiateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -558,7 +560,7 @@ export const MigrateContractProposal = { return obj; }, - fromPartial(object: DeepPartial): MigrateContractProposal { + fromPartial, I>>(object: I): MigrateContractProposal { const message = createBaseMigrateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -653,7 +655,7 @@ export const SudoContractProposal = { return obj; }, - fromPartial(object: DeepPartial): SudoContractProposal { + fromPartial, I>>(object: I): SudoContractProposal { const message = createBaseSudoContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -774,7 +776,7 @@ export const ExecuteContractProposal = { return obj; }, - fromPartial(object: DeepPartial): ExecuteContractProposal { + fromPartial, I>>(object: I): ExecuteContractProposal { const message = createBaseExecuteContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -868,7 +870,7 @@ export const UpdateAdminProposal = { return obj; }, - fromPartial(object: DeepPartial): UpdateAdminProposal { + fromPartial, I>>(object: I): UpdateAdminProposal { const message = createBaseUpdateAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -949,7 +951,7 @@ export const ClearAdminProposal = { return obj; }, - fromPartial(object: DeepPartial): ClearAdminProposal { + fromPartial, I>>(object: I): ClearAdminProposal { const message = createBaseClearAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1047,7 +1049,7 @@ export const PinCodesProposal = { return obj; }, - fromPartial(object: DeepPartial): PinCodesProposal { + fromPartial, I>>(object: I): PinCodesProposal { const message = createBasePinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1145,7 +1147,7 @@ export const UnpinCodesProposal = { return obj; }, - fromPartial(object: DeepPartial): UnpinCodesProposal { + fromPartial, I>>(object: I): UnpinCodesProposal { const message = createBaseUnpinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1219,7 +1221,7 @@ export const AccessConfigUpdate = { return obj; }, - fromPartial(object: DeepPartial): AccessConfigUpdate { + fromPartial, I>>(object: I): AccessConfigUpdate { const message = createBaseAccessConfigUpdate(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1312,7 +1314,9 @@ export const UpdateInstantiateConfigProposal = { return obj; }, - fromPartial(object: DeepPartial): UpdateInstantiateConfigProposal { + fromPartial, I>>( + object: I, + ): UpdateInstantiateConfigProposal { const message = createBaseUpdateInstantiateConfigProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index f5122ab0..8191a507 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -239,7 +239,9 @@ export const QueryContractInfoRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryContractInfoRequest { + fromPartial, I>>( + object: I, + ): QueryContractInfoRequest { const message = createBaseQueryContractInfoRequest(); message.address = object.address ?? ""; return message; @@ -307,7 +309,9 @@ export const QueryContractInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryContractInfoResponse { + fromPartial, I>>( + object: I, + ): QueryContractInfoResponse { const message = createBaseQueryContractInfoResponse(); message.address = object.address ?? ""; message.contractInfo = @@ -379,7 +383,9 @@ export const QueryContractHistoryRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryContractHistoryRequest { + fromPartial, I>>( + object: I, + ): QueryContractHistoryRequest { const message = createBaseQueryContractHistoryRequest(); message.address = object.address ?? ""; message.pagination = @@ -459,7 +465,9 @@ export const QueryContractHistoryResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryContractHistoryResponse { + fromPartial, I>>( + object: I, + ): QueryContractHistoryResponse { const message = createBaseQueryContractHistoryResponse(); message.entries = object.entries?.map((e) => ContractCodeHistoryEntry.fromPartial(e)) || []; message.pagination = @@ -531,7 +539,9 @@ export const QueryContractsByCodeRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryContractsByCodeRequest { + fromPartial, I>>( + object: I, + ): QueryContractsByCodeRequest { const message = createBaseQueryContractsByCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -610,7 +620,9 @@ export const QueryContractsByCodeResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryContractsByCodeResponse { + fromPartial, I>>( + object: I, + ): QueryContractsByCodeResponse { const message = createBaseQueryContractsByCodeResponse(); message.contracts = object.contracts?.map((e) => e) || []; message.pagination = @@ -682,7 +694,9 @@ export const QueryAllContractStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllContractStateRequest { + fromPartial, I>>( + object: I, + ): QueryAllContractStateRequest { const message = createBaseQueryAllContractStateRequest(); message.address = object.address ?? ""; message.pagination = @@ -760,7 +774,9 @@ export const QueryAllContractStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryAllContractStateResponse { + fromPartial, I>>( + object: I, + ): QueryAllContractStateResponse { const message = createBaseQueryAllContractStateResponse(); message.models = object.models?.map((e) => Model.fromPartial(e)) || []; message.pagination = @@ -834,7 +850,9 @@ export const QueryRawContractStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryRawContractStateRequest { + fromPartial, I>>( + object: I, + ): QueryRawContractStateRequest { const message = createBaseQueryRawContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -892,7 +910,9 @@ export const QueryRawContractStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryRawContractStateResponse { + fromPartial, I>>( + object: I, + ): QueryRawContractStateResponse { const message = createBaseQueryRawContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -962,7 +982,9 @@ export const QuerySmartContractStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QuerySmartContractStateRequest { + fromPartial, I>>( + object: I, + ): QuerySmartContractStateRequest { const message = createBaseQuerySmartContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -1020,7 +1042,9 @@ export const QuerySmartContractStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QuerySmartContractStateResponse { + fromPartial, I>>( + object: I, + ): QuerySmartContractStateResponse { const message = createBaseQuerySmartContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -1076,7 +1100,7 @@ export const QueryCodeRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryCodeRequest { + fromPartial, I>>(object: I): QueryCodeRequest { const message = createBaseQueryCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1172,7 +1196,7 @@ export const CodeInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): CodeInfoResponse { + fromPartial, I>>(object: I): CodeInfoResponse { const message = createBaseCodeInfoResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1248,7 +1272,7 @@ export const QueryCodeResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryCodeResponse { + fromPartial, I>>(object: I): QueryCodeResponse { const message = createBaseQueryCodeResponse(); message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null @@ -1309,7 +1333,7 @@ export const QueryCodesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryCodesRequest { + fromPartial, I>>(object: I): QueryCodesRequest { const message = createBaseQueryCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1388,7 +1412,7 @@ export const QueryCodesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryCodesResponse { + fromPartial, I>>(object: I): QueryCodesResponse { const message = createBaseQueryCodesResponse(); message.codeInfos = object.codeInfos?.map((e) => CodeInfoResponse.fromPartial(e)) || []; message.pagination = @@ -1449,7 +1473,7 @@ export const QueryPinnedCodesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPinnedCodesRequest { + fromPartial, I>>(object: I): QueryPinnedCodesRequest { const message = createBaseQueryPinnedCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1539,7 +1563,9 @@ export const QueryPinnedCodesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPinnedCodesResponse { + fromPartial, I>>( + object: I, + ): QueryPinnedCodesResponse { const message = createBaseQueryPinnedCodesResponse(); message.codeIds = object.codeIds?.map((e) => Long.fromValue(e)) || []; message.pagination = diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index b974a4fb..b435c1bd 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -3,7 +3,7 @@ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Long, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgStoreCode submit Wasm code to the system */ @@ -211,7 +211,7 @@ export const MsgStoreCode = { return obj; }, - fromPartial(object: DeepPartial): MsgStoreCode { + fromPartial, I>>(object: I): MsgStoreCode { const message = createBaseMsgStoreCode(); message.sender = object.sender ?? ""; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); @@ -272,7 +272,7 @@ export const MsgStoreCodeResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgStoreCodeResponse { + fromPartial, I>>(object: I): MsgStoreCodeResponse { const message = createBaseMsgStoreCodeResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -391,7 +391,7 @@ export const MsgInstantiateContract = { return obj; }, - fromPartial(object: DeepPartial): MsgInstantiateContract { + fromPartial, I>>(object: I): MsgInstantiateContract { const message = createBaseMsgInstantiateContract(); message.sender = object.sender ?? ""; message.admin = object.admin ?? ""; @@ -465,7 +465,9 @@ export const MsgInstantiateContractResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgInstantiateContractResponse { + fromPartial, I>>( + object: I, + ): MsgInstantiateContractResponse { const message = createBaseMsgInstantiateContractResponse(); message.address = object.address ?? ""; message.data = object.data ?? new Uint8Array(); @@ -562,7 +564,7 @@ export const MsgExecuteContract = { return obj; }, - fromPartial(object: DeepPartial): MsgExecuteContract { + fromPartial, I>>(object: I): MsgExecuteContract { const message = createBaseMsgExecuteContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -622,7 +624,9 @@ export const MsgExecuteContractResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgExecuteContractResponse { + fromPartial, I>>( + object: I, + ): MsgExecuteContractResponse { const message = createBaseMsgExecuteContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -712,7 +716,7 @@ export const MsgMigrateContract = { return obj; }, - fromPartial(object: DeepPartial): MsgMigrateContract { + fromPartial, I>>(object: I): MsgMigrateContract { const message = createBaseMsgMigrateContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -773,7 +777,9 @@ export const MsgMigrateContractResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgMigrateContractResponse { + fromPartial, I>>( + object: I, + ): MsgMigrateContractResponse { const message = createBaseMsgMigrateContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -851,7 +857,7 @@ export const MsgUpdateAdmin = { return obj; }, - fromPartial(object: DeepPartial): MsgUpdateAdmin { + fromPartial, I>>(object: I): MsgUpdateAdmin { const message = createBaseMsgUpdateAdmin(); message.sender = object.sender ?? ""; message.newAdmin = object.newAdmin ?? ""; @@ -896,7 +902,7 @@ export const MsgUpdateAdminResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgUpdateAdminResponse { + fromPartial, I>>(_: I): MsgUpdateAdminResponse { const message = createBaseMsgUpdateAdminResponse(); return message; }, @@ -962,7 +968,7 @@ export const MsgClearAdmin = { return obj; }, - fromPartial(object: DeepPartial): MsgClearAdmin { + fromPartial, I>>(object: I): MsgClearAdmin { const message = createBaseMsgClearAdmin(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -1006,7 +1012,7 @@ export const MsgClearAdminResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgClearAdminResponse { + fromPartial, I>>(_: I): MsgClearAdminResponse { const message = createBaseMsgClearAdminResponse(); return message; }, diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 0c5a7175..072dd772 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** AccessType permission types */ @@ -266,7 +266,7 @@ export const AccessTypeParam = { return obj; }, - fromPartial(object: DeepPartial): AccessTypeParam { + fromPartial, I>>(object: I): AccessTypeParam { const message = createBaseAccessTypeParam(); message.value = object.value ?? 0; return message; @@ -333,7 +333,7 @@ export const AccessConfig = { return obj; }, - fromPartial(object: DeepPartial): AccessConfig { + fromPartial, I>>(object: I): AccessConfig { const message = createBaseAccessConfig(); message.permission = object.permission ?? 0; message.address = object.address ?? ""; @@ -409,7 +409,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.codeUploadAccess = object.codeUploadAccess !== undefined && object.codeUploadAccess !== null @@ -497,7 +497,7 @@ export const CodeInfo = { return obj; }, - fromPartial(object: DeepPartial): CodeInfo { + fromPartial, I>>(object: I): CodeInfo { const message = createBaseCodeInfo(); message.codeHash = object.codeHash ?? new Uint8Array(); message.creator = object.creator ?? ""; @@ -626,7 +626,7 @@ export const ContractInfo = { return obj; }, - fromPartial(object: DeepPartial): ContractInfo { + fromPartial, I>>(object: I): ContractInfo { const message = createBaseContractInfo(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -731,7 +731,9 @@ export const ContractCodeHistoryEntry = { return obj; }, - fromPartial(object: DeepPartial): ContractCodeHistoryEntry { + fromPartial, I>>( + object: I, + ): ContractCodeHistoryEntry { const message = createBaseContractCodeHistoryEntry(); message.operation = object.operation ?? 0; message.codeId = @@ -805,7 +807,7 @@ export const AbsoluteTxPosition = { return obj; }, - fromPartial(object: DeepPartial): AbsoluteTxPosition { + fromPartial, I>>(object: I): AbsoluteTxPosition { const message = createBaseAbsoluteTxPosition(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -879,7 +881,7 @@ export const Model = { return obj; }, - fromPartial(object: DeepPartial): Model { + fromPartial, I>>(object: I): Model { const message = createBaseModel(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts index 4c7ad40c..405bc8fc 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -62,7 +62,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.controllerEnabled = object.controllerEnabled ?? false; return message; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/ibc/applications/interchain_accounts/controller/v1/query.ts index e6a21212..83a87986 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./controller"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Rpc } from "../../../../../helpers"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +50,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +105,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/host/v1/host.ts b/src/ibc/applications/interchain_accounts/host/v1/host.ts index 3904efbb..4c663c20 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -84,7 +84,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.hostEnabled = object.hostEnabled ?? false; message.allowMessages = object.allowMessages?.map((e) => e) || []; diff --git a/src/ibc/applications/interchain_accounts/host/v1/query.ts b/src/ibc/applications/interchain_accounts/host/v1/query.ts index 4a91e8ed..9b2090e7 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/query.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Params } from "./host"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Rpc } from "../../../../../helpers"; +import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +50,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +105,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/v1/account.ts b/src/ibc/applications/interchain_accounts/v1/account.ts index d030ee8a..2d07c82d 100644 --- a/src/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/ibc/applications/interchain_accounts/v1/account.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { BaseAccount } from "../../../../cosmos/auth/v1beta1/auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ @@ -72,7 +72,7 @@ export const InterchainAccount = { return obj; }, - fromPartial(object: DeepPartial): InterchainAccount { + fromPartial, I>>(object: I): InterchainAccount { const message = createBaseInterchainAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null diff --git a/src/ibc/applications/interchain_accounts/v1/genesis.ts b/src/ibc/applications/interchain_accounts/v1/genesis.ts index 0db4951c..94cc057b 100644 --- a/src/ibc/applications/interchain_accounts/v1/genesis.ts +++ b/src/ibc/applications/interchain_accounts/v1/genesis.ts @@ -3,7 +3,7 @@ import { Params as Params1 } from "../controller/v1/controller"; import { Params as Params2 } from "../host/v1/host"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** GenesisState defines the interchain accounts genesis state */ @@ -112,7 +112,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.controllerGenesisState = object.controllerGenesisState !== undefined && object.controllerGenesisState !== null @@ -231,7 +231,7 @@ export const ControllerGenesisState = { return obj; }, - fromPartial(object: DeepPartial): ControllerGenesisState { + fromPartial, I>>(object: I): ControllerGenesisState { const message = createBaseControllerGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -343,7 +343,7 @@ export const HostGenesisState = { return obj; }, - fromPartial(object: DeepPartial): HostGenesisState { + fromPartial, I>>(object: I): HostGenesisState { const message = createBaseHostGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -426,7 +426,7 @@ export const ActiveChannel = { return obj; }, - fromPartial(object: DeepPartial): ActiveChannel { + fromPartial, I>>(object: I): ActiveChannel { const message = createBaseActiveChannel(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; @@ -506,7 +506,9 @@ export const RegisteredInterchainAccount = { return obj; }, - fromPartial(object: DeepPartial): RegisteredInterchainAccount { + fromPartial, I>>( + object: I, + ): RegisteredInterchainAccount { const message = createBaseRegisteredInterchainAccount(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/metadata.ts b/src/ibc/applications/interchain_accounts/v1/metadata.ts index 31473042..214c6920 100644 --- a/src/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring @@ -138,7 +138,7 @@ export const Metadata = { return obj; }, - fromPartial(object: DeepPartial): Metadata { + fromPartial, I>>(object: I): Metadata { const message = createBaseMetadata(); message.version = object.version ?? ""; message.controllerConnectionId = object.controllerConnectionId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/packet.ts b/src/ibc/applications/interchain_accounts/v1/packet.ts index eb8a5d11..c73057f5 100644 --- a/src/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/ibc/applications/interchain_accounts/v1/packet.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Type defines a classification of message issued from a controller chain to its associated interchain accounts @@ -131,7 +131,9 @@ export const InterchainAccountPacketData = { return obj; }, - fromPartial(object: DeepPartial): InterchainAccountPacketData { + fromPartial, I>>( + object: I, + ): InterchainAccountPacketData { const message = createBaseInterchainAccountPacketData(); message.type = object.type ?? 0; message.data = object.data ?? new Uint8Array(); @@ -195,7 +197,7 @@ export const CosmosTx = { return obj; }, - fromPartial(object: DeepPartial): CosmosTx { + fromPartial, I>>(object: I): CosmosTx { const message = createBaseCosmosTx(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index bc38f75e..9e0d172b 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** GenesisState defines the ibc-transfer genesis state */ @@ -91,7 +91,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.portId = object.portId ?? ""; message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index 23620342..d2ffc03a 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -3,7 +3,7 @@ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC @@ -121,7 +121,7 @@ export const QueryDenomTraceRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomTraceRequest { + fromPartial, I>>(object: I): QueryDenomTraceRequest { const message = createBaseQueryDenomTraceRequest(); message.hash = object.hash ?? ""; return message; @@ -178,7 +178,7 @@ export const QueryDenomTraceResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomTraceResponse { + fromPartial, I>>(object: I): QueryDenomTraceResponse { const message = createBaseQueryDenomTraceResponse(); message.denomTrace = object.denomTrace !== undefined && object.denomTrace !== null @@ -238,7 +238,7 @@ export const QueryDenomTracesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomTracesRequest { + fromPartial, I>>(object: I): QueryDenomTracesRequest { const message = createBaseQueryDenomTracesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -317,7 +317,9 @@ export const QueryDenomTracesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomTracesResponse { + fromPartial, I>>( + object: I, + ): QueryDenomTracesResponse { const message = createBaseQueryDenomTracesResponse(); message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; message.pagination = @@ -364,7 +366,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryParamsRequest { + fromPartial, I>>(_: I): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -419,7 +421,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryParamsResponse { + fromPartial, I>>(object: I): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -476,7 +478,7 @@ export const QueryDenomHashRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomHashRequest { + fromPartial, I>>(object: I): QueryDenomHashRequest { const message = createBaseQueryDenomHashRequest(); message.trace = object.trace ?? ""; return message; @@ -532,7 +534,7 @@ export const QueryDenomHashResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryDenomHashResponse { + fromPartial, I>>(object: I): QueryDenomHashResponse { const message = createBaseQueryDenomHashResponse(); message.hash = object.hash ?? ""; return message; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index 73c1cb0b..a199ac13 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * DenomTrace contains the base denomination for ICS20 fungible tokens and the @@ -99,7 +99,7 @@ export const DenomTrace = { return obj; }, - fromPartial(object: DeepPartial): DenomTrace { + fromPartial, I>>(object: I): DenomTrace { const message = createBaseDenomTrace(); message.path = object.path ?? ""; message.baseDenom = object.baseDenom ?? ""; @@ -167,7 +167,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled ?? false; message.receiveEnabled = object.receiveEnabled ?? false; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index fdf314df..f361fba8 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -3,7 +3,7 @@ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between @@ -160,7 +160,7 @@ export const MsgTransfer = { return obj; }, - fromPartial(object: DeepPartial): MsgTransfer { + fromPartial, I>>(object: I): MsgTransfer { const message = createBaseMsgTransfer(); message.sourcePort = object.sourcePort ?? ""; message.sourceChannel = object.sourceChannel ?? ""; @@ -216,7 +216,7 @@ export const MsgTransferResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgTransferResponse { + fromPartial, I>>(_: I): MsgTransferResponse { const message = createBaseMsgTransferResponse(); return message; }, diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index e7cbf4b3..ab7b519e 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v2"; /** * FungibleTokenPacketData defines a struct for the packet payload @@ -105,7 +105,7 @@ export const FungibleTokenPacketData = { return obj; }, - fromPartial(object: DeepPartial): FungibleTokenPacketData { + fromPartial, I>>(object: I): FungibleTokenPacketData { const message = createBaseFungibleTokenPacketData(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index f61a5daf..efe66cdc 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** * State defines if a channel is in one of the following states: @@ -366,7 +366,7 @@ export const Channel = { return obj; }, - fromPartial(object: DeepPartial): Channel { + fromPartial, I>>(object: I): Channel { const message = createBaseChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -504,7 +504,7 @@ export const IdentifiedChannel = { return obj; }, - fromPartial(object: DeepPartial): IdentifiedChannel { + fromPartial, I>>(object: I): IdentifiedChannel { const message = createBaseIdentifiedChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -580,7 +580,7 @@ export const Counterparty = { return obj; }, - fromPartial(object: DeepPartial): Counterparty { + fromPartial, I>>(object: I): Counterparty { const message = createBaseCounterparty(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -717,7 +717,7 @@ export const Packet = { return obj; }, - fromPartial(object: DeepPartial): Packet { + fromPartial, I>>(object: I): Packet { const message = createBasePacket(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -823,7 +823,7 @@ export const PacketState = { return obj; }, - fromPartial(object: DeepPartial): PacketState { + fromPartial, I>>(object: I): PacketState { const message = createBasePacketState(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -897,7 +897,7 @@ export const Acknowledgement = { return obj; }, - fromPartial(object: DeepPartial): Acknowledgement { + fromPartial, I>>(object: I): Acknowledgement { const message = createBaseAcknowledgement(); message.result = object.result ?? undefined; message.error = object.error ?? undefined; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index ad8b12c1..5e98b394 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** GenesisState defines the ibc channel submodule's genesis state. */ @@ -208,7 +208,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; @@ -296,7 +296,7 @@ export const PacketSequence = { return obj; }, - fromPartial(object: DeepPartial): PacketSequence { + fromPartial, I>>(object: I): PacketSequence { const message = createBasePacketSequence(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 7afa45c1..0e40c1e7 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -5,7 +5,7 @@ import { Channel, IdentifiedChannel, PacketState } from "./channel"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** QueryChannelRequest is the request type for the Query/Channel RPC method */ @@ -436,7 +436,7 @@ export const QueryChannelRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelRequest { + fromPartial, I>>(object: I): QueryChannelRequest { const message = createBaseQueryChannelRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -518,7 +518,7 @@ export const QueryChannelResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelResponse { + fromPartial, I>>(object: I): QueryChannelResponse { const message = createBaseQueryChannelResponse(); message.channel = object.channel !== undefined && object.channel !== null @@ -583,7 +583,7 @@ export const QueryChannelsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelsRequest { + fromPartial, I>>(object: I): QueryChannelsRequest { const message = createBaseQueryChannelsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -673,7 +673,7 @@ export const QueryChannelsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelsResponse { + fromPartial, I>>(object: I): QueryChannelsResponse { const message = createBaseQueryChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -747,7 +747,9 @@ export const QueryConnectionChannelsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionChannelsRequest { + fromPartial, I>>( + object: I, + ): QueryConnectionChannelsRequest { const message = createBaseQueryConnectionChannelsRequest(); message.connection = object.connection ?? ""; message.pagination = @@ -838,7 +840,9 @@ export const QueryConnectionChannelsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionChannelsResponse { + fromPartial, I>>( + object: I, + ): QueryConnectionChannelsResponse { const message = createBaseQueryConnectionChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -911,7 +915,9 @@ export const QueryChannelClientStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelClientStateRequest { + fromPartial, I>>( + object: I, + ): QueryChannelClientStateRequest { const message = createBaseQueryChannelClientStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -997,7 +1003,9 @@ export const QueryChannelClientStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelClientStateResponse { + fromPartial, I>>( + object: I, + ): QueryChannelClientStateResponse { const message = createBaseQueryChannelClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -1096,7 +1104,9 @@ export const QueryChannelConsensusStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelConsensusStateRequest { + fromPartial, I>>( + object: I, + ): QueryChannelConsensusStateRequest { const message = createBaseQueryChannelConsensusStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1197,7 +1207,9 @@ export const QueryChannelConsensusStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryChannelConsensusStateResponse { + fromPartial, I>>( + object: I, + ): QueryChannelConsensusStateResponse { const message = createBaseQueryChannelConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -1284,7 +1296,9 @@ export const QueryPacketCommitmentRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketCommitmentRequest { + fromPartial, I>>( + object: I, + ): QueryPacketCommitmentRequest { const message = createBaseQueryPacketCommitmentRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1372,7 +1386,9 @@ export const QueryPacketCommitmentResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketCommitmentResponse { + fromPartial, I>>( + object: I, + ): QueryPacketCommitmentResponse { const message = createBaseQueryPacketCommitmentResponse(); message.commitment = object.commitment ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -1456,7 +1472,9 @@ export const QueryPacketCommitmentsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketCommitmentsRequest { + fromPartial, I>>( + object: I, + ): QueryPacketCommitmentsRequest { const message = createBaseQueryPacketCommitmentsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1548,7 +1566,9 @@ export const QueryPacketCommitmentsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketCommitmentsResponse { + fromPartial, I>>( + object: I, + ): QueryPacketCommitmentsResponse { const message = createBaseQueryPacketCommitmentsResponse(); message.commitments = object.commitments?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -1632,7 +1652,9 @@ export const QueryPacketReceiptRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketReceiptRequest { + fromPartial, I>>( + object: I, + ): QueryPacketReceiptRequest { const message = createBaseQueryPacketReceiptRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1717,7 +1739,9 @@ export const QueryPacketReceiptResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketReceiptResponse { + fromPartial, I>>( + object: I, + ): QueryPacketReceiptResponse { const message = createBaseQueryPacketReceiptResponse(); message.received = object.received ?? false; message.proof = object.proof ?? new Uint8Array(); @@ -1800,7 +1824,9 @@ export const QueryPacketAcknowledgementRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementRequest { + fromPartial, I>>( + object: I, + ): QueryPacketAcknowledgementRequest { const message = createBaseQueryPacketAcknowledgementRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1890,7 +1916,9 @@ export const QueryPacketAcknowledgementResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementResponse { + fromPartial, I>>( + object: I, + ): QueryPacketAcknowledgementResponse { const message = createBaseQueryPacketAcknowledgementResponse(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -2007,7 +2035,9 @@ export const QueryPacketAcknowledgementsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsRequest { + fromPartial, I>>( + object: I, + ): QueryPacketAcknowledgementsRequest { const message = createBaseQueryPacketAcknowledgementsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2100,7 +2130,9 @@ export const QueryPacketAcknowledgementsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryPacketAcknowledgementsResponse { + fromPartial, I>>( + object: I, + ): QueryPacketAcknowledgementsResponse { const message = createBaseQueryPacketAcknowledgementsResponse(); message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -2206,7 +2238,9 @@ export const QueryUnreceivedPacketsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryUnreceivedPacketsRequest { + fromPartial, I>>( + object: I, + ): QueryUnreceivedPacketsRequest { const message = createBaseQueryUnreceivedPacketsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2294,7 +2328,9 @@ export const QueryUnreceivedPacketsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUnreceivedPacketsResponse { + fromPartial, I>>( + object: I, + ): QueryUnreceivedPacketsResponse { const message = createBaseQueryUnreceivedPacketsResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2394,7 +2430,9 @@ export const QueryUnreceivedAcksRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryUnreceivedAcksRequest { + fromPartial, I>>( + object: I, + ): QueryUnreceivedAcksRequest { const message = createBaseQueryUnreceivedAcksRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2482,7 +2520,9 @@ export const QueryUnreceivedAcksResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUnreceivedAcksResponse { + fromPartial, I>>( + object: I, + ): QueryUnreceivedAcksResponse { const message = createBaseQueryUnreceivedAcksResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2551,7 +2591,9 @@ export const QueryNextSequenceReceiveRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryNextSequenceReceiveRequest { + fromPartial, I>>( + object: I, + ): QueryNextSequenceReceiveRequest { const message = createBaseQueryNextSequenceReceiveRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2635,7 +2677,9 @@ export const QueryNextSequenceReceiveResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryNextSequenceReceiveResponse { + fromPartial, I>>( + object: I, + ): QueryNextSequenceReceiveResponse { const message = createBaseQueryNextSequenceReceiveResponse(); message.nextSequenceReceive = object.nextSequenceReceive !== undefined && object.nextSequenceReceive !== null diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index 17290308..be8eba06 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -3,7 +3,7 @@ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** ResponseResultType defines the possible outcomes of the execution of a message */ @@ -289,7 +289,7 @@ export const MsgChannelOpenInit = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelOpenInit { + fromPartial, I>>(object: I): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); message.portId = object.portId ?? ""; message.channel = @@ -350,7 +350,9 @@ export const MsgChannelOpenInitResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelOpenInitResponse { + fromPartial, I>>( + object: I, + ): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); message.channelId = object.channelId ?? ""; return message; @@ -477,7 +479,7 @@ export const MsgChannelOpenTry = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelOpenTry { + fromPartial, I>>(object: I): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); message.portId = object.portId ?? ""; message.previousChannelId = object.previousChannelId ?? ""; @@ -532,7 +534,7 @@ export const MsgChannelOpenTryResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgChannelOpenTryResponse { + fromPartial, I>>(_: I): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); return message; }, @@ -656,7 +658,7 @@ export const MsgChannelOpenAck = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelOpenAck { + fromPartial, I>>(object: I): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -708,7 +710,7 @@ export const MsgChannelOpenAckResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgChannelOpenAckResponse { + fromPartial, I>>(_: I): MsgChannelOpenAckResponse { const message = createBaseMsgChannelOpenAckResponse(); return message; }, @@ -809,7 +811,7 @@ export const MsgChannelOpenConfirm = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelOpenConfirm { + fromPartial, I>>(object: I): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -859,7 +861,9 @@ export const MsgChannelOpenConfirmResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgChannelOpenConfirmResponse { + fromPartial, I>>( + _: I, + ): MsgChannelOpenConfirmResponse { const message = createBaseMsgChannelOpenConfirmResponse(); return message; }, @@ -936,7 +940,7 @@ export const MsgChannelCloseInit = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelCloseInit { + fromPartial, I>>(object: I): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -981,7 +985,9 @@ export const MsgChannelCloseInitResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgChannelCloseInitResponse { + fromPartial, I>>( + _: I, + ): MsgChannelCloseInitResponse { const message = createBaseMsgChannelCloseInitResponse(); return message; }, @@ -1084,7 +1090,7 @@ export const MsgChannelCloseConfirm = { return obj; }, - fromPartial(object: DeepPartial): MsgChannelCloseConfirm { + fromPartial, I>>(object: I): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1134,7 +1140,9 @@ export const MsgChannelCloseConfirmResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgChannelCloseConfirmResponse { + fromPartial, I>>( + _: I, + ): MsgChannelCloseConfirmResponse { const message = createBaseMsgChannelCloseConfirmResponse(); return message; }, @@ -1228,7 +1236,7 @@ export const MsgRecvPacket = { return obj; }, - fromPartial(object: DeepPartial): MsgRecvPacket { + fromPartial, I>>(object: I): MsgRecvPacket { const message = createBaseMsgRecvPacket(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1291,7 +1299,7 @@ export const MsgRecvPacketResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgRecvPacketResponse { + fromPartial, I>>(object: I): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); message.result = object.result ?? 0; return message; @@ -1398,7 +1406,7 @@ export const MsgTimeout = { return obj; }, - fromPartial(object: DeepPartial): MsgTimeout { + fromPartial, I>>(object: I): MsgTimeout { const message = createBaseMsgTimeout(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1465,7 +1473,7 @@ export const MsgTimeoutResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgTimeoutResponse { + fromPartial, I>>(object: I): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); message.result = object.result ?? 0; return message; @@ -1586,7 +1594,7 @@ export const MsgTimeoutOnClose = { return obj; }, - fromPartial(object: DeepPartial): MsgTimeoutOnClose { + fromPartial, I>>(object: I): MsgTimeoutOnClose { const message = createBaseMsgTimeoutOnClose(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1654,7 +1662,9 @@ export const MsgTimeoutOnCloseResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgTimeoutOnCloseResponse { + fromPartial, I>>( + object: I, + ): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); message.result = object.result ?? 0; return message; @@ -1763,7 +1773,7 @@ export const MsgAcknowledgement = { return obj; }, - fromPartial(object: DeepPartial): MsgAcknowledgement { + fromPartial, I>>(object: I): MsgAcknowledgement { const message = createBaseMsgAcknowledgement(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1827,7 +1837,9 @@ export const MsgAcknowledgementResponse = { return obj; }, - fromPartial(object: DeepPartial): MsgAcknowledgementResponse { + fromPartial, I>>( + object: I, + ): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); message.result = object.result ?? 0; return message; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 7741f8fc..14816a3a 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -3,7 +3,7 @@ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * IdentifiedClientState defines a client state with an additional client @@ -172,7 +172,7 @@ export const IdentifiedClientState = { return obj; }, - fromPartial(object: DeepPartial): IdentifiedClientState { + fromPartial, I>>(object: I): IdentifiedClientState { const message = createBaseIdentifiedClientState(); message.clientId = object.clientId ?? ""; message.clientState = @@ -244,7 +244,9 @@ export const ConsensusStateWithHeight = { return obj; }, - fromPartial(object: DeepPartial): ConsensusStateWithHeight { + fromPartial, I>>( + object: I, + ): ConsensusStateWithHeight { const message = createBaseConsensusStateWithHeight(); message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; @@ -326,7 +328,7 @@ export const ClientConsensusStates = { return obj; }, - fromPartial(object: DeepPartial): ClientConsensusStates { + fromPartial, I>>(object: I): ClientConsensusStates { const message = createBaseClientConsensusStates(); message.clientId = object.clientId ?? ""; message.consensusStates = @@ -417,7 +419,7 @@ export const ClientUpdateProposal = { return obj; }, - fromPartial(object: DeepPartial): ClientUpdateProposal { + fromPartial, I>>(object: I): ClientUpdateProposal { const message = createBaseClientUpdateProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -514,7 +516,7 @@ export const UpgradeProposal = { return obj; }, - fromPartial(object: DeepPartial): UpgradeProposal { + fromPartial, I>>(object: I): UpgradeProposal { const message = createBaseUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -590,7 +592,7 @@ export const Height = { return obj; }, - fromPartial(object: DeepPartial): Height { + fromPartial, I>>(object: I): Height { const message = createBaseHeight(); message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null @@ -661,7 +663,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.allowedClients = object.allowedClients?.map((e) => e) || []; return message; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index 5d627d0b..353863b2 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** GenesisState defines the ibc client submodule's genesis state. */ @@ -178,7 +178,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.clients = object.clients?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.clientsConsensus = @@ -258,7 +258,7 @@ export const GenesisMetadata = { return obj; }, - fromPartial(object: DeepPartial): GenesisMetadata { + fromPartial, I>>(object: I): GenesisMetadata { const message = createBaseGenesisMetadata(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -334,7 +334,9 @@ export const IdentifiedGenesisMetadata = { return obj; }, - fromPartial(object: DeepPartial): IdentifiedGenesisMetadata { + fromPartial, I>>( + object: I, + ): IdentifiedGenesisMetadata { const message = createBaseIdentifiedGenesisMetadata(); message.clientId = object.clientId ?? ""; message.clientMetadata = object.clientMetadata?.map((e) => GenesisMetadata.fromPartial(e)) || []; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index c4bf1f7f..b22565c7 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -4,7 +4,7 @@ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1 import { Any } from "../../../../google/protobuf/any"; import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * QueryClientStateRequest is the request type for the Query/ClientState RPC @@ -225,7 +225,7 @@ export const QueryClientStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStateRequest { + fromPartial, I>>(object: I): QueryClientStateRequest { const message = createBaseQueryClientStateRequest(); message.clientId = object.clientId ?? ""; return message; @@ -306,7 +306,9 @@ export const QueryClientStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStateResponse { + fromPartial, I>>( + object: I, + ): QueryClientStateResponse { const message = createBaseQueryClientStateResponse(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -371,7 +373,9 @@ export const QueryClientStatesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStatesRequest { + fromPartial, I>>( + object: I, + ): QueryClientStatesRequest { const message = createBaseQueryClientStatesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -450,7 +454,9 @@ export const QueryClientStatesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStatesResponse { + fromPartial, I>>( + object: I, + ): QueryClientStatesResponse { const message = createBaseQueryClientStatesResponse(); message.clientStates = object.clientStates?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.pagination = @@ -545,7 +551,9 @@ export const QueryConsensusStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConsensusStateRequest { + fromPartial, I>>( + object: I, + ): QueryConsensusStateRequest { const message = createBaseQueryConsensusStateRequest(); message.clientId = object.clientId ?? ""; message.revisionNumber = @@ -635,7 +643,9 @@ export const QueryConsensusStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConsensusStateResponse { + fromPartial, I>>( + object: I, + ): QueryConsensusStateResponse { const message = createBaseQueryConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -711,7 +721,9 @@ export const QueryConsensusStatesRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConsensusStatesRequest { + fromPartial, I>>( + object: I, + ): QueryConsensusStatesRequest { const message = createBaseQueryConsensusStatesRequest(); message.clientId = object.clientId ?? ""; message.pagination = @@ -793,7 +805,9 @@ export const QueryConsensusStatesResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConsensusStatesResponse { + fromPartial, I>>( + object: I, + ): QueryConsensusStatesResponse { const message = createBaseQueryConsensusStatesResponse(); message.consensusStates = object.consensusStates?.map((e) => ConsensusStateWithHeight.fromPartial(e)) || []; @@ -854,7 +868,9 @@ export const QueryClientStatusRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStatusRequest { + fromPartial, I>>( + object: I, + ): QueryClientStatusRequest { const message = createBaseQueryClientStatusRequest(); message.clientId = object.clientId ?? ""; return message; @@ -910,7 +926,9 @@ export const QueryClientStatusResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryClientStatusResponse { + fromPartial, I>>( + object: I, + ): QueryClientStatusResponse { const message = createBaseQueryClientStatusResponse(); message.status = object.status ?? ""; return message; @@ -953,7 +971,7 @@ export const QueryClientParamsRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryClientParamsRequest { + fromPartial, I>>(_: I): QueryClientParamsRequest { const message = createBaseQueryClientParamsRequest(); return message; }, @@ -1008,7 +1026,9 @@ export const QueryClientParamsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryClientParamsResponse { + fromPartial, I>>( + object: I, + ): QueryClientParamsResponse { const message = createBaseQueryClientParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -1052,7 +1072,9 @@ export const QueryUpgradedClientStateRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryUpgradedClientStateRequest { + fromPartial, I>>( + _: I, + ): QueryUpgradedClientStateRequest { const message = createBaseQueryUpgradedClientStateRequest(); return message; }, @@ -1112,7 +1134,9 @@ export const QueryUpgradedClientStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUpgradedClientStateResponse { + fromPartial, I>>( + object: I, + ): QueryUpgradedClientStateResponse { const message = createBaseQueryUpgradedClientStateResponse(); message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null @@ -1158,7 +1182,9 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial(_: DeepPartial): QueryUpgradedConsensusStateRequest { + fromPartial, I>>( + _: I, + ): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); return message; }, @@ -1218,7 +1244,9 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryUpgradedConsensusStateResponse { + fromPartial, I>>( + object: I, + ): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index 7fad7e0c..e3a3c53b 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** MsgCreateClient defines a message to create an IBC client */ @@ -165,7 +165,7 @@ export const MsgCreateClient = { return obj; }, - fromPartial(object: DeepPartial): MsgCreateClient { + fromPartial, I>>(object: I): MsgCreateClient { const message = createBaseMsgCreateClient(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -216,7 +216,7 @@ export const MsgCreateClientResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgCreateClientResponse { + fromPartial, I>>(_: I): MsgCreateClientResponse { const message = createBaseMsgCreateClientResponse(); return message; }, @@ -293,7 +293,7 @@ export const MsgUpdateClient = { return obj; }, - fromPartial(object: DeepPartial): MsgUpdateClient { + fromPartial, I>>(object: I): MsgUpdateClient { const message = createBaseMsgUpdateClient(); message.clientId = object.clientId ?? ""; message.header = @@ -339,7 +339,7 @@ export const MsgUpdateClientResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgUpdateClientResponse { + fromPartial, I>>(_: I): MsgUpdateClientResponse { const message = createBaseMsgUpdateClientResponse(); return message; }, @@ -463,7 +463,7 @@ export const MsgUpgradeClient = { return obj; }, - fromPartial(object: DeepPartial): MsgUpgradeClient { + fromPartial, I>>(object: I): MsgUpgradeClient { const message = createBaseMsgUpgradeClient(); message.clientId = object.clientId ?? ""; message.clientState = @@ -517,7 +517,7 @@ export const MsgUpgradeClientResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgUpgradeClientResponse { + fromPartial, I>>(_: I): MsgUpgradeClientResponse { const message = createBaseMsgUpgradeClientResponse(); return message; }, @@ -595,7 +595,7 @@ export const MsgSubmitMisbehaviour = { return obj; }, - fromPartial(object: DeepPartial): MsgSubmitMisbehaviour { + fromPartial, I>>(object: I): MsgSubmitMisbehaviour { const message = createBaseMsgSubmitMisbehaviour(); message.clientId = object.clientId ?? ""; message.misbehaviour = @@ -643,7 +643,9 @@ export const MsgSubmitMisbehaviourResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgSubmitMisbehaviourResponse { + fromPartial, I>>( + _: I, + ): MsgSubmitMisbehaviourResponse { const message = createBaseMsgSubmitMisbehaviourResponse(); return message; }, diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index b5d355c2..8e10fb6d 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.commitment.v1"; /** * MerkleRoot defines a merkle root hash. @@ -92,7 +92,7 @@ export const MerkleRoot = { return obj; }, - fromPartial(object: DeepPartial): MerkleRoot { + fromPartial, I>>(object: I): MerkleRoot { const message = createBaseMerkleRoot(); message.hash = object.hash ?? new Uint8Array(); return message; @@ -151,7 +151,7 @@ export const MerklePrefix = { return obj; }, - fromPartial(object: DeepPartial): MerklePrefix { + fromPartial, I>>(object: I): MerklePrefix { const message = createBaseMerklePrefix(); message.keyPrefix = object.keyPrefix ?? new Uint8Array(); return message; @@ -213,7 +213,7 @@ export const MerklePath = { return obj; }, - fromPartial(object: DeepPartial): MerklePath { + fromPartial, I>>(object: I): MerklePath { const message = createBaseMerklePath(); message.keyPath = object.keyPath?.map((e) => e) || []; return message; @@ -275,7 +275,7 @@ export const MerkleProof = { return obj; }, - fromPartial(object: DeepPartial): MerkleProof { + fromPartial, I>>(object: I): MerkleProof { const message = createBaseMerkleProof(); message.proofs = object.proofs?.map((e) => CommitmentProof.fromPartial(e)) || []; return message; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index c19ce43a..6e0edfd1 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * State defines if a connection is in one of the following states: @@ -282,7 +282,7 @@ export const ConnectionEnd = { return obj; }, - fromPartial(object: DeepPartial): ConnectionEnd { + fromPartial, I>>(object: I): ConnectionEnd { const message = createBaseConnectionEnd(); message.clientId = object.clientId ?? ""; message.versions = object.versions?.map((e) => Version.fromPartial(e)) || []; @@ -410,7 +410,7 @@ export const IdentifiedConnection = { return obj; }, - fromPartial(object: DeepPartial): IdentifiedConnection { + fromPartial, I>>(object: I): IdentifiedConnection { const message = createBaseIdentifiedConnection(); message.id = object.id ?? ""; message.clientId = object.clientId ?? ""; @@ -500,7 +500,7 @@ export const Counterparty = { return obj; }, - fromPartial(object: DeepPartial): Counterparty { + fromPartial, I>>(object: I): Counterparty { const message = createBaseCounterparty(); message.clientId = object.clientId ?? ""; message.connectionId = object.connectionId ?? ""; @@ -567,7 +567,7 @@ export const ClientPaths = { return obj; }, - fromPartial(object: DeepPartial): ClientPaths { + fromPartial, I>>(object: I): ClientPaths { const message = createBaseClientPaths(); message.paths = object.paths?.map((e) => e) || []; return message; @@ -640,7 +640,7 @@ export const ConnectionPaths = { return obj; }, - fromPartial(object: DeepPartial): ConnectionPaths { + fromPartial, I>>(object: I): ConnectionPaths { const message = createBaseConnectionPaths(); message.clientId = object.clientId ?? ""; message.paths = object.paths?.map((e) => e) || []; @@ -714,7 +714,7 @@ export const Version = { return obj; }, - fromPartial(object: DeepPartial): Version { + fromPartial, I>>(object: I): Version { const message = createBaseVersion(); message.identifier = object.identifier ?? ""; message.features = object.features?.map((e) => e) || []; @@ -774,7 +774,7 @@ export const Params = { return obj; }, - fromPartial(object: DeepPartial): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.maxExpectedTimePerBlock = object.maxExpectedTimePerBlock !== undefined && object.maxExpectedTimePerBlock !== null diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 3a349063..5c212b03 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** GenesisState defines the ibc connection submodule's genesis state. */ @@ -117,7 +117,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.clientConnectionPaths = diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index f99406c3..1ba4e699 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -5,7 +5,7 @@ import { ConnectionEnd, IdentifiedConnection } from "./connection"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * QueryConnectionRequest is the request type for the Query/Connection RPC @@ -182,7 +182,7 @@ export const QueryConnectionRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionRequest { + fromPartial, I>>(object: I): QueryConnectionRequest { const message = createBaseQueryConnectionRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -263,7 +263,7 @@ export const QueryConnectionResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionResponse { + fromPartial, I>>(object: I): QueryConnectionResponse { const message = createBaseQueryConnectionResponse(); message.connection = object.connection !== undefined && object.connection !== null @@ -328,7 +328,7 @@ export const QueryConnectionsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionsRequest { + fromPartial, I>>(object: I): QueryConnectionsRequest { const message = createBaseQueryConnectionsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -418,7 +418,9 @@ export const QueryConnectionsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionsResponse { + fromPartial, I>>( + object: I, + ): QueryConnectionsResponse { const message = createBaseQueryConnectionsResponse(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.pagination = @@ -480,7 +482,9 @@ export const QueryClientConnectionsRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryClientConnectionsRequest { + fromPartial, I>>( + object: I, + ): QueryClientConnectionsRequest { const message = createBaseQueryClientConnectionsRequest(); message.clientId = object.clientId ?? ""; return message; @@ -568,7 +572,9 @@ export const QueryClientConnectionsResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryClientConnectionsResponse { + fromPartial, I>>( + object: I, + ): QueryClientConnectionsResponse { const message = createBaseQueryClientConnectionsResponse(); message.connectionPaths = object.connectionPaths?.map((e) => e) || []; message.proof = object.proof ?? new Uint8Array(); @@ -629,7 +635,9 @@ export const QueryConnectionClientStateRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionClientStateRequest { + fromPartial, I>>( + object: I, + ): QueryConnectionClientStateRequest { const message = createBaseQueryConnectionClientStateRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -714,7 +722,9 @@ export const QueryConnectionClientStateResponse = { return obj; }, - fromPartial(object: DeepPartial): QueryConnectionClientStateResponse { + fromPartial, I>>( + object: I, + ): QueryConnectionClientStateResponse { const message = createBaseQueryConnectionClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -805,8 +815,8 @@ export const QueryConnectionConsensusStateRequest = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryConnectionConsensusStateRequest { const message = createBaseQueryConnectionConsensusStateRequest(); message.connectionId = object.connectionId ?? ""; @@ -910,8 +920,8 @@ export const QueryConnectionConsensusStateResponse = { return obj; }, - fromPartial( - object: DeepPartial, + fromPartial, I>>( + object: I, ): QueryConnectionConsensusStateResponse { const message = createBaseQueryConnectionConsensusStateResponse(); message.consensusState = diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index 0fefcac1..a89050ac 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -4,7 +4,7 @@ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to @@ -204,7 +204,7 @@ export const MsgConnectionOpenInit = { return obj; }, - fromPartial(object: DeepPartial): MsgConnectionOpenInit { + fromPartial, I>>(object: I): MsgConnectionOpenInit { const message = createBaseMsgConnectionOpenInit(); message.clientId = object.clientId ?? ""; message.counterparty = @@ -260,7 +260,9 @@ export const MsgConnectionOpenInitResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgConnectionOpenInitResponse { + fromPartial, I>>( + _: I, + ): MsgConnectionOpenInitResponse { const message = createBaseMsgConnectionOpenInitResponse(); return message; }, @@ -459,7 +461,7 @@ export const MsgConnectionOpenTry = { return obj; }, - fromPartial(object: DeepPartial): MsgConnectionOpenTry { + fromPartial, I>>(object: I): MsgConnectionOpenTry { const message = createBaseMsgConnectionOpenTry(); message.clientId = object.clientId ?? ""; message.previousConnectionId = object.previousConnectionId ?? ""; @@ -528,7 +530,9 @@ export const MsgConnectionOpenTryResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgConnectionOpenTryResponse { + fromPartial, I>>( + _: I, + ): MsgConnectionOpenTryResponse { const message = createBaseMsgConnectionOpenTryResponse(); return message; }, @@ -698,7 +702,7 @@ export const MsgConnectionOpenAck = { return obj; }, - fromPartial(object: DeepPartial): MsgConnectionOpenAck { + fromPartial, I>>(object: I): MsgConnectionOpenAck { const message = createBaseMsgConnectionOpenAck(); message.connectionId = object.connectionId ?? ""; message.counterpartyConnectionId = object.counterpartyConnectionId ?? ""; @@ -762,7 +766,9 @@ export const MsgConnectionOpenAckResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgConnectionOpenAckResponse { + fromPartial, I>>( + _: I, + ): MsgConnectionOpenAckResponse { const message = createBaseMsgConnectionOpenAckResponse(); return message; }, @@ -852,7 +858,9 @@ export const MsgConnectionOpenConfirm = { return obj; }, - fromPartial(object: DeepPartial): MsgConnectionOpenConfirm { + fromPartial, I>>( + object: I, + ): MsgConnectionOpenConfirm { const message = createBaseMsgConnectionOpenConfirm(); message.connectionId = object.connectionId ?? ""; message.proofAck = object.proofAck ?? new Uint8Array(); @@ -901,7 +909,9 @@ export const MsgConnectionOpenConfirmResponse = { return obj; }, - fromPartial(_: DeepPartial): MsgConnectionOpenConfirmResponse { + fromPartial, I>>( + _: I, + ): MsgConnectionOpenConfirmResponse { const message = createBaseMsgConnectionOpenConfirmResponse(); return message; }, diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index eaf61a44..270f1404 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -4,7 +4,7 @@ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.core.types.v1"; /** GenesisState defines the ibc module's genesis state. */ @@ -101,7 +101,7 @@ export const GenesisState = { return obj; }, - fromPartial(object: DeepPartial): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index c9b16b65..8d3fc6c6 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../../../helpers"; +import { isSet, DeepPartial, Exact } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.localhost.v1"; /** * ClientState defines a loopback (localhost) client. It requires (read-only) @@ -77,7 +77,7 @@ export const ClientState = { return obj; }, - fromPartial(object: DeepPartial): ClientState { + fromPartial, I>>(object: I): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.height = diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index d97f73a1..70491bbc 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -4,7 +4,7 @@ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; import { Channel } from "../../../core/channel/v1/channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.solomachine.v1"; /** * DataType defines the type of solo machine proof being created. This is done @@ -388,7 +388,7 @@ export const ClientState = { return obj; }, - fromPartial(object: DeepPartial): ClientState { + fromPartial, I>>(object: I): ClientState { const message = createBaseClientState(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -479,7 +479,7 @@ export const ConsensusState = { return obj; }, - fromPartial(object: DeepPartial): ConsensusState { + fromPartial, I>>(object: I): ConsensusState { const message = createBaseConsensusState(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -591,7 +591,7 @@ export const Header = { return obj; }, - fromPartial(object: DeepPartial
): Header { + fromPartial, I>>(object: I): Header { const message = createBaseHeader(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -695,7 +695,7 @@ export const Misbehaviour = { return obj; }, - fromPartial(object: DeepPartial): Misbehaviour { + fromPartial, I>>(object: I): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.sequence = @@ -800,7 +800,7 @@ export const SignatureAndData = { return obj; }, - fromPartial(object: DeepPartial): SignatureAndData { + fromPartial, I>>(object: I): SignatureAndData { const message = createBaseSignatureAndData(); message.signature = object.signature ?? new Uint8Array(); message.dataType = object.dataType ?? 0; @@ -876,7 +876,9 @@ export const TimestampedSignatureData = { return obj; }, - fromPartial(object: DeepPartial): TimestampedSignatureData { + fromPartial, I>>( + object: I, + ): TimestampedSignatureData { const message = createBaseTimestampedSignatureData(); message.signatureData = object.signatureData ?? new Uint8Array(); message.timestamp = @@ -981,7 +983,7 @@ export const SignBytes = { return obj; }, - fromPartial(object: DeepPartial): SignBytes { + fromPartial, I>>(object: I): SignBytes { const message = createBaseSignBytes(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -1059,7 +1061,7 @@ export const HeaderData = { return obj; }, - fromPartial(object: DeepPartial): HeaderData { + fromPartial, I>>(object: I): HeaderData { const message = createBaseHeaderData(); message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null @@ -1132,7 +1134,7 @@ export const ClientStateData = { return obj; }, - fromPartial(object: DeepPartial): ClientStateData { + fromPartial, I>>(object: I): ClientStateData { const message = createBaseClientStateData(); message.path = object.path ?? new Uint8Array(); message.clientState = @@ -1205,7 +1207,7 @@ export const ConsensusStateData = { return obj; }, - fromPartial(object: DeepPartial): ConsensusStateData { + fromPartial, I>>(object: I): ConsensusStateData { const message = createBaseConsensusStateData(); message.path = object.path ?? new Uint8Array(); message.consensusState = @@ -1278,7 +1280,7 @@ export const ConnectionStateData = { return obj; }, - fromPartial(object: DeepPartial): ConnectionStateData { + fromPartial, I>>(object: I): ConnectionStateData { const message = createBaseConnectionStateData(); message.path = object.path ?? new Uint8Array(); message.connection = @@ -1351,7 +1353,7 @@ export const ChannelStateData = { return obj; }, - fromPartial(object: DeepPartial): ChannelStateData { + fromPartial, I>>(object: I): ChannelStateData { const message = createBaseChannelStateData(); message.path = object.path ?? new Uint8Array(); message.channel = @@ -1426,7 +1428,7 @@ export const PacketCommitmentData = { return obj; }, - fromPartial(object: DeepPartial): PacketCommitmentData { + fromPartial, I>>(object: I): PacketCommitmentData { const message = createBasePacketCommitmentData(); message.path = object.path ?? new Uint8Array(); message.commitment = object.commitment ?? new Uint8Array(); @@ -1500,7 +1502,9 @@ export const PacketAcknowledgementData = { return obj; }, - fromPartial(object: DeepPartial): PacketAcknowledgementData { + fromPartial, I>>( + object: I, + ): PacketAcknowledgementData { const message = createBasePacketAcknowledgementData(); message.path = object.path ?? new Uint8Array(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); @@ -1558,7 +1562,9 @@ export const PacketReceiptAbsenceData = { return obj; }, - fromPartial(object: DeepPartial): PacketReceiptAbsenceData { + fromPartial, I>>( + object: I, + ): PacketReceiptAbsenceData { const message = createBasePacketReceiptAbsenceData(); message.path = object.path ?? new Uint8Array(); return message; @@ -1626,7 +1632,7 @@ export const NextSequenceRecvData = { return obj; }, - fromPartial(object: DeepPartial): NextSequenceRecvData { + fromPartial, I>>(object: I): NextSequenceRecvData { const message = createBaseNextSequenceRecvData(); message.path = object.path ?? new Uint8Array(); message.nextSeqRecv = diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 9b6791a2..438cff86 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -11,6 +11,7 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, + Exact, fromJsonTimestamp, bytesFromBase64, fromTimestamp, @@ -309,7 +310,7 @@ export const ClientState = { return obj; }, - fromPartial(object: DeepPartial): ClientState { + fromPartial, I>>(object: I): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.trustLevel = @@ -420,7 +421,7 @@ export const ConsensusState = { return obj; }, - fromPartial(object: DeepPartial): ConsensusState { + fromPartial, I>>(object: I): ConsensusState { const message = createBaseConsensusState(); message.timestamp = object.timestamp !== undefined && object.timestamp !== null @@ -506,7 +507,7 @@ export const Misbehaviour = { return obj; }, - fromPartial(object: DeepPartial): Misbehaviour { + fromPartial, I>>(object: I): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.header1 = @@ -611,7 +612,7 @@ export const Header = { return obj; }, - fromPartial(object: DeepPartial
): Header { + fromPartial, I>>(object: I): Header { const message = createBaseHeader(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -693,7 +694,7 @@ export const Fraction = { return obj; }, - fromPartial(object: DeepPartial): Fraction { + fromPartial, I>>(object: I): Fraction { const message = createBaseFraction(); message.numerator = object.numerator !== undefined && object.numerator !== null diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index cbe95b1d..4e98d301 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -9,6 +9,7 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, + Exact, Long, fromJsonTimestamp, bytesFromBase64, @@ -804,7 +805,7 @@ export const Request = { return obj; }, - fromPartial(object: DeepPartial): Request { + fromPartial, I>>(object: I): Request { const message = createBaseRequest(); message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; @@ -915,7 +916,7 @@ export const RequestEcho = { return obj; }, - fromPartial(object: DeepPartial): RequestEcho { + fromPartial, I>>(object: I): RequestEcho { const message = createBaseRequestEcho(); message.message = object.message ?? ""; return message; @@ -958,7 +959,7 @@ export const RequestFlush = { return obj; }, - fromPartial(_: DeepPartial): RequestFlush { + fromPartial, I>>(_: I): RequestFlush { const message = createBaseRequestFlush(); return message; }, @@ -1036,7 +1037,7 @@ export const RequestInfo = { return obj; }, - fromPartial(object: DeepPartial): RequestInfo { + fromPartial, I>>(object: I): RequestInfo { const message = createBaseRequestInfo(); message.version = object.version ?? ""; message.blockVersion = @@ -1111,7 +1112,7 @@ export const RequestSetOption = { return obj; }, - fromPartial(object: DeepPartial): RequestSetOption { + fromPartial, I>>(object: I): RequestSetOption { const message = createBaseRequestSetOption(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -1240,7 +1241,7 @@ export const RequestInitChain = { return obj; }, - fromPartial(object: DeepPartial): RequestInitChain { + fromPartial, I>>(object: I): RequestInitChain { const message = createBaseRequestInitChain(); message.time = object.time !== undefined && object.time !== null ? Timestamp.fromPartial(object.time) : undefined; @@ -1342,7 +1343,7 @@ export const RequestQuery = { return obj; }, - fromPartial(object: DeepPartial): RequestQuery { + fromPartial, I>>(object: I): RequestQuery { const message = createBaseRequestQuery(); message.data = object.data ?? new Uint8Array(); message.path = object.path ?? ""; @@ -1449,7 +1450,7 @@ export const RequestBeginBlock = { return obj; }, - fromPartial(object: DeepPartial): RequestBeginBlock { + fromPartial, I>>(object: I): RequestBeginBlock { const message = createBaseRequestBeginBlock(); message.hash = object.hash ?? new Uint8Array(); message.header = @@ -1524,7 +1525,7 @@ export const RequestCheckTx = { return obj; }, - fromPartial(object: DeepPartial): RequestCheckTx { + fromPartial, I>>(object: I): RequestCheckTx { const message = createBaseRequestCheckTx(); message.tx = object.tx ?? new Uint8Array(); message.type = object.type ?? 0; @@ -1582,7 +1583,7 @@ export const RequestDeliverTx = { return obj; }, - fromPartial(object: DeepPartial): RequestDeliverTx { + fromPartial, I>>(object: I): RequestDeliverTx { const message = createBaseRequestDeliverTx(); message.tx = object.tx ?? new Uint8Array(); return message; @@ -1638,7 +1639,7 @@ export const RequestEndBlock = { return obj; }, - fromPartial(object: DeepPartial): RequestEndBlock { + fromPartial, I>>(object: I): RequestEndBlock { const message = createBaseRequestEndBlock(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1682,7 +1683,7 @@ export const RequestCommit = { return obj; }, - fromPartial(_: DeepPartial): RequestCommit { + fromPartial, I>>(_: I): RequestCommit { const message = createBaseRequestCommit(); return message; }, @@ -1724,7 +1725,7 @@ export const RequestListSnapshots = { return obj; }, - fromPartial(_: DeepPartial): RequestListSnapshots { + fromPartial, I>>(_: I): RequestListSnapshots { const message = createBaseRequestListSnapshots(); return message; }, @@ -1792,7 +1793,7 @@ export const RequestOfferSnapshot = { return obj; }, - fromPartial(object: DeepPartial): RequestOfferSnapshot { + fromPartial, I>>(object: I): RequestOfferSnapshot { const message = createBaseRequestOfferSnapshot(); message.snapshot = object.snapshot !== undefined && object.snapshot !== null @@ -1874,7 +1875,9 @@ export const RequestLoadSnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { + fromPartial, I>>( + object: I, + ): RequestLoadSnapshotChunk { const message = createBaseRequestLoadSnapshotChunk(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -1956,7 +1959,9 @@ export const RequestApplySnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): RequestApplySnapshotChunk { + fromPartial, I>>( + object: I, + ): RequestApplySnapshotChunk { const message = createBaseRequestApplySnapshotChunk(); message.index = object.index ?? 0; message.chunk = object.chunk ?? new Uint8Array(); @@ -2209,7 +2214,7 @@ export const Response = { return obj; }, - fromPartial(object: DeepPartial): Response { + fromPartial, I>>(object: I): Response { const message = createBaseResponse(); message.exception = object.exception !== undefined && object.exception !== null @@ -2324,7 +2329,7 @@ export const ResponseException = { return obj; }, - fromPartial(object: DeepPartial): ResponseException { + fromPartial, I>>(object: I): ResponseException { const message = createBaseResponseException(); message.error = object.error ?? ""; return message; @@ -2380,7 +2385,7 @@ export const ResponseEcho = { return obj; }, - fromPartial(object: DeepPartial): ResponseEcho { + fromPartial, I>>(object: I): ResponseEcho { const message = createBaseResponseEcho(); message.message = object.message ?? ""; return message; @@ -2423,7 +2428,7 @@ export const ResponseFlush = { return obj; }, - fromPartial(_: DeepPartial): ResponseFlush { + fromPartial, I>>(_: I): ResponseFlush { const message = createBaseResponseFlush(); return message; }, @@ -2528,7 +2533,7 @@ export const ResponseInfo = { return obj; }, - fromPartial(object: DeepPartial): ResponseInfo { + fromPartial, I>>(object: I): ResponseInfo { const message = createBaseResponseInfo(); message.data = object.data ?? ""; message.version = object.version ?? ""; @@ -2616,7 +2621,7 @@ export const ResponseSetOption = { return obj; }, - fromPartial(object: DeepPartial): ResponseSetOption { + fromPartial, I>>(object: I): ResponseSetOption { const message = createBaseResponseSetOption(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2710,7 +2715,7 @@ export const ResponseInitChain = { return obj; }, - fromPartial(object: DeepPartial): ResponseInitChain { + fromPartial, I>>(object: I): ResponseInitChain { const message = createBaseResponseInitChain(); message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null @@ -2862,7 +2867,7 @@ export const ResponseQuery = { return obj; }, - fromPartial(object: DeepPartial): ResponseQuery { + fromPartial, I>>(object: I): ResponseQuery { const message = createBaseResponseQuery(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2937,7 +2942,7 @@ export const ResponseBeginBlock = { return obj; }, - fromPartial(object: DeepPartial): ResponseBeginBlock { + fromPartial, I>>(object: I): ResponseBeginBlock { const message = createBaseResponseBeginBlock(); message.events = object.events?.map((e) => Event.fromPartial(e)) || []; return message; @@ -3077,7 +3082,7 @@ export const ResponseCheckTx = { return obj; }, - fromPartial(object: DeepPartial): ResponseCheckTx { + fromPartial, I>>(object: I): ResponseCheckTx { const message = createBaseResponseCheckTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3228,7 +3233,7 @@ export const ResponseDeliverTx = { return obj; }, - fromPartial(object: DeepPartial): ResponseDeliverTx { + fromPartial, I>>(object: I): ResponseDeliverTx { const message = createBaseResponseDeliverTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3336,7 +3341,7 @@ export const ResponseEndBlock = { return obj; }, - fromPartial(object: DeepPartial): ResponseEndBlock { + fromPartial, I>>(object: I): ResponseEndBlock { const message = createBaseResponseEndBlock(); message.validatorUpdates = object.validatorUpdates?.map((e) => ValidatorUpdate.fromPartial(e)) || []; message.consensusParamUpdates = @@ -3409,7 +3414,7 @@ export const ResponseCommit = { return obj; }, - fromPartial(object: DeepPartial): ResponseCommit { + fromPartial, I>>(object: I): ResponseCommit { const message = createBaseResponseCommit(); message.data = object.data ?? new Uint8Array(); message.retainHeight = @@ -3477,7 +3482,7 @@ export const ResponseListSnapshots = { return obj; }, - fromPartial(object: DeepPartial): ResponseListSnapshots { + fromPartial, I>>(object: I): ResponseListSnapshots { const message = createBaseResponseListSnapshots(); message.snapshots = object.snapshots?.map((e) => Snapshot.fromPartial(e)) || []; return message; @@ -3533,7 +3538,7 @@ export const ResponseOfferSnapshot = { return obj; }, - fromPartial(object: DeepPartial): ResponseOfferSnapshot { + fromPartial, I>>(object: I): ResponseOfferSnapshot { const message = createBaseResponseOfferSnapshot(); message.result = object.result ?? 0; return message; @@ -3590,7 +3595,9 @@ export const ResponseLoadSnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { + fromPartial, I>>( + object: I, + ): ResponseLoadSnapshotChunk { const message = createBaseResponseLoadSnapshotChunk(); message.chunk = object.chunk ?? new Uint8Array(); return message; @@ -3696,7 +3703,9 @@ export const ResponseApplySnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { + fromPartial, I>>( + object: I, + ): ResponseApplySnapshotChunk { const message = createBaseResponseApplySnapshotChunk(); message.result = object.result ?? 0; message.refetchChunks = object.refetchChunks?.map((e) => e) || []; @@ -3791,7 +3800,7 @@ export const ConsensusParams = { return obj; }, - fromPartial(object: DeepPartial): ConsensusParams { + fromPartial, I>>(object: I): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -3871,7 +3880,7 @@ export const BlockParams = { return obj; }, - fromPartial(object: DeepPartial): BlockParams { + fromPartial, I>>(object: I): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -3947,7 +3956,7 @@ export const LastCommitInfo = { return obj; }, - fromPartial(object: DeepPartial): LastCommitInfo { + fromPartial, I>>(object: I): LastCommitInfo { const message = createBaseLastCommitInfo(); message.round = object.round ?? 0; message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || []; @@ -4023,7 +4032,7 @@ export const Event = { return obj; }, - fromPartial(object: DeepPartial): Event { + fromPartial, I>>(object: I): Event { const message = createBaseEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => EventAttribute.fromPartial(e)) || []; @@ -4104,7 +4113,7 @@ export const EventAttribute = { return obj; }, - fromPartial(object: DeepPartial): EventAttribute { + fromPartial, I>>(object: I): EventAttribute { const message = createBaseEventAttribute(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -4197,7 +4206,7 @@ export const TxResult = { return obj; }, - fromPartial(object: DeepPartial): TxResult { + fromPartial, I>>(object: I): TxResult { const message = createBaseTxResult(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -4272,7 +4281,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial, I>>(object: I): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.power = @@ -4342,7 +4351,7 @@ export const ValidatorUpdate = { return obj; }, - fromPartial(object: DeepPartial): ValidatorUpdate { + fromPartial, I>>(object: I): ValidatorUpdate { const message = createBaseValidatorUpdate(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null @@ -4415,7 +4424,7 @@ export const VoteInfo = { return obj; }, - fromPartial(object: DeepPartial): VoteInfo { + fromPartial, I>>(object: I): VoteInfo { const message = createBaseVoteInfo(); message.validator = object.validator !== undefined && object.validator !== null @@ -4521,7 +4530,7 @@ export const Evidence = { return obj; }, - fromPartial(object: DeepPartial): Evidence { + fromPartial, I>>(object: I): Evidence { const message = createBaseEvidence(); message.type = object.type ?? 0; message.validator = @@ -4635,7 +4644,7 @@ export const Snapshot = { return obj; }, - fromPartial(object: DeepPartial): Snapshot { + fromPartial, I>>(object: I): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index adf582ef..0e934fb4 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; /** PublicKey defines the keys available for use with Tendermint Validators */ @@ -72,7 +72,7 @@ export const PublicKey = { return obj; }, - fromPartial(object: DeepPartial): PublicKey { + fromPartial, I>>(object: I): PublicKey { const message = createBasePublicKey(); message.ed25519 = object.ed25519 ?? undefined; message.secp256k1 = object.secp256k1 ?? undefined; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 6e84072c..57f6a7a3 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; export interface Proof { total: Long; @@ -127,7 +127,7 @@ export const Proof = { return obj; }, - fromPartial(object: DeepPartial): Proof { + fromPartial, I>>(object: I): Proof { const message = createBaseProof(); message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.ZERO; @@ -200,7 +200,7 @@ export const ValueOp = { return obj; }, - fromPartial(object: DeepPartial): ValueOp { + fromPartial, I>>(object: I): ValueOp { const message = createBaseValueOp(); message.key = object.key ?? new Uint8Array(); message.proof = @@ -280,7 +280,7 @@ export const DominoOp = { return obj; }, - fromPartial(object: DeepPartial): DominoOp { + fromPartial, I>>(object: I): DominoOp { const message = createBaseDominoOp(); message.key = object.key ?? ""; message.input = object.input ?? ""; @@ -362,7 +362,7 @@ export const ProofOp = { return obj; }, - fromPartial(object: DeepPartial): ProofOp { + fromPartial, I>>(object: I): ProofOp { const message = createBaseProofOp(); message.type = object.type ?? ""; message.key = object.key ?? new Uint8Array(); @@ -426,7 +426,7 @@ export const ProofOps = { return obj; }, - fromPartial(object: DeepPartial): ProofOps { + fromPartial, I>>(object: I): ProofOps { const message = createBaseProofOps(); message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || []; return message; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 3a3dd206..63eda28d 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; export interface NetAddress { id: string; @@ -99,7 +99,7 @@ export const NetAddress = { return obj; }, - fromPartial(object: DeepPartial): NetAddress { + fromPartial, I>>(object: I): NetAddress { const message = createBaseNetAddress(); message.id = object.id ?? ""; message.ip = object.ip ?? ""; @@ -179,7 +179,7 @@ export const ProtocolVersion = { return obj; }, - fromPartial(object: DeepPartial): ProtocolVersion { + fromPartial, I>>(object: I): ProtocolVersion { const message = createBaseProtocolVersion(); message.p2p = object.p2p !== undefined && object.p2p !== null ? Long.fromValue(object.p2p) : Long.UZERO; message.block = @@ -322,7 +322,7 @@ export const DefaultNodeInfo = { return obj; }, - fromPartial(object: DeepPartial): DefaultNodeInfo { + fromPartial, I>>(object: I): DefaultNodeInfo { const message = createBaseDefaultNodeInfo(); message.protocolVersion = object.protocolVersion !== undefined && object.protocolVersion !== null @@ -402,7 +402,7 @@ export const DefaultNodeInfoOther = { return obj; }, - fromPartial(object: DeepPartial): DefaultNodeInfoOther { + fromPartial, I>>(object: I): DefaultNodeInfoOther { const message = createBaseDefaultNodeInfoOther(); message.txIndex = object.txIndex ?? ""; message.rpcAddress = object.rpcAddress ?? ""; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 0bfb1e9b..7fd10541 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -3,7 +3,7 @@ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../helpers"; +import { isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Block { header?: Header; @@ -96,7 +96,7 @@ export const Block = { return obj; }, - fromPartial(object: DeepPartial): Block { + fromPartial, I>>(object: I): Block { const message = createBaseBlock(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 3fb3ef88..ba7f1e61 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -4,7 +4,7 @@ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator } from "./validator"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; +import { isSet, DeepPartial, Exact, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; @@ -102,7 +102,7 @@ export const Evidence = { return obj; }, - fromPartial(object: DeepPartial): Evidence { + fromPartial, I>>(object: I): Evidence { const message = createBaseEvidence(); message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null @@ -211,7 +211,7 @@ export const DuplicateVoteEvidence = { return obj; }, - fromPartial(object: DeepPartial): DuplicateVoteEvidence { + fromPartial, I>>(object: I): DuplicateVoteEvidence { const message = createBaseDuplicateVoteEvidence(); message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; @@ -340,7 +340,9 @@ export const LightClientAttackEvidence = { return obj; }, - fromPartial(object: DeepPartial): LightClientAttackEvidence { + fromPartial, I>>( + object: I, + ): LightClientAttackEvidence { const message = createBaseLightClientAttackEvidence(); message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null @@ -418,7 +420,7 @@ export const EvidenceList = { return obj; }, - fromPartial(object: DeepPartial): EvidenceList { + fromPartial, I>>(object: I): EvidenceList { const message = createBaseEvidenceList(); message.evidence = object.evidence?.map((e) => Evidence.fromPartial(e)) || []; return message; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 2eccfa83..ed94658a 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../helpers"; +import { isSet, DeepPartial, Exact, Long } from "../../helpers"; export const protobufPackage = "tendermint.types"; /** * ConsensusParams contains consensus critical parameters that determine the @@ -175,7 +175,7 @@ export const ConsensusParams = { return obj; }, - fromPartial(object: DeepPartial): ConsensusParams { + fromPartial, I>>(object: I): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -266,7 +266,7 @@ export const BlockParams = { return obj; }, - fromPartial(object: DeepPartial): BlockParams { + fromPartial, I>>(object: I): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -353,7 +353,7 @@ export const EvidenceParams = { return obj; }, - fromPartial(object: DeepPartial): EvidenceParams { + fromPartial, I>>(object: I): EvidenceParams { const message = createBaseEvidenceParams(); message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null @@ -424,7 +424,7 @@ export const ValidatorParams = { return obj; }, - fromPartial(object: DeepPartial): ValidatorParams { + fromPartial, I>>(object: I): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pubKeyTypes?.map((e) => e) || []; return message; @@ -480,7 +480,7 @@ export const VersionParams = { return obj; }, - fromPartial(object: DeepPartial): VersionParams { + fromPartial, I>>(object: I): VersionParams { const message = createBaseVersionParams(); message.appVersion = object.appVersion !== undefined && object.appVersion !== null @@ -551,7 +551,7 @@ export const HashedParams = { return obj; }, - fromPartial(object: DeepPartial): HashedParams { + fromPartial, I>>(object: I): HashedParams { const message = createBaseHashedParams(); message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index c780c376..6309a44f 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -10,6 +10,7 @@ import { bytesFromBase64, base64FromBytes, DeepPartial, + Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -308,7 +309,7 @@ export const PartSetHeader = { return obj; }, - fromPartial(object: DeepPartial): PartSetHeader { + fromPartial, I>>(object: I): PartSetHeader { const message = createBasePartSetHeader(); message.total = object.total ?? 0; message.hash = object.hash ?? new Uint8Array(); @@ -388,7 +389,7 @@ export const Part = { return obj; }, - fromPartial(object: DeepPartial): Part { + fromPartial, I>>(object: I): Part { const message = createBasePart(); message.index = object.index ?? 0; message.bytes = object.bytes ?? new Uint8Array(); @@ -460,7 +461,7 @@ export const BlockID = { return obj; }, - fromPartial(object: DeepPartial): BlockID { + fromPartial, I>>(object: I): BlockID { const message = createBaseBlockID(); message.hash = object.hash ?? new Uint8Array(); message.partSetHeader = @@ -698,7 +699,7 @@ export const Header = { return obj; }, - fromPartial(object: DeepPartial
): Header { + fromPartial, I>>(object: I): Header { const message = createBaseHeader(); message.version = object.version !== undefined && object.version !== null @@ -781,7 +782,7 @@ export const Data = { return obj; }, - fromPartial(object: DeepPartial): Data { + fromPartial, I>>(object: I): Data { const message = createBaseData(); message.txs = object.txs?.map((e) => e) || []; return message; @@ -923,7 +924,7 @@ export const Vote = { return obj; }, - fromPartial(object: DeepPartial): Vote { + fromPartial, I>>(object: I): Vote { const message = createBaseVote(); message.type = object.type ?? 0; message.height = @@ -1035,7 +1036,7 @@ export const Commit = { return obj; }, - fromPartial(object: DeepPartial): Commit { + fromPartial, I>>(object: I): Commit { const message = createBaseCommit(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1139,7 +1140,7 @@ export const CommitSig = { return obj; }, - fromPartial(object: DeepPartial): CommitSig { + fromPartial, I>>(object: I): CommitSig { const message = createBaseCommitSig(); message.blockIdFlag = object.blockIdFlag ?? 0; message.validatorAddress = object.validatorAddress ?? new Uint8Array(); @@ -1271,7 +1272,7 @@ export const Proposal = { return obj; }, - fromPartial(object: DeepPartial): Proposal { + fromPartial, I>>(object: I): Proposal { const message = createBaseProposal(); message.type = object.type ?? 0; message.height = @@ -1351,7 +1352,7 @@ export const SignedHeader = { return obj; }, - fromPartial(object: DeepPartial): SignedHeader { + fromPartial, I>>(object: I): SignedHeader { const message = createBaseSignedHeader(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -1423,7 +1424,7 @@ export const LightBlock = { return obj; }, - fromPartial(object: DeepPartial): LightBlock { + fromPartial, I>>(object: I): LightBlock { const message = createBaseLightBlock(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -1520,7 +1521,7 @@ export const BlockMeta = { return obj; }, - fromPartial(object: DeepPartial): BlockMeta { + fromPartial, I>>(object: I): BlockMeta { const message = createBaseBlockMeta(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -1611,7 +1612,7 @@ export const TxProof = { return obj; }, - fromPartial(object: DeepPartial): TxProof { + fromPartial, I>>(object: I): TxProof { const message = createBaseTxProof(); message.rootHash = object.rootHash ?? new Uint8Array(); message.data = object.data ?? new Uint8Array(); diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 207d2748..8c604715 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface ValidatorSet { validators: Validator[]; @@ -101,7 +101,7 @@ export const ValidatorSet = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSet { + fromPartial, I>>(object: I): ValidatorSet { const message = createBaseValidatorSet(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.proposer = @@ -201,7 +201,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial, I>>(object: I): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.pubKey = @@ -281,7 +281,7 @@ export const SimpleValidator = { return obj; }, - fromPartial(object: DeepPartial): SimpleValidator { + fromPartial, I>>(object: I): SimpleValidator { const message = createBaseSimpleValidator(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index ee26bf30..42e909cb 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../helpers"; +import { Long, isSet, DeepPartial, Exact } from "../../helpers"; export const protobufPackage = "tendermint.version"; /** * App includes the protocol and software version for the application. @@ -84,7 +84,7 @@ export const App = { return obj; }, - fromPartial(object: DeepPartial): App { + fromPartial, I>>(object: I): App { const message = createBaseApp(); message.protocol = object.protocol !== undefined && object.protocol !== null @@ -155,7 +155,7 @@ export const Consensus = { return obj; }, - fromPartial(object: DeepPartial): Consensus { + fromPartial, I>>(object: I): Consensus { const message = createBaseConsensus(); message.block = object.block !== undefined && object.block !== null ? Long.fromValue(object.block) : Long.UZERO; From 79ef56cc603b019659359f1c7827377705aef831 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 11:29:38 -0700 Subject: [PATCH 32/38] add tendermint typings --- scripts/codegen.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/codegen.js b/scripts/codegen.js index 624099ad..11a56a60 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -80,6 +80,14 @@ telescope({ useExact: false } }, + }, + tendermint: { + prototypes: { + typingsFormat: { + useDeepPartial: true, + useExact: false + } + }, } } } From 6c2acfdf8d4ad179dad4a77fc24ce0f3ca1d482d Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 11:39:56 -0700 Subject: [PATCH 33/38] codegen --- src/tendermint/abci/types.ts | 97 ++++++++++++++----------------- src/tendermint/crypto/keys.ts | 4 +- src/tendermint/crypto/proof.ts | 12 ++-- src/tendermint/p2p/types.ts | 10 ++-- src/tendermint/types/block.ts | 4 +- src/tendermint/types/evidence.ts | 12 ++-- src/tendermint/types/params.ts | 14 ++--- src/tendermint/types/types.ts | 27 +++++---- src/tendermint/types/validator.ts | 8 +-- src/tendermint/version/types.ts | 6 +- 10 files changed, 91 insertions(+), 103 deletions(-) diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 4e98d301..cbe95b1d 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -9,7 +9,6 @@ import * as _m0 from "protobufjs/minimal"; import { isSet, DeepPartial, - Exact, Long, fromJsonTimestamp, bytesFromBase64, @@ -805,7 +804,7 @@ export const Request = { return obj; }, - fromPartial, I>>(object: I): Request { + fromPartial(object: DeepPartial): Request { const message = createBaseRequest(); message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; @@ -916,7 +915,7 @@ export const RequestEcho = { return obj; }, - fromPartial, I>>(object: I): RequestEcho { + fromPartial(object: DeepPartial): RequestEcho { const message = createBaseRequestEcho(); message.message = object.message ?? ""; return message; @@ -959,7 +958,7 @@ export const RequestFlush = { return obj; }, - fromPartial, I>>(_: I): RequestFlush { + fromPartial(_: DeepPartial): RequestFlush { const message = createBaseRequestFlush(); return message; }, @@ -1037,7 +1036,7 @@ export const RequestInfo = { return obj; }, - fromPartial, I>>(object: I): RequestInfo { + fromPartial(object: DeepPartial): RequestInfo { const message = createBaseRequestInfo(); message.version = object.version ?? ""; message.blockVersion = @@ -1112,7 +1111,7 @@ export const RequestSetOption = { return obj; }, - fromPartial, I>>(object: I): RequestSetOption { + fromPartial(object: DeepPartial): RequestSetOption { const message = createBaseRequestSetOption(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -1241,7 +1240,7 @@ export const RequestInitChain = { return obj; }, - fromPartial, I>>(object: I): RequestInitChain { + fromPartial(object: DeepPartial): RequestInitChain { const message = createBaseRequestInitChain(); message.time = object.time !== undefined && object.time !== null ? Timestamp.fromPartial(object.time) : undefined; @@ -1343,7 +1342,7 @@ export const RequestQuery = { return obj; }, - fromPartial, I>>(object: I): RequestQuery { + fromPartial(object: DeepPartial): RequestQuery { const message = createBaseRequestQuery(); message.data = object.data ?? new Uint8Array(); message.path = object.path ?? ""; @@ -1450,7 +1449,7 @@ export const RequestBeginBlock = { return obj; }, - fromPartial, I>>(object: I): RequestBeginBlock { + fromPartial(object: DeepPartial): RequestBeginBlock { const message = createBaseRequestBeginBlock(); message.hash = object.hash ?? new Uint8Array(); message.header = @@ -1525,7 +1524,7 @@ export const RequestCheckTx = { return obj; }, - fromPartial, I>>(object: I): RequestCheckTx { + fromPartial(object: DeepPartial): RequestCheckTx { const message = createBaseRequestCheckTx(); message.tx = object.tx ?? new Uint8Array(); message.type = object.type ?? 0; @@ -1583,7 +1582,7 @@ export const RequestDeliverTx = { return obj; }, - fromPartial, I>>(object: I): RequestDeliverTx { + fromPartial(object: DeepPartial): RequestDeliverTx { const message = createBaseRequestDeliverTx(); message.tx = object.tx ?? new Uint8Array(); return message; @@ -1639,7 +1638,7 @@ export const RequestEndBlock = { return obj; }, - fromPartial, I>>(object: I): RequestEndBlock { + fromPartial(object: DeepPartial): RequestEndBlock { const message = createBaseRequestEndBlock(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1683,7 +1682,7 @@ export const RequestCommit = { return obj; }, - fromPartial, I>>(_: I): RequestCommit { + fromPartial(_: DeepPartial): RequestCommit { const message = createBaseRequestCommit(); return message; }, @@ -1725,7 +1724,7 @@ export const RequestListSnapshots = { return obj; }, - fromPartial, I>>(_: I): RequestListSnapshots { + fromPartial(_: DeepPartial): RequestListSnapshots { const message = createBaseRequestListSnapshots(); return message; }, @@ -1793,7 +1792,7 @@ export const RequestOfferSnapshot = { return obj; }, - fromPartial, I>>(object: I): RequestOfferSnapshot { + fromPartial(object: DeepPartial): RequestOfferSnapshot { const message = createBaseRequestOfferSnapshot(); message.snapshot = object.snapshot !== undefined && object.snapshot !== null @@ -1875,9 +1874,7 @@ export const RequestLoadSnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): RequestLoadSnapshotChunk { + fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { const message = createBaseRequestLoadSnapshotChunk(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -1959,9 +1956,7 @@ export const RequestApplySnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): RequestApplySnapshotChunk { + fromPartial(object: DeepPartial): RequestApplySnapshotChunk { const message = createBaseRequestApplySnapshotChunk(); message.index = object.index ?? 0; message.chunk = object.chunk ?? new Uint8Array(); @@ -2214,7 +2209,7 @@ export const Response = { return obj; }, - fromPartial, I>>(object: I): Response { + fromPartial(object: DeepPartial): Response { const message = createBaseResponse(); message.exception = object.exception !== undefined && object.exception !== null @@ -2329,7 +2324,7 @@ export const ResponseException = { return obj; }, - fromPartial, I>>(object: I): ResponseException { + fromPartial(object: DeepPartial): ResponseException { const message = createBaseResponseException(); message.error = object.error ?? ""; return message; @@ -2385,7 +2380,7 @@ export const ResponseEcho = { return obj; }, - fromPartial, I>>(object: I): ResponseEcho { + fromPartial(object: DeepPartial): ResponseEcho { const message = createBaseResponseEcho(); message.message = object.message ?? ""; return message; @@ -2428,7 +2423,7 @@ export const ResponseFlush = { return obj; }, - fromPartial, I>>(_: I): ResponseFlush { + fromPartial(_: DeepPartial): ResponseFlush { const message = createBaseResponseFlush(); return message; }, @@ -2533,7 +2528,7 @@ export const ResponseInfo = { return obj; }, - fromPartial, I>>(object: I): ResponseInfo { + fromPartial(object: DeepPartial): ResponseInfo { const message = createBaseResponseInfo(); message.data = object.data ?? ""; message.version = object.version ?? ""; @@ -2621,7 +2616,7 @@ export const ResponseSetOption = { return obj; }, - fromPartial, I>>(object: I): ResponseSetOption { + fromPartial(object: DeepPartial): ResponseSetOption { const message = createBaseResponseSetOption(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2715,7 +2710,7 @@ export const ResponseInitChain = { return obj; }, - fromPartial, I>>(object: I): ResponseInitChain { + fromPartial(object: DeepPartial): ResponseInitChain { const message = createBaseResponseInitChain(); message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null @@ -2867,7 +2862,7 @@ export const ResponseQuery = { return obj; }, - fromPartial, I>>(object: I): ResponseQuery { + fromPartial(object: DeepPartial): ResponseQuery { const message = createBaseResponseQuery(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2942,7 +2937,7 @@ export const ResponseBeginBlock = { return obj; }, - fromPartial, I>>(object: I): ResponseBeginBlock { + fromPartial(object: DeepPartial): ResponseBeginBlock { const message = createBaseResponseBeginBlock(); message.events = object.events?.map((e) => Event.fromPartial(e)) || []; return message; @@ -3082,7 +3077,7 @@ export const ResponseCheckTx = { return obj; }, - fromPartial, I>>(object: I): ResponseCheckTx { + fromPartial(object: DeepPartial): ResponseCheckTx { const message = createBaseResponseCheckTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3233,7 +3228,7 @@ export const ResponseDeliverTx = { return obj; }, - fromPartial, I>>(object: I): ResponseDeliverTx { + fromPartial(object: DeepPartial): ResponseDeliverTx { const message = createBaseResponseDeliverTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3341,7 +3336,7 @@ export const ResponseEndBlock = { return obj; }, - fromPartial, I>>(object: I): ResponseEndBlock { + fromPartial(object: DeepPartial): ResponseEndBlock { const message = createBaseResponseEndBlock(); message.validatorUpdates = object.validatorUpdates?.map((e) => ValidatorUpdate.fromPartial(e)) || []; message.consensusParamUpdates = @@ -3414,7 +3409,7 @@ export const ResponseCommit = { return obj; }, - fromPartial, I>>(object: I): ResponseCommit { + fromPartial(object: DeepPartial): ResponseCommit { const message = createBaseResponseCommit(); message.data = object.data ?? new Uint8Array(); message.retainHeight = @@ -3482,7 +3477,7 @@ export const ResponseListSnapshots = { return obj; }, - fromPartial, I>>(object: I): ResponseListSnapshots { + fromPartial(object: DeepPartial): ResponseListSnapshots { const message = createBaseResponseListSnapshots(); message.snapshots = object.snapshots?.map((e) => Snapshot.fromPartial(e)) || []; return message; @@ -3538,7 +3533,7 @@ export const ResponseOfferSnapshot = { return obj; }, - fromPartial, I>>(object: I): ResponseOfferSnapshot { + fromPartial(object: DeepPartial): ResponseOfferSnapshot { const message = createBaseResponseOfferSnapshot(); message.result = object.result ?? 0; return message; @@ -3595,9 +3590,7 @@ export const ResponseLoadSnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): ResponseLoadSnapshotChunk { + fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { const message = createBaseResponseLoadSnapshotChunk(); message.chunk = object.chunk ?? new Uint8Array(); return message; @@ -3703,9 +3696,7 @@ export const ResponseApplySnapshotChunk = { return obj; }, - fromPartial, I>>( - object: I, - ): ResponseApplySnapshotChunk { + fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { const message = createBaseResponseApplySnapshotChunk(); message.result = object.result ?? 0; message.refetchChunks = object.refetchChunks?.map((e) => e) || []; @@ -3800,7 +3791,7 @@ export const ConsensusParams = { return obj; }, - fromPartial, I>>(object: I): ConsensusParams { + fromPartial(object: DeepPartial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -3880,7 +3871,7 @@ export const BlockParams = { return obj; }, - fromPartial, I>>(object: I): BlockParams { + fromPartial(object: DeepPartial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -3956,7 +3947,7 @@ export const LastCommitInfo = { return obj; }, - fromPartial, I>>(object: I): LastCommitInfo { + fromPartial(object: DeepPartial): LastCommitInfo { const message = createBaseLastCommitInfo(); message.round = object.round ?? 0; message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || []; @@ -4032,7 +4023,7 @@ export const Event = { return obj; }, - fromPartial, I>>(object: I): Event { + fromPartial(object: DeepPartial): Event { const message = createBaseEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => EventAttribute.fromPartial(e)) || []; @@ -4113,7 +4104,7 @@ export const EventAttribute = { return obj; }, - fromPartial, I>>(object: I): EventAttribute { + fromPartial(object: DeepPartial): EventAttribute { const message = createBaseEventAttribute(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -4206,7 +4197,7 @@ export const TxResult = { return obj; }, - fromPartial, I>>(object: I): TxResult { + fromPartial(object: DeepPartial): TxResult { const message = createBaseTxResult(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -4281,7 +4272,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.power = @@ -4351,7 +4342,7 @@ export const ValidatorUpdate = { return obj; }, - fromPartial, I>>(object: I): ValidatorUpdate { + fromPartial(object: DeepPartial): ValidatorUpdate { const message = createBaseValidatorUpdate(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null @@ -4424,7 +4415,7 @@ export const VoteInfo = { return obj; }, - fromPartial, I>>(object: I): VoteInfo { + fromPartial(object: DeepPartial): VoteInfo { const message = createBaseVoteInfo(); message.validator = object.validator !== undefined && object.validator !== null @@ -4530,7 +4521,7 @@ export const Evidence = { return obj; }, - fromPartial, I>>(object: I): Evidence { + fromPartial(object: DeepPartial): Evidence { const message = createBaseEvidence(); message.type = object.type ?? 0; message.validator = @@ -4644,7 +4635,7 @@ export const Snapshot = { return obj; }, - fromPartial, I>>(object: I): Snapshot { + fromPartial(object: DeepPartial): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index 0e934fb4..adf582ef 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; /** PublicKey defines the keys available for use with Tendermint Validators */ @@ -72,7 +72,7 @@ export const PublicKey = { return obj; }, - fromPartial, I>>(object: I): PublicKey { + fromPartial(object: DeepPartial): PublicKey { const message = createBasePublicKey(); message.ed25519 = object.ed25519 ?? undefined; message.secp256k1 = object.secp256k1 ?? undefined; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 57f6a7a3..6e84072c 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; export interface Proof { total: Long; @@ -127,7 +127,7 @@ export const Proof = { return obj; }, - fromPartial, I>>(object: I): Proof { + fromPartial(object: DeepPartial): Proof { const message = createBaseProof(); message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.ZERO; @@ -200,7 +200,7 @@ export const ValueOp = { return obj; }, - fromPartial, I>>(object: I): ValueOp { + fromPartial(object: DeepPartial): ValueOp { const message = createBaseValueOp(); message.key = object.key ?? new Uint8Array(); message.proof = @@ -280,7 +280,7 @@ export const DominoOp = { return obj; }, - fromPartial, I>>(object: I): DominoOp { + fromPartial(object: DeepPartial): DominoOp { const message = createBaseDominoOp(); message.key = object.key ?? ""; message.input = object.input ?? ""; @@ -362,7 +362,7 @@ export const ProofOp = { return obj; }, - fromPartial, I>>(object: I): ProofOp { + fromPartial(object: DeepPartial): ProofOp { const message = createBaseProofOp(); message.type = object.type ?? ""; message.key = object.key ?? new Uint8Array(); @@ -426,7 +426,7 @@ export const ProofOps = { return obj; }, - fromPartial, I>>(object: I): ProofOps { + fromPartial(object: DeepPartial): ProofOps { const message = createBaseProofOps(); message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || []; return message; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 63eda28d..3a3dd206 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; export interface NetAddress { id: string; @@ -99,7 +99,7 @@ export const NetAddress = { return obj; }, - fromPartial, I>>(object: I): NetAddress { + fromPartial(object: DeepPartial): NetAddress { const message = createBaseNetAddress(); message.id = object.id ?? ""; message.ip = object.ip ?? ""; @@ -179,7 +179,7 @@ export const ProtocolVersion = { return obj; }, - fromPartial, I>>(object: I): ProtocolVersion { + fromPartial(object: DeepPartial): ProtocolVersion { const message = createBaseProtocolVersion(); message.p2p = object.p2p !== undefined && object.p2p !== null ? Long.fromValue(object.p2p) : Long.UZERO; message.block = @@ -322,7 +322,7 @@ export const DefaultNodeInfo = { return obj; }, - fromPartial, I>>(object: I): DefaultNodeInfo { + fromPartial(object: DeepPartial): DefaultNodeInfo { const message = createBaseDefaultNodeInfo(); message.protocolVersion = object.protocolVersion !== undefined && object.protocolVersion !== null @@ -402,7 +402,7 @@ export const DefaultNodeInfoOther = { return obj; }, - fromPartial, I>>(object: I): DefaultNodeInfoOther { + fromPartial(object: DeepPartial): DefaultNodeInfoOther { const message = createBaseDefaultNodeInfoOther(); message.txIndex = object.txIndex ?? ""; message.rpcAddress = object.rpcAddress ?? ""; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 7fd10541..0bfb1e9b 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -3,7 +3,7 @@ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../helpers"; +import { isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Block { header?: Header; @@ -96,7 +96,7 @@ export const Block = { return obj; }, - fromPartial, I>>(object: I): Block { + fromPartial(object: DeepPartial): Block { const message = createBaseBlock(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index ba7f1e61..3fb3ef88 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -4,7 +4,7 @@ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator } from "./validator"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; +import { isSet, DeepPartial, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; @@ -102,7 +102,7 @@ export const Evidence = { return obj; }, - fromPartial, I>>(object: I): Evidence { + fromPartial(object: DeepPartial): Evidence { const message = createBaseEvidence(); message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null @@ -211,7 +211,7 @@ export const DuplicateVoteEvidence = { return obj; }, - fromPartial, I>>(object: I): DuplicateVoteEvidence { + fromPartial(object: DeepPartial): DuplicateVoteEvidence { const message = createBaseDuplicateVoteEvidence(); message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; @@ -340,9 +340,7 @@ export const LightClientAttackEvidence = { return obj; }, - fromPartial, I>>( - object: I, - ): LightClientAttackEvidence { + fromPartial(object: DeepPartial): LightClientAttackEvidence { const message = createBaseLightClientAttackEvidence(); message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null @@ -420,7 +418,7 @@ export const EvidenceList = { return obj; }, - fromPartial, I>>(object: I): EvidenceList { + fromPartial(object: DeepPartial): EvidenceList { const message = createBaseEvidenceList(); message.evidence = object.evidence?.map((e) => Evidence.fromPartial(e)) || []; return message; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index ed94658a..2eccfa83 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../helpers"; +import { isSet, DeepPartial, Long } from "../../helpers"; export const protobufPackage = "tendermint.types"; /** * ConsensusParams contains consensus critical parameters that determine the @@ -175,7 +175,7 @@ export const ConsensusParams = { return obj; }, - fromPartial, I>>(object: I): ConsensusParams { + fromPartial(object: DeepPartial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -266,7 +266,7 @@ export const BlockParams = { return obj; }, - fromPartial, I>>(object: I): BlockParams { + fromPartial(object: DeepPartial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -353,7 +353,7 @@ export const EvidenceParams = { return obj; }, - fromPartial, I>>(object: I): EvidenceParams { + fromPartial(object: DeepPartial): EvidenceParams { const message = createBaseEvidenceParams(); message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null @@ -424,7 +424,7 @@ export const ValidatorParams = { return obj; }, - fromPartial, I>>(object: I): ValidatorParams { + fromPartial(object: DeepPartial): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pubKeyTypes?.map((e) => e) || []; return message; @@ -480,7 +480,7 @@ export const VersionParams = { return obj; }, - fromPartial, I>>(object: I): VersionParams { + fromPartial(object: DeepPartial): VersionParams { const message = createBaseVersionParams(); message.appVersion = object.appVersion !== undefined && object.appVersion !== null @@ -551,7 +551,7 @@ export const HashedParams = { return obj; }, - fromPartial, I>>(object: I): HashedParams { + fromPartial(object: DeepPartial): HashedParams { const message = createBaseHashedParams(); message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index 6309a44f..c780c376 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -10,7 +10,6 @@ import { bytesFromBase64, base64FromBytes, DeepPartial, - Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -309,7 +308,7 @@ export const PartSetHeader = { return obj; }, - fromPartial, I>>(object: I): PartSetHeader { + fromPartial(object: DeepPartial): PartSetHeader { const message = createBasePartSetHeader(); message.total = object.total ?? 0; message.hash = object.hash ?? new Uint8Array(); @@ -389,7 +388,7 @@ export const Part = { return obj; }, - fromPartial, I>>(object: I): Part { + fromPartial(object: DeepPartial): Part { const message = createBasePart(); message.index = object.index ?? 0; message.bytes = object.bytes ?? new Uint8Array(); @@ -461,7 +460,7 @@ export const BlockID = { return obj; }, - fromPartial, I>>(object: I): BlockID { + fromPartial(object: DeepPartial): BlockID { const message = createBaseBlockID(); message.hash = object.hash ?? new Uint8Array(); message.partSetHeader = @@ -699,7 +698,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: DeepPartial
): Header { const message = createBaseHeader(); message.version = object.version !== undefined && object.version !== null @@ -782,7 +781,7 @@ export const Data = { return obj; }, - fromPartial, I>>(object: I): Data { + fromPartial(object: DeepPartial): Data { const message = createBaseData(); message.txs = object.txs?.map((e) => e) || []; return message; @@ -924,7 +923,7 @@ export const Vote = { return obj; }, - fromPartial, I>>(object: I): Vote { + fromPartial(object: DeepPartial): Vote { const message = createBaseVote(); message.type = object.type ?? 0; message.height = @@ -1036,7 +1035,7 @@ export const Commit = { return obj; }, - fromPartial, I>>(object: I): Commit { + fromPartial(object: DeepPartial): Commit { const message = createBaseCommit(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1140,7 +1139,7 @@ export const CommitSig = { return obj; }, - fromPartial, I>>(object: I): CommitSig { + fromPartial(object: DeepPartial): CommitSig { const message = createBaseCommitSig(); message.blockIdFlag = object.blockIdFlag ?? 0; message.validatorAddress = object.validatorAddress ?? new Uint8Array(); @@ -1272,7 +1271,7 @@ export const Proposal = { return obj; }, - fromPartial, I>>(object: I): Proposal { + fromPartial(object: DeepPartial): Proposal { const message = createBaseProposal(); message.type = object.type ?? 0; message.height = @@ -1352,7 +1351,7 @@ export const SignedHeader = { return obj; }, - fromPartial, I>>(object: I): SignedHeader { + fromPartial(object: DeepPartial): SignedHeader { const message = createBaseSignedHeader(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -1424,7 +1423,7 @@ export const LightBlock = { return obj; }, - fromPartial, I>>(object: I): LightBlock { + fromPartial(object: DeepPartial): LightBlock { const message = createBaseLightBlock(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -1521,7 +1520,7 @@ export const BlockMeta = { return obj; }, - fromPartial, I>>(object: I): BlockMeta { + fromPartial(object: DeepPartial): BlockMeta { const message = createBaseBlockMeta(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -1612,7 +1611,7 @@ export const TxProof = { return obj; }, - fromPartial, I>>(object: I): TxProof { + fromPartial(object: DeepPartial): TxProof { const message = createBaseTxProof(); message.rootHash = object.rootHash ?? new Uint8Array(); message.data = object.data ?? new Uint8Array(); diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 8c604715..207d2748 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -2,7 +2,7 @@ /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface ValidatorSet { validators: Validator[]; @@ -101,7 +101,7 @@ export const ValidatorSet = { return obj; }, - fromPartial, I>>(object: I): ValidatorSet { + fromPartial(object: DeepPartial): ValidatorSet { const message = createBaseValidatorSet(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.proposer = @@ -201,7 +201,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.pubKey = @@ -281,7 +281,7 @@ export const SimpleValidator = { return obj; }, - fromPartial, I>>(object: I): SimpleValidator { + fromPartial(object: DeepPartial): SimpleValidator { const message = createBaseSimpleValidator(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index 42e909cb..ee26bf30 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,7 +1,7 @@ //@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../helpers"; +import { Long, isSet, DeepPartial } from "../../helpers"; export const protobufPackage = "tendermint.version"; /** * App includes the protocol and software version for the application. @@ -84,7 +84,7 @@ export const App = { return obj; }, - fromPartial, I>>(object: I): App { + fromPartial(object: DeepPartial): App { const message = createBaseApp(); message.protocol = object.protocol !== undefined && object.protocol !== null @@ -155,7 +155,7 @@ export const Consensus = { return obj; }, - fromPartial, I>>(object: I): Consensus { + fromPartial(object: DeepPartial): Consensus { const message = createBaseConsensus(); message.block = object.block !== undefined && object.block !== null ? Long.fromValue(object.block) : Long.UZERO; From 4e39f7402e9374faa3ddd903c14db1b0070d5cdd Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 12:11:45 -0700 Subject: [PATCH 34/38] tendermint --- scripts/codegen.js | 29 ++++++++------ src/cosmos/base/tendermint/v1beta1/query.ts | 42 ++++++++------------- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/scripts/codegen.js b/scripts/codegen.js index 11a56a60..831b0a1b 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -3,6 +3,16 @@ const { join } = require('path'); const telescope = require('@osmonauts/telescope').default; + +const disableExact = { + prototypes: { + typingsFormat: { + useDeepPartial: true, + useExact: false + } + } +}; + telescope({ protoDirs: [ 'cosmos-sdk-0.45/proto', @@ -74,20 +84,17 @@ telescope({ }, packages: { google: { - prototypes: { - typingsFormat: { - useDeepPartial: true, - useExact: false + ...disableExact + }, + cosmos: { + base: { + tendermint: { + ...disableExact } - }, + } }, tendermint: { - prototypes: { - typingsFormat: { - useDeepPartial: true, - useExact: false - } - }, + ...disableExact } } } diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index fad4d1d3..1eefb189 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -6,7 +6,7 @@ import { BlockID } from "../../../../tendermint/types/types"; import { Block } from "../../../../tendermint/types/block"; import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.tendermint.v1beta1"; /** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ @@ -173,9 +173,7 @@ export const GetValidatorSetByHeightRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): GetValidatorSetByHeightRequest { + fromPartial(object: DeepPartial): GetValidatorSetByHeightRequest { const message = createBaseGetValidatorSetByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -267,9 +265,7 @@ export const GetValidatorSetByHeightResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetValidatorSetByHeightResponse { + fromPartial(object: DeepPartial): GetValidatorSetByHeightResponse { const message = createBaseGetValidatorSetByHeightResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -334,9 +330,7 @@ export const GetLatestValidatorSetRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): GetLatestValidatorSetRequest { + fromPartial(object: DeepPartial): GetLatestValidatorSetRequest { const message = createBaseGetLatestValidatorSetRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -426,9 +420,7 @@ export const GetLatestValidatorSetResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetLatestValidatorSetResponse { + fromPartial(object: DeepPartial): GetLatestValidatorSetResponse { const message = createBaseGetLatestValidatorSetResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -526,7 +518,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: DeepPartial): Validator { const message = createBaseValidator(); message.address = object.address ?? ""; message.pubKey = @@ -592,7 +584,7 @@ export const GetBlockByHeightRequest = { return obj; }, - fromPartial, I>>(object: I): GetBlockByHeightRequest { + fromPartial(object: DeepPartial): GetBlockByHeightRequest { const message = createBaseGetBlockByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -661,9 +653,7 @@ export const GetBlockByHeightResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): GetBlockByHeightResponse { + fromPartial(object: DeepPartial): GetBlockByHeightResponse { const message = createBaseGetBlockByHeightResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -711,7 +701,7 @@ export const GetLatestBlockRequest = { return obj; }, - fromPartial, I>>(_: I): GetLatestBlockRequest { + fromPartial(_: DeepPartial): GetLatestBlockRequest { const message = createBaseGetLatestBlockRequest(); return message; }, @@ -778,7 +768,7 @@ export const GetLatestBlockResponse = { return obj; }, - fromPartial, I>>(object: I): GetLatestBlockResponse { + fromPartial(object: DeepPartial): GetLatestBlockResponse { const message = createBaseGetLatestBlockResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -826,7 +816,7 @@ export const GetSyncingRequest = { return obj; }, - fromPartial, I>>(_: I): GetSyncingRequest { + fromPartial(_: DeepPartial): GetSyncingRequest { const message = createBaseGetSyncingRequest(); return message; }, @@ -881,7 +871,7 @@ export const GetSyncingResponse = { return obj; }, - fromPartial, I>>(object: I): GetSyncingResponse { + fromPartial(object: DeepPartial): GetSyncingResponse { const message = createBaseGetSyncingResponse(); message.syncing = object.syncing ?? false; return message; @@ -924,7 +914,7 @@ export const GetNodeInfoRequest = { return obj; }, - fromPartial, I>>(_: I): GetNodeInfoRequest { + fromPartial(_: DeepPartial): GetNodeInfoRequest { const message = createBaseGetNodeInfoRequest(); return message; }, @@ -1000,7 +990,7 @@ export const GetNodeInfoResponse = { return obj; }, - fromPartial, I>>(object: I): GetNodeInfoResponse { + fromPartial(object: DeepPartial): GetNodeInfoResponse { const message = createBaseGetNodeInfoResponse(); message.defaultNodeInfo = object.defaultNodeInfo !== undefined && object.defaultNodeInfo !== null @@ -1146,7 +1136,7 @@ export const VersionInfo = { return obj; }, - fromPartial, I>>(object: I): VersionInfo { + fromPartial(object: DeepPartial): VersionInfo { const message = createBaseVersionInfo(); message.name = object.name ?? ""; message.appName = object.appName ?? ""; @@ -1231,7 +1221,7 @@ export const Module = { return obj; }, - fromPartial, I>>(object: I): Module { + fromPartial(object: DeepPartial): Module { const message = createBaseModule(); message.path = object.path ?? ""; message.version = object.version ?? ""; From 0e715ba8a0476b874da4f9c98c43b9ead97c5a92 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 13:25:51 -0700 Subject: [PATCH 35/38] types check --- package-lock.json | 30 +++--- package.json | 2 +- scripts/codegen.js | 31 +----- src/confio/proofs.ts | 33 +++---- src/cosmos/auth/v1beta1/auth.ts | 9 +- src/cosmos/auth/v1beta1/genesis.ts | 5 +- src/cosmos/auth/v1beta1/query.ts | 15 ++- src/cosmos/authz/v1beta1/authz.ts | 9 +- src/cosmos/authz/v1beta1/genesis.ts | 4 +- src/cosmos/authz/v1beta1/query.ts | 23 ++--- src/cosmos/authz/v1beta1/tx.ts | 15 ++- src/cosmos/bank/v1beta1/authz.ts | 4 +- src/cosmos/bank/v1beta1/bank.ts | 17 ++-- src/cosmos/bank/v1beta1/genesis.ts | 7 +- src/cosmos/bank/v1beta1/query.ts | 51 ++++------ src/cosmos/bank/v1beta1/tx.ts | 11 +-- src/cosmos/base/abci/v1beta1/abci.ts | 23 +++-- src/cosmos/base/kv/v1beta1/kv.ts | 7 +- src/cosmos/base/query/v1beta1/pagination.ts | 7 +- .../base/reflection/v1beta1/reflection.ts | 17 +--- src/cosmos/base/snapshots/v1beta1/snapshot.ts | 19 ++-- src/cosmos/base/store/v1beta1/commit_info.ts | 9 +- src/cosmos/base/store/v1beta1/listening.ts | 5 +- src/cosmos/base/store/v1beta1/snapshot.ts | 9 +- src/cosmos/base/tendermint/v1beta1/query.ts | 33 +++---- src/cosmos/base/v1beta1/coin.ts | 11 +-- src/cosmos/capability/v1beta1/capability.ts | 9 +- src/cosmos/capability/v1beta1/genesis.ts | 7 +- src/cosmos/crisis/v1beta1/genesis.ts | 5 +- src/cosmos/crisis/v1beta1/tx.ts | 7 +- src/cosmos/crypto/ed25519/keys.ts | 7 +- src/cosmos/crypto/multisig/keys.ts | 5 +- .../crypto/multisig/v1beta1/multisig.ts | 7 +- src/cosmos/crypto/secp256k1/keys.ts | 7 +- .../distribution/v1beta1/distribution.ts | 39 +++----- src/cosmos/distribution/v1beta1/genesis.ts | 31 ++---- src/cosmos/distribution/v1beta1/query.ts | 69 ++++--------- src/cosmos/distribution/v1beta1/tx.ts | 31 ++---- src/cosmos/evidence/v1beta1/evidence.ts | 5 +- src/cosmos/evidence/v1beta1/genesis.ts | 4 +- src/cosmos/evidence/v1beta1/query.ts | 13 +-- src/cosmos/evidence/v1beta1/tx.ts | 9 +- src/cosmos/feegrant/v1beta1/feegrant.ts | 11 +-- src/cosmos/feegrant/v1beta1/genesis.ts | 4 +- src/cosmos/feegrant/v1beta1/query.ts | 19 ++-- src/cosmos/feegrant/v1beta1/tx.ts | 11 +-- src/cosmos/genutil/v1beta1/genesis.ts | 5 +- src/cosmos/gov/v1beta1/genesis.ts | 5 +- src/cosmos/gov/v1beta1/gov.ts | 21 ++-- src/cosmos/gov/v1beta1/query.ts | 37 ++++--- src/cosmos/gov/v1beta1/tx.ts | 21 ++-- src/cosmos/mint/v1beta1/genesis.ts | 5 +- src/cosmos/mint/v1beta1/mint.ts | 7 +- src/cosmos/mint/v1beta1/query.ts | 19 ++-- src/cosmos/params/v1beta1/params.ts | 7 +- src/cosmos/params/v1beta1/query.ts | 7 +- src/cosmos/slashing/v1beta1/genesis.ts | 11 +-- src/cosmos/slashing/v1beta1/query.ts | 21 ++-- src/cosmos/slashing/v1beta1/slashing.ts | 7 +- src/cosmos/slashing/v1beta1/tx.ts | 7 +- src/cosmos/staking/v1beta1/authz.ts | 9 +- src/cosmos/staking/v1beta1/genesis.ts | 7 +- src/cosmos/staking/v1beta1/query.ts | 95 +++++++----------- src/cosmos/staking/v1beta1/staking.ts | 47 ++++----- src/cosmos/staking/v1beta1/tx.ts | 25 +++-- src/cosmos/tx/signing/v1beta1/signing.ts | 19 ++-- src/cosmos/tx/v1beta1/service.ts | 23 +++-- src/cosmos/tx/v1beta1/tx.ts | 23 +++-- src/cosmos/upgrade/v1beta1/query.ts | 31 ++---- src/cosmos/upgrade/v1beta1/upgrade.ts | 13 +-- src/cosmos/vesting/v1beta1/tx.ts | 9 +- src/cosmos/vesting/v1beta1/vesting.ts | 17 ++-- src/cosmwasm/wasm/v1/genesis.ts | 13 ++- src/cosmwasm/wasm/v1/ibc.ts | 7 +- src/cosmwasm/wasm/v1/proposal.ts | 29 +++--- src/cosmwasm/wasm/v1/query.ts | 67 ++++--------- src/cosmwasm/wasm/v1/tx.ts | 33 +++---- src/cosmwasm/wasm/v1/types.ts | 21 ++-- src/google/api/http.ts | 9 +- src/google/protobuf/any.ts | 5 +- src/google/protobuf/descriptor.ts | 95 +++++++++--------- src/google/protobuf/duration.ts | 5 +- src/google/protobuf/timestamp.ts | 5 +- src/helpers.ts | 29 +++--- .../controller/v1/controller.ts | 5 +- .../controller/v1/query.ts | 7 +- .../interchain_accounts/host/v1/host.ts | 5 +- .../interchain_accounts/host/v1/query.ts | 7 +- .../interchain_accounts/v1/account.ts | 5 +- .../interchain_accounts/v1/genesis.ts | 15 ++- .../interchain_accounts/v1/metadata.ts | 5 +- .../interchain_accounts/v1/packet.ts | 9 +- src/ibc/applications/transfer/v1/genesis.ts | 5 +- src/ibc/applications/transfer/v1/query.ts | 21 ++-- src/ibc/applications/transfer/v1/transfer.ts | 7 +- src/ibc/applications/transfer/v1/tx.ts | 7 +- src/ibc/applications/transfer/v2/packet.ts | 5 +- src/ibc/core/channel/v1/channel.ts | 15 ++- src/ibc/core/channel/v1/genesis.ts | 7 +- src/ibc/core/channel/v1/query.ts | 99 +++++-------------- src/ibc/core/channel/v1/tx.ts | 55 ++++------- src/ibc/core/client/v1/client.ts | 19 ++-- src/ibc/core/client/v1/genesis.ts | 11 +-- src/ibc/core/client/v1/query.ts | 63 ++++-------- src/ibc/core/client/v1/tx.ts | 21 ++-- src/ibc/core/commitment/v1/commitment.ts | 11 +-- src/ibc/core/connection/v1/connection.ts | 17 ++-- src/ibc/core/connection/v1/genesis.ts | 5 +- src/ibc/core/connection/v1/query.ts | 37 +++---- src/ibc/core/connection/v1/tx.ts | 29 ++---- src/ibc/core/types/v1/genesis.ts | 5 +- .../lightclients/localhost/v1/localhost.ts | 5 +- .../solomachine/v1/solomachine.ts | 41 ++++---- .../lightclients/tendermint/v1/tendermint.ts | 13 +-- src/tendermint/abci/types.ts | 90 +++++++++-------- src/tendermint/crypto/keys.ts | 5 +- src/tendermint/crypto/proof.ts | 13 ++- src/tendermint/p2p/types.ts | 11 +-- src/tendermint/types/block.ts | 5 +- src/tendermint/types/evidence.ts | 11 +-- src/tendermint/types/params.ts | 15 ++- src/tendermint/types/types.ts | 28 +++--- src/tendermint/types/validator.ts | 9 +- src/tendermint/version/types.ts | 7 +- 124 files changed, 888 insertions(+), 1384 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad8c81d5..94403a66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.61.0", + "@osmonauts/telescope": "^0.66.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,9 +2142,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.56.0.tgz", - "integrity": "sha512-pOT5v6DneNycPVdp8i1pvg1UzdWuOY7b334Z8uOIfwTMwlYdzUV6b5ARu6Qknoc8gEGd8MbyMhvesfWA/ArHEA==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.0.tgz", + "integrity": "sha512-s2PGxvYJUhDkLdQs6eGaX06clSpafglKR8Yr0O5Baacc4XI3sYjBa76eBFikN3ijXYji2Ue3cJsvXakb4z5EVg==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.61.0.tgz", - "integrity": "sha512-DDVCNSMAMwxZZ70WB3g+Cawe6nTmSnNa0FzMDb6tu3zzR2+iET2U8pO1xHgUhvnScBvPiI26f73gsLfzUUSvMg==", + "version": "0.66.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.1.tgz", + "integrity": "sha512-YNFzP/wUItwpTffTLXuUEiw5Yjj3cM51yV3ZHCAkQpk2gg2lV5j8k9W1Q6EWNyvWQYHZ9an8neov4irKhSk+Aw==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,7 +2189,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.56.0", + "@osmonauts/ast": "^0.59.0", "@osmonauts/proto-parser": "^0.30.0", "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", @@ -6490,9 +6490,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.56.0.tgz", - "integrity": "sha512-pOT5v6DneNycPVdp8i1pvg1UzdWuOY7b334Z8uOIfwTMwlYdzUV6b5ARu6Qknoc8gEGd8MbyMhvesfWA/ArHEA==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.0.tgz", + "integrity": "sha512-s2PGxvYJUhDkLdQs6eGaX06clSpafglKR8Yr0O5Baacc4XI3sYjBa76eBFikN3ijXYji2Ue3cJsvXakb4z5EVg==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.61.0.tgz", - "integrity": "sha512-DDVCNSMAMwxZZ70WB3g+Cawe6nTmSnNa0FzMDb6tu3zzR2+iET2U8pO1xHgUhvnScBvPiI26f73gsLfzUUSvMg==", + "version": "0.66.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.1.tgz", + "integrity": "sha512-YNFzP/wUItwpTffTLXuUEiw5Yjj3cM51yV3ZHCAkQpk2gg2lV5j8k9W1Q6EWNyvWQYHZ9an8neov4irKhSk+Aw==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,7 +6537,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.56.0", + "@osmonauts/ast": "^0.59.0", "@osmonauts/proto-parser": "^0.30.0", "@osmonauts/types": "^0.22.0", "@osmonauts/utils": "^0.7.0", diff --git a/package.json b/package.json index 901098f8..674979a5 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.61.0", + "@osmonauts/telescope": "^0.66.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 831b0a1b..894366e0 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -3,16 +3,6 @@ const { join } = require('path'); const telescope = require('@osmonauts/telescope').default; - -const disableExact = { - prototypes: { - typingsFormat: { - useDeepPartial: true, - useExact: false - } - } -}; - telescope({ protoDirs: [ 'cosmos-sdk-0.45/proto', @@ -25,7 +15,7 @@ telescope({ logLevel: 2, useSDKTypes: false, tsDisable: { - disableAll: true + disableAll: false }, eslintDisable: { disableAll: true @@ -64,8 +54,8 @@ telescope({ toJSON: true }, typingsFormat: { - useDeepPartial: true, - useExact: true, + useDeepPartial: false, + useExact: false, timestamp: 'timestamp', duration: 'duration' } @@ -81,21 +71,6 @@ telescope({ }, aminoEncoding: { enabled: false - }, - packages: { - google: { - ...disableExact - }, - cosmos: { - base: { - tendermint: { - ...disableExact - } - } - }, - tendermint: { - ...disableExact - } } } }).then(() => { diff --git a/src/confio/proofs.ts b/src/confio/proofs.ts index 4b620f08..54bbf9e3 100644 --- a/src/confio/proofs.ts +++ b/src/confio/proofs.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../helpers"; 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. */ @@ -467,7 +466,7 @@ export const ExistenceProof = { return obj; }, - fromPartial, I>>(object: I): ExistenceProof { + fromPartial(object: Partial): ExistenceProof { const message = createBaseExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -551,7 +550,7 @@ export const NonExistenceProof = { return obj; }, - fromPartial, I>>(object: I): NonExistenceProof { + fromPartial(object: Partial): NonExistenceProof { const message = createBaseNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = @@ -649,7 +648,7 @@ export const CommitmentProof = { return obj; }, - fromPartial, I>>(object: I): CommitmentProof { + fromPartial(object: Partial): CommitmentProof { const message = createBaseCommitmentProof(); message.exist = object.exist !== undefined && object.exist !== null @@ -763,7 +762,7 @@ export const LeafOp = { return obj; }, - fromPartial, I>>(object: I): LeafOp { + fromPartial(object: Partial): LeafOp { const message = createBaseLeafOp(); message.hash = object.hash ?? 0; message.prehashKey = object.prehashKey ?? 0; @@ -847,7 +846,7 @@ export const InnerOp = { return obj; }, - fromPartial, I>>(object: I): InnerOp { + fromPartial(object: Partial): InnerOp { const message = createBaseInnerOp(); message.hash = object.hash ?? 0; message.prefix = object.prefix ?? new Uint8Array(); @@ -940,7 +939,7 @@ export const ProofSpec = { return obj; }, - fromPartial, I>>(object: I): ProofSpec { + fromPartial(object: Partial): ProofSpec { const message = createBaseProofSpec(); message.leafSpec = object.leafSpec !== undefined && object.leafSpec !== null @@ -1082,7 +1081,7 @@ export const InnerSpec = { return obj; }, - fromPartial, I>>(object: I): InnerSpec { + fromPartial(object: Partial): InnerSpec { const message = createBaseInnerSpec(); message.childOrder = object.childOrder?.map((e) => e) || []; message.childSize = object.childSize ?? 0; @@ -1149,7 +1148,7 @@ export const BatchProof = { return obj; }, - fromPartial, I>>(object: I): BatchProof { + fromPartial(object: Partial): BatchProof { const message = createBaseBatchProof(); message.entries = object.entries?.map((e) => BatchEntry.fromPartial(e)) || []; return message; @@ -1218,7 +1217,7 @@ export const BatchEntry = { return obj; }, - fromPartial, I>>(object: I): BatchEntry { + fromPartial(object: Partial): BatchEntry { const message = createBaseBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1307,7 +1306,7 @@ export const CompressedBatchProof = { return obj; }, - fromPartial, I>>(object: I): CompressedBatchProof { + fromPartial(object: Partial): CompressedBatchProof { const message = createBaseCompressedBatchProof(); message.entries = object.entries?.map((e) => CompressedBatchEntry.fromPartial(e)) || []; message.lookupInners = object.lookupInners?.map((e) => InnerOp.fromPartial(e)) || []; @@ -1377,7 +1376,7 @@ export const CompressedBatchEntry = { return obj; }, - fromPartial, I>>(object: I): CompressedBatchEntry { + fromPartial(object: Partial): CompressedBatchEntry { const message = createBaseCompressedBatchEntry(); message.exist = object.exist !== undefined && object.exist !== null @@ -1493,9 +1492,7 @@ export const CompressedExistenceProof = { return obj; }, - fromPartial, I>>( - object: I, - ): CompressedExistenceProof { + fromPartial(object: Partial): CompressedExistenceProof { const message = createBaseCompressedExistenceProof(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -1580,9 +1577,7 @@ export const CompressedNonExistenceProof = { return obj; }, - fromPartial, I>>( - object: I, - ): CompressedNonExistenceProof { + fromPartial(object: Partial): CompressedNonExistenceProof { const message = createBaseCompressedNonExistenceProof(); message.key = object.key ?? new Uint8Array(); message.left = diff --git a/src/cosmos/auth/v1beta1/auth.ts b/src/cosmos/auth/v1beta1/auth.ts index 1cddc1a2..1942d41b 100644 --- a/src/cosmos/auth/v1beta1/auth.ts +++ b/src/cosmos/auth/v1beta1/auth.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * BaseAccount defines a base account type. It contains all the necessary fields @@ -116,7 +115,7 @@ export const BaseAccount = { return obj; }, - fromPartial, I>>(object: I): BaseAccount { + fromPartial(object: Partial): BaseAccount { const message = createBaseBaseAccount(); message.address = object.address ?? ""; message.pubKey = @@ -211,7 +210,7 @@ export const ModuleAccount = { return obj; }, - fromPartial, I>>(object: I): ModuleAccount { + fromPartial(object: Partial): ModuleAccount { const message = createBaseModuleAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -328,7 +327,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null diff --git a/src/cosmos/auth/v1beta1/genesis.ts b/src/cosmos/auth/v1beta1/genesis.ts index 113ff256..f7b947d6 100644 --- a/src/cosmos/auth/v1beta1/genesis.ts +++ b/src/cosmos/auth/v1beta1/genesis.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./auth"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** GenesisState defines the auth module's genesis state. */ @@ -81,7 +80,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/auth/v1beta1/query.ts b/src/cosmos/auth/v1beta1/query.ts index 3cc46570..1449b0cd 100644 --- a/src/cosmos/auth/v1beta1/query.ts +++ b/src/cosmos/auth/v1beta1/query.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import { Params } from "./auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.auth.v1beta1"; /** * QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -101,7 +100,7 @@ export const QueryAccountsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAccountsRequest { + fromPartial(object: Partial): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -178,7 +177,7 @@ export const QueryAccountsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAccountsResponse { + fromPartial(object: Partial): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); message.accounts = object.accounts?.map((e) => Any.fromPartial(e)) || []; message.pagination = @@ -238,7 +237,7 @@ export const QueryAccountRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAccountRequest { + fromPartial(object: Partial): QueryAccountRequest { const message = createBaseQueryAccountRequest(); message.address = object.address ?? ""; return message; @@ -295,7 +294,7 @@ export const QueryAccountResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAccountResponse { + fromPartial(object: Partial): QueryAccountResponse { const message = createBaseQueryAccountResponse(); message.account = object.account !== undefined && object.account !== null ? Any.fromPartial(object.account) : undefined; @@ -339,7 +338,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -394,7 +393,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/authz/v1beta1/authz.ts b/src/cosmos/authz/v1beta1/authz.ts index 1975e211..7b0ba32b 100644 --- a/src/cosmos/authz/v1beta1/authz.ts +++ b/src/cosmos/authz/v1beta1/authz.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * GenericAuthorization gives the grantee unrestricted permissions to execute @@ -86,7 +85,7 @@ export const GenericAuthorization = { return obj; }, - fromPartial, I>>(object: I): GenericAuthorization { + fromPartial(object: Partial): GenericAuthorization { const message = createBaseGenericAuthorization(); message.msg = object.msg ?? ""; return message; @@ -154,7 +153,7 @@ export const Grant = { return obj; }, - fromPartial, I>>(object: I): Grant { + fromPartial(object: Partial): Grant { const message = createBaseGrant(); message.authorization = object.authorization !== undefined && object.authorization !== null @@ -251,7 +250,7 @@ export const GrantAuthorization = { return obj; }, - fromPartial, I>>(object: I): GrantAuthorization { + fromPartial(object: Partial): GrantAuthorization { const message = createBaseGrantAuthorization(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/authz/v1beta1/genesis.ts b/src/cosmos/authz/v1beta1/genesis.ts index 42ccae5a..7e0990bd 100644 --- a/src/cosmos/authz/v1beta1/genesis.ts +++ b/src/cosmos/authz/v1beta1/genesis.ts @@ -1,8 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import { GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** GenesisState defines the authz module's genesis state. */ @@ -67,7 +65,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.authorization = object.authorization?.map((e) => GrantAuthorization.fromPartial(e)) || []; return message; diff --git a/src/cosmos/authz/v1beta1/query.ts b/src/cosmos/authz/v1beta1/query.ts index 828da480..52463c5a 100644 --- a/src/cosmos/authz/v1beta1/query.ts +++ b/src/cosmos/authz/v1beta1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ @@ -144,7 +143,7 @@ export const QueryGrantsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryGrantsRequest { + fromPartial(object: Partial): QueryGrantsRequest { const message = createBaseQueryGrantsRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -224,7 +223,7 @@ export const QueryGrantsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryGrantsResponse { + fromPartial(object: Partial): QueryGrantsResponse { const message = createBaseQueryGrantsResponse(); message.grants = object.grants?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -296,9 +295,7 @@ export const QueryGranterGrantsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranterGrantsRequest { + fromPartial(object: Partial): QueryGranterGrantsRequest { const message = createBaseQueryGranterGrantsRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -378,9 +375,7 @@ export const QueryGranterGrantsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranterGrantsResponse { + fromPartial(object: Partial): QueryGranterGrantsResponse { const message = createBaseQueryGranterGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = @@ -452,9 +447,7 @@ export const QueryGranteeGrantsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranteeGrantsRequest { + fromPartial(object: Partial): QueryGranteeGrantsRequest { const message = createBaseQueryGranteeGrantsRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -534,9 +527,7 @@ export const QueryGranteeGrantsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryGranteeGrantsResponse { + fromPartial(object: Partial): QueryGranteeGrantsResponse { const message = createBaseQueryGranteeGrantsResponse(); message.grants = object.grants?.map((e) => GrantAuthorization.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/authz/v1beta1/tx.ts b/src/cosmos/authz/v1beta1/tx.ts index 725c3867..ae29bd9c 100644 --- a/src/cosmos/authz/v1beta1/tx.ts +++ b/src/cosmos/authz/v1beta1/tx.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Grant } from "./authz"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.authz.v1beta1"; /** * MsgGrant is a request type for Grant method. It declares authorization to the grantee @@ -124,7 +123,7 @@ export const MsgGrant = { return obj; }, - fromPartial, I>>(object: I): MsgGrant { + fromPartial(object: Partial): MsgGrant { const message = createBaseMsgGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -189,7 +188,7 @@ export const MsgExecResponse = { return obj; }, - fromPartial, I>>(object: I): MsgExecResponse { + fromPartial(object: Partial): MsgExecResponse { const message = createBaseMsgExecResponse(); message.results = object.results?.map((e) => e) || []; return message; @@ -262,7 +261,7 @@ export const MsgExec = { return obj; }, - fromPartial, I>>(object: I): MsgExec { + fromPartial(object: Partial): MsgExec { const message = createBaseMsgExec(); message.grantee = object.grantee ?? ""; message.msgs = object.msgs?.map((e) => Any.fromPartial(e)) || []; @@ -306,7 +305,7 @@ export const MsgGrantResponse = { return obj; }, - fromPartial, I>>(_: I): MsgGrantResponse { + fromPartial(_: Partial): MsgGrantResponse { const message = createBaseMsgGrantResponse(); return message; }, @@ -383,7 +382,7 @@ export const MsgRevoke = { return obj; }, - fromPartial, I>>(object: I): MsgRevoke { + fromPartial(object: Partial): MsgRevoke { const message = createBaseMsgRevoke(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -428,7 +427,7 @@ export const MsgRevokeResponse = { return obj; }, - fromPartial, I>>(_: I): MsgRevokeResponse { + fromPartial(_: Partial): MsgRevokeResponse { const message = createBaseMsgRevokeResponse(); return message; }, diff --git a/src/cosmos/bank/v1beta1/authz.ts b/src/cosmos/bank/v1beta1/authz.ts index b61ae105..59f49a10 100644 --- a/src/cosmos/bank/v1beta1/authz.ts +++ b/src/cosmos/bank/v1beta1/authz.ts @@ -1,8 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** * SendAuthorization allows the grantee to spend up to spend_limit coins from @@ -72,7 +70,7 @@ export const SendAuthorization = { return obj; }, - fromPartial, I>>(object: I): SendAuthorization { + fromPartial(object: Partial): SendAuthorization { const message = createBaseSendAuthorization(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/bank/v1beta1/bank.ts b/src/cosmos/bank/v1beta1/bank.ts index 278208a0..7595f6b1 100644 --- a/src/cosmos/bank/v1beta1/bank.ts +++ b/src/cosmos/bank/v1beta1/bank.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** Params defines the parameters for the bank module. */ @@ -167,7 +166,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled?.map((e) => SendEnabled.fromPartial(e)) || []; message.defaultSendEnabled = object.defaultSendEnabled ?? false; @@ -235,7 +234,7 @@ export const SendEnabled = { return obj; }, - fromPartial, I>>(object: I): SendEnabled { + fromPartial(object: Partial): SendEnabled { const message = createBaseSendEnabled(); message.denom = object.denom ?? ""; message.enabled = object.enabled ?? false; @@ -309,7 +308,7 @@ export const Input = { return obj; }, - fromPartial, I>>(object: I): Input { + fromPartial(object: Partial): Input { const message = createBaseInput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -383,7 +382,7 @@ export const Output = { return obj; }, - fromPartial, I>>(object: I): Output { + fromPartial(object: Partial): Output { const message = createBaseOutput(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; @@ -446,7 +445,7 @@ export const Supply = { return obj; }, - fromPartial, I>>(object: I): Supply { + fromPartial(object: Partial): Supply { const message = createBaseSupply(); message.total = object.total?.map((e) => Coin.fromPartial(e)) || []; return message; @@ -530,7 +529,7 @@ export const DenomUnit = { return obj; }, - fromPartial, I>>(object: I): DenomUnit { + fromPartial(object: Partial): DenomUnit { const message = createBaseDenomUnit(); message.denom = object.denom ?? ""; message.exponent = object.exponent ?? 0; @@ -651,7 +650,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: Partial): Metadata { const message = createBaseMetadata(); message.description = object.description ?? ""; message.denomUnits = object.denomUnits?.map((e) => DenomUnit.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/genesis.ts b/src/cosmos/bank/v1beta1/genesis.ts index ceec77b2..b6a824e5 100644 --- a/src/cosmos/bank/v1beta1/genesis.ts +++ b/src/cosmos/bank/v1beta1/genesis.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Params, Metadata } from "./bank"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** GenesisState defines the bank module's genesis state. */ @@ -136,7 +135,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -213,7 +212,7 @@ export const Balance = { return obj; }, - fromPartial, I>>(object: I): Balance { + fromPartial(object: Partial): Balance { const message = createBaseBalance(); message.address = object.address ?? ""; message.coins = object.coins?.map((e) => Coin.fromPartial(e)) || []; diff --git a/src/cosmos/bank/v1beta1/query.ts b/src/cosmos/bank/v1beta1/query.ts index 5e01d985..eace54a8 100644 --- a/src/cosmos/bank/v1beta1/query.ts +++ b/src/cosmos/bank/v1beta1/query.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Coin } from "../../base/v1beta1/coin"; import { Params, Metadata } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** QueryBalanceRequest is the request type for the Query/Balance RPC method. */ @@ -209,7 +208,7 @@ export const QueryBalanceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryBalanceRequest { + fromPartial(object: Partial): QueryBalanceRequest { const message = createBaseQueryBalanceRequest(); message.address = object.address ?? ""; message.denom = object.denom ?? ""; @@ -267,7 +266,7 @@ export const QueryBalanceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryBalanceResponse { + fromPartial(object: Partial): QueryBalanceResponse { const message = createBaseQueryBalanceResponse(); message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; @@ -336,7 +335,7 @@ export const QueryAllBalancesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllBalancesRequest { + fromPartial(object: Partial): QueryAllBalancesRequest { const message = createBaseQueryAllBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -414,9 +413,7 @@ export const QueryAllBalancesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllBalancesResponse { + fromPartial(object: Partial): QueryAllBalancesResponse { const message = createBaseQueryAllBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -488,9 +485,7 @@ export const QuerySpendableBalancesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySpendableBalancesRequest { + fromPartial(object: Partial): QuerySpendableBalancesRequest { const message = createBaseQuerySpendableBalancesRequest(); message.address = object.address ?? ""; message.pagination = @@ -568,9 +563,7 @@ export const QuerySpendableBalancesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySpendableBalancesResponse { + fromPartial(object: Partial): QuerySpendableBalancesResponse { const message = createBaseQuerySpendableBalancesResponse(); message.balances = object.balances?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -631,7 +624,7 @@ export const QueryTotalSupplyRequest = { return obj; }, - fromPartial, I>>(object: I): QueryTotalSupplyRequest { + fromPartial(object: Partial): QueryTotalSupplyRequest { const message = createBaseQueryTotalSupplyRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -708,9 +701,7 @@ export const QueryTotalSupplyResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryTotalSupplyResponse { + fromPartial(object: Partial): QueryTotalSupplyResponse { const message = createBaseQueryTotalSupplyResponse(); message.supply = object.supply?.map((e) => Coin.fromPartial(e)) || []; message.pagination = @@ -770,7 +761,7 @@ export const QuerySupplyOfRequest = { return obj; }, - fromPartial, I>>(object: I): QuerySupplyOfRequest { + fromPartial(object: Partial): QuerySupplyOfRequest { const message = createBaseQuerySupplyOfRequest(); message.denom = object.denom ?? ""; return message; @@ -826,7 +817,7 @@ export const QuerySupplyOfResponse = { return obj; }, - fromPartial, I>>(object: I): QuerySupplyOfResponse { + fromPartial(object: Partial): QuerySupplyOfResponse { const message = createBaseQuerySupplyOfResponse(); message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; @@ -870,7 +861,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -925,7 +916,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -983,9 +974,7 @@ export const QueryDenomsMetadataRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomsMetadataRequest { + fromPartial(object: Partial): QueryDenomsMetadataRequest { const message = createBaseQueryDenomsMetadataRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1064,9 +1053,7 @@ export const QueryDenomsMetadataResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomsMetadataResponse { + fromPartial(object: Partial): QueryDenomsMetadataResponse { const message = createBaseQueryDenomsMetadataResponse(); message.metadatas = object.metadatas?.map((e) => Metadata.fromPartial(e)) || []; message.pagination = @@ -1126,9 +1113,7 @@ export const QueryDenomMetadataRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomMetadataRequest { + fromPartial(object: Partial): QueryDenomMetadataRequest { const message = createBaseQueryDenomMetadataRequest(); message.denom = object.denom ?? ""; return message; @@ -1185,9 +1170,7 @@ export const QueryDenomMetadataResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomMetadataResponse { + fromPartial(object: Partial): QueryDenomMetadataResponse { const message = createBaseQueryDenomMetadataResponse(); message.metadata = object.metadata !== undefined && object.metadata !== null diff --git a/src/cosmos/bank/v1beta1/tx.ts b/src/cosmos/bank/v1beta1/tx.ts index 4beb0925..31baf4a3 100644 --- a/src/cosmos/bank/v1beta1/tx.ts +++ b/src/cosmos/bank/v1beta1/tx.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Input, Output } from "./bank"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.bank.v1beta1"; /** MsgSend represents a message to send coins from one account to another. */ @@ -102,7 +101,7 @@ export const MsgSend = { return obj; }, - fromPartial, I>>(object: I): MsgSend { + fromPartial(object: Partial): MsgSend { const message = createBaseMsgSend(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -147,7 +146,7 @@ export const MsgSendResponse = { return obj; }, - fromPartial, I>>(_: I): MsgSendResponse { + fromPartial(_: Partial): MsgSendResponse { const message = createBaseMsgSendResponse(); return message; }, @@ -224,7 +223,7 @@ export const MsgMultiSend = { return obj; }, - fromPartial, I>>(object: I): MsgMultiSend { + fromPartial(object: Partial): MsgMultiSend { const message = createBaseMsgMultiSend(); message.inputs = object.inputs?.map((e) => Input.fromPartial(e)) || []; message.outputs = object.outputs?.map((e) => Output.fromPartial(e)) || []; @@ -268,7 +267,7 @@ export const MsgMultiSendResponse = { return obj; }, - fromPartial, I>>(_: I): MsgMultiSendResponse { + fromPartial(_: Partial): MsgMultiSendResponse { const message = createBaseMsgMultiSendResponse(); return message; }, diff --git a/src/cosmos/base/abci/v1beta1/abci.ts b/src/cosmos/base/abci/v1beta1/abci.ts index 9ac05eba..f336945d 100644 --- a/src/cosmos/base/abci/v1beta1/abci.ts +++ b/src/cosmos/base/abci/v1beta1/abci.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Event } from "../../../../tendermint/abci/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.abci.v1beta1"; /** * TxResponse defines a structure containing relevant tx data and metadata. The @@ -362,7 +361,7 @@ export const TxResponse = { return obj; }, - fromPartial, I>>(object: I): TxResponse { + fromPartial(object: Partial): TxResponse { const message = createBaseTxResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -463,7 +462,7 @@ export const ABCIMessageLog = { return obj; }, - fromPartial, I>>(object: I): ABCIMessageLog { + fromPartial(object: Partial): ABCIMessageLog { const message = createBaseABCIMessageLog(); message.msgIndex = object.msgIndex ?? 0; message.log = object.log ?? ""; @@ -540,7 +539,7 @@ export const StringEvent = { return obj; }, - fromPartial, I>>(object: I): StringEvent { + fromPartial(object: Partial): StringEvent { const message = createBaseStringEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; @@ -608,7 +607,7 @@ export const Attribute = { return obj; }, - fromPartial, I>>(object: I): Attribute { + fromPartial(object: Partial): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -676,7 +675,7 @@ export const GasInfo = { return obj; }, - fromPartial, I>>(object: I): GasInfo { + fromPartial(object: Partial): GasInfo { const message = createBaseGasInfo(); message.gasWanted = object.gasWanted !== undefined && object.gasWanted !== null @@ -766,7 +765,7 @@ export const Result = { return obj; }, - fromPartial, I>>(object: I): Result { + fromPartial(object: Partial): Result { const message = createBaseResult(); message.data = object.data ?? new Uint8Array(); message.log = object.log ?? ""; @@ -836,7 +835,7 @@ export const SimulationResponse = { return obj; }, - fromPartial, I>>(object: I): SimulationResponse { + fromPartial(object: Partial): SimulationResponse { const message = createBaseSimulationResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -909,7 +908,7 @@ export const MsgData = { return obj; }, - fromPartial, I>>(object: I): MsgData { + fromPartial(object: Partial): MsgData { const message = createBaseMsgData(); message.msgType = object.msgType ?? ""; message.data = object.data ?? new Uint8Array(); @@ -972,7 +971,7 @@ export const TxMsgData = { return obj; }, - fromPartial, I>>(object: I): TxMsgData { + fromPartial(object: Partial): TxMsgData { const message = createBaseTxMsgData(); message.data = object.data?.map((e) => MsgData.fromPartial(e)) || []; return message; @@ -1089,7 +1088,7 @@ export const SearchTxsResult = { return obj; }, - fromPartial, I>>(object: I): SearchTxsResult { + fromPartial(object: Partial): SearchTxsResult { const message = createBaseSearchTxsResult(); message.totalCount = object.totalCount !== undefined && object.totalCount !== null diff --git a/src/cosmos/base/kv/v1beta1/kv.ts b/src/cosmos/base/kv/v1beta1/kv.ts index 7751aa40..a7f3b064 100644 --- a/src/cosmos/base/kv/v1beta1/kv.ts +++ b/src/cosmos/base/kv/v1beta1/kv.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.kv.v1beta1"; /** Pairs defines a repeated slice of Pair objects. */ @@ -70,7 +69,7 @@ export const Pairs = { return obj; }, - fromPartial, I>>(object: I): Pairs { + fromPartial(object: Partial): Pairs { const message = createBasePairs(); message.pairs = object.pairs?.map((e) => Pair.fromPartial(e)) || []; return message; @@ -139,7 +138,7 @@ export const Pair = { return obj; }, - fromPartial, I>>(object: I): Pair { + fromPartial(object: Partial): Pair { const message = createBasePair(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/query/v1beta1/pagination.ts b/src/cosmos/base/query/v1beta1/pagination.ts index d819f887..b245db88 100644 --- a/src/cosmos/base/query/v1beta1/pagination.ts +++ b/src/cosmos/base/query/v1beta1/pagination.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.query.v1beta1"; /** * PageRequest is to be embedded in gRPC request messages for efficient @@ -167,7 +166,7 @@ export const PageRequest = { return obj; }, - fromPartial, I>>(object: I): PageRequest { + fromPartial(object: Partial): PageRequest { const message = createBasePageRequest(); message.key = object.key ?? new Uint8Array(); message.offset = @@ -241,7 +240,7 @@ export const PageResponse = { return obj; }, - fromPartial, I>>(object: I): PageResponse { + fromPartial(object: Partial): PageResponse { const message = createBasePageResponse(); message.nextKey = object.nextKey ?? new Uint8Array(); message.total = diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 14ea6f61..8d2d8a61 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ @@ -66,7 +65,7 @@ export const ListAllInterfacesRequest = { return obj; }, - fromPartial, I>>(_: I): ListAllInterfacesRequest { + fromPartial(_: Partial): ListAllInterfacesRequest { const message = createBaseListAllInterfacesRequest(); return message; }, @@ -129,9 +128,7 @@ export const ListAllInterfacesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): ListAllInterfacesResponse { + fromPartial(object: Partial): ListAllInterfacesResponse { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interfaceNames?.map((e) => e) || []; return message; @@ -187,9 +184,7 @@ export const ListImplementationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): ListImplementationsRequest { + fromPartial(object: Partial): ListImplementationsRequest { const message = createBaseListImplementationsRequest(); message.interfaceName = object.interfaceName ?? ""; return message; @@ -253,9 +248,7 @@ export const ListImplementationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): ListImplementationsResponse { + fromPartial(object: Partial): ListImplementationsResponse { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementationMessageNames?.map((e) => e) || []; return message; diff --git a/src/cosmos/base/snapshots/v1beta1/snapshot.ts b/src/cosmos/base/snapshots/v1beta1/snapshot.ts index 1493f525..c1701bb0 100644 --- a/src/cosmos/base/snapshots/v1beta1/snapshot.ts +++ b/src/cosmos/base/snapshots/v1beta1/snapshot.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.snapshots.v1beta1"; /** Snapshot contains Tendermint state sync snapshot info. */ @@ -150,7 +149,7 @@ export const Snapshot = { return obj; }, - fromPartial, I>>(object: I): Snapshot { + fromPartial(object: Partial): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -224,7 +223,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: Partial): Metadata { const message = createBaseMetadata(); message.chunkHashes = object.chunkHashes?.map((e) => e) || []; return message; @@ -321,7 +320,7 @@ export const SnapshotItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotItem { + fromPartial(object: Partial): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -392,7 +391,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotStoreItem { + fromPartial(object: Partial): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -483,7 +482,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotIAVLItem { + fromPartial(object: Partial): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -554,7 +553,7 @@ export const SnapshotExtensionMeta = { return obj; }, - fromPartial, I>>(object: I): SnapshotExtensionMeta { + fromPartial(object: Partial): SnapshotExtensionMeta { const message = createBaseSnapshotExtensionMeta(); message.name = object.name ?? ""; message.format = object.format ?? 0; @@ -612,9 +611,7 @@ export const SnapshotExtensionPayload = { return obj; }, - fromPartial, I>>( - object: I, - ): SnapshotExtensionPayload { + fromPartial(object: Partial): SnapshotExtensionPayload { const message = createBaseSnapshotExtensionPayload(); message.payload = object.payload ?? new Uint8Array(); return message; diff --git a/src/cosmos/base/store/v1beta1/commit_info.ts b/src/cosmos/base/store/v1beta1/commit_info.ts index 4e0565d9..9304b25e 100644 --- a/src/cosmos/base/store/v1beta1/commit_info.ts +++ b/src/cosmos/base/store/v1beta1/commit_info.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * CommitInfo defines commit information used by the multi-store when committing @@ -99,7 +98,7 @@ export const CommitInfo = { return obj; }, - fromPartial, I>>(object: I): CommitInfo { + fromPartial(object: Partial): CommitInfo { const message = createBaseCommitInfo(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; @@ -169,7 +168,7 @@ export const StoreInfo = { return obj; }, - fromPartial, I>>(object: I): StoreInfo { + fromPartial(object: Partial): StoreInfo { const message = createBaseStoreInfo(); message.name = object.name ?? ""; message.commitId = @@ -241,7 +240,7 @@ export const CommitID = { return obj; }, - fromPartial, I>>(object: I): CommitID { + fromPartial(object: Partial): CommitID { const message = createBaseCommitID(); message.version = object.version !== undefined && object.version !== null ? Long.fromValue(object.version) : Long.ZERO; diff --git a/src/cosmos/base/store/v1beta1/listening.ts b/src/cosmos/base/store/v1beta1/listening.ts index fb494237..0deffcac 100644 --- a/src/cosmos/base/store/v1beta1/listening.ts +++ b/src/cosmos/base/store/v1beta1/listening.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** * StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) @@ -105,7 +104,7 @@ export const StoreKVPair = { return obj; }, - fromPartial, I>>(object: I): StoreKVPair { + fromPartial(object: Partial): StoreKVPair { const message = createBaseStoreKVPair(); message.storeKey = object.storeKey ?? ""; message.delete = object.delete ?? false; diff --git a/src/cosmos/base/store/v1beta1/snapshot.ts b/src/cosmos/base/store/v1beta1/snapshot.ts index 5c32497b..dca251de 100644 --- a/src/cosmos/base/store/v1beta1/snapshot.ts +++ b/src/cosmos/base/store/v1beta1/snapshot.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.base.store.v1beta1"; /** SnapshotItem is an item contained in a rootmulti.Store snapshot. */ @@ -85,7 +84,7 @@ export const SnapshotItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotItem { + fromPartial(object: Partial): SnapshotItem { const message = createBaseSnapshotItem(); message.store = object.store !== undefined && object.store !== null @@ -148,7 +147,7 @@ export const SnapshotStoreItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotStoreItem { + fromPartial(object: Partial): SnapshotStoreItem { const message = createBaseSnapshotStoreItem(); message.name = object.name ?? ""; return message; @@ -239,7 +238,7 @@ export const SnapshotIAVLItem = { return obj; }, - fromPartial, I>>(object: I): SnapshotIAVLItem { + fromPartial(object: Partial): SnapshotIAVLItem { const message = createBaseSnapshotIAVLItem(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 1eefb189..204c2f20 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; @@ -6,7 +5,7 @@ import { BlockID } from "../../../../tendermint/types/types"; import { Block } from "../../../../tendermint/types/block"; import { DefaultNodeInfo } from "../../../../tendermint/p2p/types"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Rpc } from "../../../../helpers"; +import { Long, isSet, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.tendermint.v1beta1"; /** GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. */ @@ -173,7 +172,7 @@ export const GetValidatorSetByHeightRequest = { return obj; }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightRequest { + fromPartial(object: Partial): GetValidatorSetByHeightRequest { const message = createBaseGetValidatorSetByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -265,7 +264,7 @@ export const GetValidatorSetByHeightResponse = { return obj; }, - fromPartial(object: DeepPartial): GetValidatorSetByHeightResponse { + fromPartial(object: Partial): GetValidatorSetByHeightResponse { const message = createBaseGetValidatorSetByHeightResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -330,7 +329,7 @@ export const GetLatestValidatorSetRequest = { return obj; }, - fromPartial(object: DeepPartial): GetLatestValidatorSetRequest { + fromPartial(object: Partial): GetLatestValidatorSetRequest { const message = createBaseGetLatestValidatorSetRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -420,7 +419,7 @@ export const GetLatestValidatorSetResponse = { return obj; }, - fromPartial(object: DeepPartial): GetLatestValidatorSetResponse { + fromPartial(object: Partial): GetLatestValidatorSetResponse { const message = createBaseGetLatestValidatorSetResponse(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -518,7 +517,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial(object: Partial): Validator { const message = createBaseValidator(); message.address = object.address ?? ""; message.pubKey = @@ -584,7 +583,7 @@ export const GetBlockByHeightRequest = { return obj; }, - fromPartial(object: DeepPartial): GetBlockByHeightRequest { + fromPartial(object: Partial): GetBlockByHeightRequest { const message = createBaseGetBlockByHeightRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -653,7 +652,7 @@ export const GetBlockByHeightResponse = { return obj; }, - fromPartial(object: DeepPartial): GetBlockByHeightResponse { + fromPartial(object: Partial): GetBlockByHeightResponse { const message = createBaseGetBlockByHeightResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -701,7 +700,7 @@ export const GetLatestBlockRequest = { return obj; }, - fromPartial(_: DeepPartial): GetLatestBlockRequest { + fromPartial(_: Partial): GetLatestBlockRequest { const message = createBaseGetLatestBlockRequest(); return message; }, @@ -768,7 +767,7 @@ export const GetLatestBlockResponse = { return obj; }, - fromPartial(object: DeepPartial): GetLatestBlockResponse { + fromPartial(object: Partial): GetLatestBlockResponse { const message = createBaseGetLatestBlockResponse(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -816,7 +815,7 @@ export const GetSyncingRequest = { return obj; }, - fromPartial(_: DeepPartial): GetSyncingRequest { + fromPartial(_: Partial): GetSyncingRequest { const message = createBaseGetSyncingRequest(); return message; }, @@ -871,7 +870,7 @@ export const GetSyncingResponse = { return obj; }, - fromPartial(object: DeepPartial): GetSyncingResponse { + fromPartial(object: Partial): GetSyncingResponse { const message = createBaseGetSyncingResponse(); message.syncing = object.syncing ?? false; return message; @@ -914,7 +913,7 @@ export const GetNodeInfoRequest = { return obj; }, - fromPartial(_: DeepPartial): GetNodeInfoRequest { + fromPartial(_: Partial): GetNodeInfoRequest { const message = createBaseGetNodeInfoRequest(); return message; }, @@ -990,7 +989,7 @@ export const GetNodeInfoResponse = { return obj; }, - fromPartial(object: DeepPartial): GetNodeInfoResponse { + fromPartial(object: Partial): GetNodeInfoResponse { const message = createBaseGetNodeInfoResponse(); message.defaultNodeInfo = object.defaultNodeInfo !== undefined && object.defaultNodeInfo !== null @@ -1136,7 +1135,7 @@ export const VersionInfo = { return obj; }, - fromPartial(object: DeepPartial): VersionInfo { + fromPartial(object: Partial): VersionInfo { const message = createBaseVersionInfo(); message.name = object.name ?? ""; message.appName = object.appName ?? ""; @@ -1221,7 +1220,7 @@ export const Module = { return obj; }, - fromPartial(object: DeepPartial): Module { + fromPartial(object: Partial): Module { const message = createBaseModule(); message.path = object.path ?? ""; message.version = object.version ?? ""; diff --git a/src/cosmos/base/v1beta1/coin.ts b/src/cosmos/base/v1beta1/coin.ts index c111ef98..ebe5a65d 100644 --- a/src/cosmos/base/v1beta1/coin.ts +++ b/src/cosmos/base/v1beta1/coin.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.base.v1beta1"; /** * Coin defines a token with a denomination and an amount. @@ -96,7 +95,7 @@ export const Coin = { return obj; }, - fromPartial, I>>(object: I): Coin { + fromPartial(object: Partial): Coin { const message = createBaseCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -164,7 +163,7 @@ export const DecCoin = { return obj; }, - fromPartial, I>>(object: I): DecCoin { + fromPartial(object: Partial): DecCoin { const message = createBaseDecCoin(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; @@ -221,7 +220,7 @@ export const IntProto = { return obj; }, - fromPartial, I>>(object: I): IntProto { + fromPartial(object: Partial): IntProto { const message = createBaseIntProto(); message.int = object.int ?? ""; return message; @@ -277,7 +276,7 @@ export const DecProto = { return obj; }, - fromPartial, I>>(object: I): DecProto { + fromPartial(object: Partial): DecProto { const message = createBaseDecProto(); message.dec = object.dec ?? ""; return message; diff --git a/src/cosmos/capability/v1beta1/capability.ts b/src/cosmos/capability/v1beta1/capability.ts index df39bfe3..e8b87140 100644 --- a/src/cosmos/capability/v1beta1/capability.ts +++ b/src/cosmos/capability/v1beta1/capability.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** * Capability defines an implementation of an object capability. The index @@ -78,7 +77,7 @@ export const Capability = { return obj; }, - fromPartial, I>>(object: I): Capability { + fromPartial(object: Partial): Capability { const message = createBaseCapability(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -146,7 +145,7 @@ export const Owner = { return obj; }, - fromPartial, I>>(object: I): Owner { + fromPartial(object: Partial): Owner { const message = createBaseOwner(); message.module = object.module ?? ""; message.name = object.name ?? ""; @@ -209,7 +208,7 @@ export const CapabilityOwners = { return obj; }, - fromPartial, I>>(object: I): CapabilityOwners { + fromPartial(object: Partial): CapabilityOwners { const message = createBaseCapabilityOwners(); message.owners = object.owners?.map((e) => Owner.fromPartial(e)) || []; return message; diff --git a/src/cosmos/capability/v1beta1/genesis.ts b/src/cosmos/capability/v1beta1/genesis.ts index 38f61d28..ad2fe309 100644 --- a/src/cosmos/capability/v1beta1/genesis.ts +++ b/src/cosmos/capability/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { CapabilityOwners } from "./capability"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet } from "../../../helpers"; export const protobufPackage = "cosmos.capability.v1beta1"; /** GenesisOwners defines the capability owners with their corresponding index. */ @@ -87,7 +86,7 @@ export const GenesisOwners = { return obj; }, - fromPartial, I>>(object: I): GenesisOwners { + fromPartial(object: Partial): GenesisOwners { const message = createBaseGenesisOwners(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; @@ -165,7 +164,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.UZERO; diff --git a/src/cosmos/crisis/v1beta1/genesis.ts b/src/cosmos/crisis/v1beta1/genesis.ts index 3fb0e3b4..1d786428 100644 --- a/src/cosmos/crisis/v1beta1/genesis.ts +++ b/src/cosmos/crisis/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** GenesisState defines the crisis module's genesis state. */ @@ -64,7 +63,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.constantFee = object.constantFee !== undefined && object.constantFee !== null diff --git a/src/cosmos/crisis/v1beta1/tx.ts b/src/cosmos/crisis/v1beta1/tx.ts index a35456b7..04821017 100644 --- a/src/cosmos/crisis/v1beta1/tx.ts +++ b/src/cosmos/crisis/v1beta1/tx.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.crisis.v1beta1"; /** MsgVerifyInvariant represents a message to verify a particular invariance. */ @@ -85,7 +84,7 @@ export const MsgVerifyInvariant = { return obj; }, - fromPartial, I>>(object: I): MsgVerifyInvariant { + fromPartial(object: Partial): MsgVerifyInvariant { const message = createBaseMsgVerifyInvariant(); message.sender = object.sender ?? ""; message.invariantModuleName = object.invariantModuleName ?? ""; @@ -130,7 +129,7 @@ export const MsgVerifyInvariantResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVerifyInvariantResponse { + fromPartial(_: Partial): MsgVerifyInvariantResponse { const message = createBaseMsgVerifyInvariantResponse(); return message; }, diff --git a/src/cosmos/crypto/ed25519/keys.ts b/src/cosmos/crypto/ed25519/keys.ts index 5d91bf77..44aa621b 100644 --- a/src/cosmos/crypto/ed25519/keys.ts +++ b/src/cosmos/crypto/ed25519/keys.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.ed25519"; /** * PubKey is an ed25519 public key for handling Tendermint keys in SDK. @@ -73,7 +72,7 @@ export const PubKey = { return obj; }, - fromPartial, I>>(object: I): PubKey { + fromPartial(object: Partial): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -130,7 +129,7 @@ export const PrivKey = { return obj; }, - fromPartial, I>>(object: I): PrivKey { + fromPartial(object: Partial): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/crypto/multisig/keys.ts b/src/cosmos/crypto/multisig/keys.ts index bf5fce2e..d6a7dc5d 100644 --- a/src/cosmos/crypto/multisig/keys.ts +++ b/src/cosmos/crypto/multisig/keys.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig"; /** * LegacyAminoPubKey specifies a public key type @@ -81,7 +80,7 @@ export const LegacyAminoPubKey = { return obj; }, - fromPartial, I>>(object: I): LegacyAminoPubKey { + fromPartial(object: Partial): LegacyAminoPubKey { const message = createBaseLegacyAminoPubKey(); message.threshold = object.threshold ?? 0; message.publicKeys = object.publicKeys?.map((e) => Any.fromPartial(e)) || []; diff --git a/src/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/cosmos/crypto/multisig/v1beta1/multisig.ts index 78cf2176..4372163c 100644 --- a/src/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial, Exact, isSet } from "../../../../helpers"; +import { bytesFromBase64, base64FromBytes, isSet } from "../../../../helpers"; export const protobufPackage = "cosmos.crypto.multisig.v1beta1"; /** * MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. @@ -81,7 +80,7 @@ export const MultiSignature = { return obj; }, - fromPartial, I>>(object: I): MultiSignature { + fromPartial(object: Partial): MultiSignature { const message = createBaseMultiSignature(); message.signatures = object.signatures?.map((e) => e) || []; return message; @@ -149,7 +148,7 @@ export const CompactBitArray = { return obj; }, - fromPartial, I>>(object: I): CompactBitArray { + fromPartial(object: Partial): CompactBitArray { const message = createBaseCompactBitArray(); message.extraBitsStored = object.extraBitsStored ?? 0; message.elems = object.elems ?? new Uint8Array(); diff --git a/src/cosmos/crypto/secp256k1/keys.ts b/src/cosmos/crypto/secp256k1/keys.ts index f09457fe..87d20c56 100644 --- a/src/cosmos/crypto/secp256k1/keys.ts +++ b/src/cosmos/crypto/secp256k1/keys.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmos.crypto.secp256k1"; /** * PubKey defines a secp256k1 public key @@ -70,7 +69,7 @@ export const PubKey = { return obj; }, - fromPartial, I>>(object: I): PubKey { + fromPartial(object: Partial): PubKey { const message = createBasePubKey(); message.key = object.key ?? new Uint8Array(); return message; @@ -127,7 +126,7 @@ export const PrivKey = { return obj; }, - fromPartial, I>>(object: I): PrivKey { + fromPartial(object: Partial): PrivKey { const message = createBasePrivKey(); message.key = object.key ?? new Uint8Array(); return message; diff --git a/src/cosmos/distribution/v1beta1/distribution.ts b/src/cosmos/distribution/v1beta1/distribution.ts index 462786d4..29e6c34e 100644 --- a/src/cosmos/distribution/v1beta1/distribution.ts +++ b/src/cosmos/distribution/v1beta1/distribution.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { DecCoin, Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** Params defines the set of params for the distribution module. */ @@ -208,7 +207,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.communityTax = object.communityTax ?? ""; message.baseProposerReward = object.baseProposerReward ?? ""; @@ -288,9 +287,7 @@ export const ValidatorHistoricalRewards = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorHistoricalRewards { + fromPartial(object: Partial): ValidatorHistoricalRewards { const message = createBaseValidatorHistoricalRewards(); message.cumulativeRewardRatio = object.cumulativeRewardRatio?.map((e) => DecCoin.fromPartial(e)) || []; message.referenceCount = object.referenceCount ?? 0; @@ -364,7 +361,7 @@ export const ValidatorCurrentRewards = { return obj; }, - fromPartial, I>>(object: I): ValidatorCurrentRewards { + fromPartial(object: Partial): ValidatorCurrentRewards { const message = createBaseValidatorCurrentRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; message.period = @@ -430,9 +427,7 @@ export const ValidatorAccumulatedCommission = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorAccumulatedCommission { + fromPartial(object: Partial): ValidatorAccumulatedCommission { const message = createBaseValidatorAccumulatedCommission(); message.commission = object.commission?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -494,9 +489,7 @@ export const ValidatorOutstandingRewards = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorOutstandingRewards { + fromPartial(object: Partial): ValidatorOutstandingRewards { const message = createBaseValidatorOutstandingRewards(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -564,7 +557,7 @@ export const ValidatorSlashEvent = { return obj; }, - fromPartial, I>>(object: I): ValidatorSlashEvent { + fromPartial(object: Partial): ValidatorSlashEvent { const message = createBaseValidatorSlashEvent(); message.validatorPeriod = object.validatorPeriod !== undefined && object.validatorPeriod !== null @@ -634,7 +627,7 @@ export const ValidatorSlashEvents = { return obj; }, - fromPartial, I>>(object: I): ValidatorSlashEvents { + fromPartial(object: Partial): ValidatorSlashEvents { const message = createBaseValidatorSlashEvents(); message.validatorSlashEvents = object.validatorSlashEvents?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; @@ -699,7 +692,7 @@ export const FeePool = { return obj; }, - fromPartial, I>>(object: I): FeePool { + fromPartial(object: Partial): FeePool { const message = createBaseFeePool(); message.communityPool = object.communityPool?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -794,9 +787,7 @@ export const CommunityPoolSpendProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): CommunityPoolSpendProposal { + fromPartial(object: Partial): CommunityPoolSpendProposal { const message = createBaseCommunityPoolSpendProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -878,7 +869,7 @@ export const DelegatorStartingInfo = { return obj; }, - fromPartial, I>>(object: I): DelegatorStartingInfo { + fromPartial(object: Partial): DelegatorStartingInfo { const message = createBaseDelegatorStartingInfo(); message.previousPeriod = object.previousPeriod !== undefined && object.previousPeriod !== null @@ -957,9 +948,7 @@ export const DelegationDelegatorReward = { return obj; }, - fromPartial, I>>( - object: I, - ): DelegationDelegatorReward { + fromPartial(object: Partial): DelegationDelegatorReward { const message = createBaseDelegationDelegatorReward(); message.validatorAddress = object.validatorAddress ?? ""; message.reward = object.reward?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1063,9 +1052,7 @@ export const CommunityPoolSpendProposalWithDeposit = { return obj; }, - fromPartial, I>>( - object: I, - ): CommunityPoolSpendProposalWithDeposit { + fromPartial(object: Partial): CommunityPoolSpendProposalWithDeposit { const message = createBaseCommunityPoolSpendProposalWithDeposit(); message.title = object.title ?? ""; message.description = object.description ?? ""; diff --git a/src/cosmos/distribution/v1beta1/genesis.ts b/src/cosmos/distribution/v1beta1/genesis.ts index 7d3e0d87..0a795bc9 100644 --- a/src/cosmos/distribution/v1beta1/genesis.ts +++ b/src/cosmos/distribution/v1beta1/genesis.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { DecCoin } from "../../base/v1beta1/coin"; import { @@ -11,7 +10,7 @@ import { FeePool, } from "./distribution"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, Long } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * DelegatorWithdrawInfo is the address for where distributions rewards are @@ -192,7 +191,7 @@ export const DelegatorWithdrawInfo = { return obj; }, - fromPartial, I>>(object: I): DelegatorWithdrawInfo { + fromPartial(object: Partial): DelegatorWithdrawInfo { const message = createBaseDelegatorWithdrawInfo(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -268,9 +267,7 @@ export const ValidatorOutstandingRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorOutstandingRewardsRecord { + fromPartial(object: Partial): ValidatorOutstandingRewardsRecord { const message = createBaseValidatorOutstandingRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.outstandingRewards = object.outstandingRewards?.map((e) => DecCoin.fromPartial(e)) || []; @@ -346,9 +343,7 @@ export const ValidatorAccumulatedCommissionRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorAccumulatedCommissionRecord { + fromPartial(object: Partial): ValidatorAccumulatedCommissionRecord { const message = createBaseValidatorAccumulatedCommissionRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.accumulated = @@ -431,9 +426,7 @@ export const ValidatorHistoricalRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorHistoricalRewardsRecord { + fromPartial(object: Partial): ValidatorHistoricalRewardsRecord { const message = createBaseValidatorHistoricalRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.period = @@ -507,9 +500,7 @@ export const ValidatorCurrentRewardsRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorCurrentRewardsRecord { + fromPartial(object: Partial): ValidatorCurrentRewardsRecord { const message = createBaseValidatorCurrentRewardsRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.rewards = @@ -596,9 +587,7 @@ export const DelegatorStartingInfoRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): DelegatorStartingInfoRecord { + fromPartial(object: Partial): DelegatorStartingInfoRecord { const message = createBaseDelegatorStartingInfoRecord(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -697,9 +686,7 @@ export const ValidatorSlashEventRecord = { return obj; }, - fromPartial, I>>( - object: I, - ): ValidatorSlashEventRecord { + fromPartial(object: Partial): ValidatorSlashEventRecord { const message = createBaseValidatorSlashEventRecord(); message.validatorAddress = object.validatorAddress ?? ""; message.height = @@ -934,7 +921,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/distribution/v1beta1/query.ts b/src/cosmos/distribution/v1beta1/query.ts index 22ebdaf9..6604d424 100644 --- a/src/cosmos/distribution/v1beta1/query.ts +++ b/src/cosmos/distribution/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { @@ -10,7 +9,7 @@ import { } from "./distribution"; import { DecCoin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Long, Rpc } from "../../../helpers"; +import { isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -216,7 +215,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -271,7 +270,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -331,8 +330,8 @@ export const QueryValidatorOutstandingRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryValidatorOutstandingRewardsRequest { const message = createBaseQueryValidatorOutstandingRewardsRequest(); message.validatorAddress = object.validatorAddress ?? ""; @@ -393,8 +392,8 @@ export const QueryValidatorOutstandingRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryValidatorOutstandingRewardsResponse { const message = createBaseQueryValidatorOutstandingRewardsResponse(); message.rewards = @@ -454,9 +453,7 @@ export const QueryValidatorCommissionRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorCommissionRequest { + fromPartial(object: Partial): QueryValidatorCommissionRequest { const message = createBaseQueryValidatorCommissionRequest(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -517,9 +514,7 @@ export const QueryValidatorCommissionResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorCommissionResponse { + fromPartial(object: Partial): QueryValidatorCommissionResponse { const message = createBaseQueryValidatorCommissionResponse(); message.commission = object.commission !== undefined && object.commission !== null @@ -614,9 +609,7 @@ export const QueryValidatorSlashesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorSlashesRequest { + fromPartial(object: Partial): QueryValidatorSlashesRequest { const message = createBaseQueryValidatorSlashesRequest(); message.validatorAddress = object.validatorAddress ?? ""; message.startingHeight = @@ -704,9 +697,7 @@ export const QueryValidatorSlashesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorSlashesResponse { + fromPartial(object: Partial): QueryValidatorSlashesResponse { const message = createBaseQueryValidatorSlashesResponse(); message.slashes = object.slashes?.map((e) => ValidatorSlashEvent.fromPartial(e)) || []; message.pagination = @@ -777,9 +768,7 @@ export const QueryDelegationRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationRewardsRequest { + fromPartial(object: Partial): QueryDelegationRewardsRequest { const message = createBaseQueryDelegationRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -842,9 +831,7 @@ export const QueryDelegationRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationRewardsResponse { + fromPartial(object: Partial): QueryDelegationRewardsResponse { const message = createBaseQueryDelegationRewardsResponse(); message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || []; return message; @@ -900,9 +887,7 @@ export const QueryDelegationTotalRewardsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationTotalRewardsRequest { + fromPartial(object: Partial): QueryDelegationTotalRewardsRequest { const message = createBaseQueryDelegationTotalRewardsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -982,9 +967,7 @@ export const QueryDelegationTotalRewardsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegationTotalRewardsResponse { + fromPartial(object: Partial): QueryDelegationTotalRewardsResponse { const message = createBaseQueryDelegationTotalRewardsResponse(); message.rewards = object.rewards?.map((e) => DelegationDelegatorReward.fromPartial(e)) || []; message.total = object.total?.map((e) => DecCoin.fromPartial(e)) || []; @@ -1041,9 +1024,7 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsRequest { + fromPartial(object: Partial): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -1105,9 +1086,7 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsResponse { + fromPartial(object: Partial): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => e) || []; return message; @@ -1166,9 +1145,7 @@ export const QueryDelegatorWithdrawAddressRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorWithdrawAddressRequest { + fromPartial(object: Partial): QueryDelegatorWithdrawAddressRequest { const message = createBaseQueryDelegatorWithdrawAddressRequest(); message.delegatorAddress = object.delegatorAddress ?? ""; return message; @@ -1227,9 +1204,7 @@ export const QueryDelegatorWithdrawAddressResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorWithdrawAddressResponse { + fromPartial(object: Partial): QueryDelegatorWithdrawAddressResponse { const message = createBaseQueryDelegatorWithdrawAddressResponse(); message.withdrawAddress = object.withdrawAddress ?? ""; return message; @@ -1272,7 +1247,7 @@ export const QueryCommunityPoolRequest = { return obj; }, - fromPartial, I>>(_: I): QueryCommunityPoolRequest { + fromPartial(_: Partial): QueryCommunityPoolRequest { const message = createBaseQueryCommunityPoolRequest(); return message; }, @@ -1333,9 +1308,7 @@ export const QueryCommunityPoolResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryCommunityPoolResponse { + fromPartial(object: Partial): QueryCommunityPoolResponse { const message = createBaseQueryCommunityPoolResponse(); message.pool = object.pool?.map((e) => DecCoin.fromPartial(e)) || []; return message; diff --git a/src/cosmos/distribution/v1beta1/tx.ts b/src/cosmos/distribution/v1beta1/tx.ts index a39d2de4..09f516b4 100644 --- a/src/cosmos/distribution/v1beta1/tx.ts +++ b/src/cosmos/distribution/v1beta1/tx.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.distribution.v1beta1"; /** * MsgSetWithdrawAddress sets the withdraw address for @@ -112,7 +111,7 @@ export const MsgSetWithdrawAddress = { return obj; }, - fromPartial, I>>(object: I): MsgSetWithdrawAddress { + fromPartial(object: Partial): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; @@ -156,9 +155,7 @@ export const MsgSetWithdrawAddressResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgSetWithdrawAddressResponse { + fromPartial(_: Partial): MsgSetWithdrawAddressResponse { const message = createBaseMsgSetWithdrawAddressResponse(); return message; }, @@ -224,9 +221,7 @@ export const MsgWithdrawDelegatorReward = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgWithdrawDelegatorReward { + fromPartial(object: Partial): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -270,9 +265,7 @@ export const MsgWithdrawDelegatorRewardResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgWithdrawDelegatorRewardResponse { + fromPartial(_: Partial): MsgWithdrawDelegatorRewardResponse { const message = createBaseMsgWithdrawDelegatorRewardResponse(); return message; }, @@ -327,9 +320,7 @@ export const MsgWithdrawValidatorCommission = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgWithdrawValidatorCommission { + fromPartial(object: Partial): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); message.validatorAddress = object.validatorAddress ?? ""; return message; @@ -372,9 +363,7 @@ export const MsgWithdrawValidatorCommissionResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgWithdrawValidatorCommissionResponse { + fromPartial(_: Partial): MsgWithdrawValidatorCommissionResponse { const message = createBaseMsgWithdrawValidatorCommissionResponse(); return message; }, @@ -446,7 +435,7 @@ export const MsgFundCommunityPool = { return obj; }, - fromPartial, I>>(object: I): MsgFundCommunityPool { + fromPartial(object: Partial): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.depositor = object.depositor ?? ""; @@ -490,9 +479,7 @@ export const MsgFundCommunityPoolResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgFundCommunityPoolResponse { + fromPartial(_: Partial): MsgFundCommunityPoolResponse { const message = createBaseMsgFundCommunityPoolResponse(); return message; }, diff --git a/src/cosmos/evidence/v1beta1/evidence.ts b/src/cosmos/evidence/v1beta1/evidence.ts index b562d7d8..9f43ad8d 100644 --- a/src/cosmos/evidence/v1beta1/evidence.ts +++ b/src/cosmos/evidence/v1beta1/evidence.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * Equivocation implements the Evidence interface and defines evidence of double @@ -98,7 +97,7 @@ export const Equivocation = { return obj; }, - fromPartial, I>>(object: I): Equivocation { + fromPartial(object: Partial): Equivocation { const message = createBaseEquivocation(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; diff --git a/src/cosmos/evidence/v1beta1/genesis.ts b/src/cosmos/evidence/v1beta1/genesis.ts index 5794e677..2d7cc1e7 100644 --- a/src/cosmos/evidence/v1beta1/genesis.ts +++ b/src/cosmos/evidence/v1beta1/genesis.ts @@ -1,8 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** GenesisState defines the evidence module's genesis state. */ @@ -66,7 +64,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/cosmos/evidence/v1beta1/query.ts b/src/cosmos/evidence/v1beta1/query.ts index 0c506f61..24ef819d 100644 --- a/src/cosmos/evidence/v1beta1/query.ts +++ b/src/cosmos/evidence/v1beta1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** QueryEvidenceRequest is the request type for the Query/Evidence RPC method. */ @@ -91,7 +90,7 @@ export const QueryEvidenceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryEvidenceRequest { + fromPartial(object: Partial): QueryEvidenceRequest { const message = createBaseQueryEvidenceRequest(); message.evidenceHash = object.evidenceHash ?? new Uint8Array(); return message; @@ -148,7 +147,7 @@ export const QueryEvidenceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryEvidenceResponse { + fromPartial(object: Partial): QueryEvidenceResponse { const message = createBaseQueryEvidenceResponse(); message.evidence = object.evidence !== undefined && object.evidence !== null @@ -208,7 +207,7 @@ export const QueryAllEvidenceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllEvidenceRequest { + fromPartial(object: Partial): QueryAllEvidenceRequest { const message = createBaseQueryAllEvidenceRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -285,9 +284,7 @@ export const QueryAllEvidenceResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllEvidenceResponse { + fromPartial(object: Partial): QueryAllEvidenceResponse { const message = createBaseQueryAllEvidenceResponse(); message.evidence = object.evidence?.map((e) => Any.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/evidence/v1beta1/tx.ts b/src/cosmos/evidence/v1beta1/tx.ts index 0fed1698..da2bbdaf 100644 --- a/src/cosmos/evidence/v1beta1/tx.ts +++ b/src/cosmos/evidence/v1beta1/tx.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.evidence.v1beta1"; /** * MsgSubmitEvidence represents a message that supports submitting arbitrary @@ -81,7 +80,7 @@ export const MsgSubmitEvidence = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitEvidence { + fromPartial(object: Partial): MsgSubmitEvidence { const message = createBaseMsgSubmitEvidence(); message.submitter = object.submitter ?? ""; message.evidence = @@ -142,9 +141,7 @@ export const MsgSubmitEvidenceResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgSubmitEvidenceResponse { + fromPartial(object: Partial): MsgSubmitEvidenceResponse { const message = createBaseMsgSubmitEvidenceResponse(); message.hash = object.hash ?? new Uint8Array(); return message; diff --git a/src/cosmos/feegrant/v1beta1/feegrant.ts b/src/cosmos/feegrant/v1beta1/feegrant.ts index 295c702c..0645f719 100644 --- a/src/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,11 +1,10 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * BasicAllowance implements Allowance with a one-time grant of tokens @@ -144,7 +143,7 @@ export const BasicAllowance = { return obj; }, - fromPartial, I>>(object: I): BasicAllowance { + fromPartial(object: Partial): BasicAllowance { const message = createBaseBasicAllowance(); message.spendLimit = object.spendLimit?.map((e) => Coin.fromPartial(e)) || []; message.expiration = @@ -265,7 +264,7 @@ export const PeriodicAllowance = { return obj; }, - fromPartial, I>>(object: I): PeriodicAllowance { + fromPartial(object: Partial): PeriodicAllowance { const message = createBasePeriodicAllowance(); message.basic = object.basic !== undefined && object.basic !== null @@ -352,7 +351,7 @@ export const AllowedMsgAllowance = { return obj; }, - fromPartial, I>>(object: I): AllowedMsgAllowance { + fromPartial(object: Partial): AllowedMsgAllowance { const message = createBaseAllowedMsgAllowance(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -435,7 +434,7 @@ export const Grant = { return obj; }, - fromPartial, I>>(object: I): Grant { + fromPartial(object: Partial): Grant { const message = createBaseGrant(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; diff --git a/src/cosmos/feegrant/v1beta1/genesis.ts b/src/cosmos/feegrant/v1beta1/genesis.ts index 0a28e052..cdc34036 100644 --- a/src/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/cosmos/feegrant/v1beta1/genesis.ts @@ -1,8 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** GenesisState contains a set of fee allowances, persisted from the store */ @@ -67,7 +65,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; return message; diff --git a/src/cosmos/feegrant/v1beta1/query.ts b/src/cosmos/feegrant/v1beta1/query.ts index b452f275..b0264f28 100644 --- a/src/cosmos/feegrant/v1beta1/query.ts +++ b/src/cosmos/feegrant/v1beta1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant } from "./feegrant"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** QueryAllowanceRequest is the request type for the Query/Allowance RPC method. */ @@ -115,7 +114,7 @@ export const QueryAllowanceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllowanceRequest { + fromPartial(object: Partial): QueryAllowanceRequest { const message = createBaseQueryAllowanceRequest(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -173,7 +172,7 @@ export const QueryAllowanceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAllowanceResponse { + fromPartial(object: Partial): QueryAllowanceResponse { const message = createBaseQueryAllowanceResponse(); message.allowance = object.allowance !== undefined && object.allowance !== null @@ -244,7 +243,7 @@ export const QueryAllowancesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAllowancesRequest { + fromPartial(object: Partial): QueryAllowancesRequest { const message = createBaseQueryAllowancesRequest(); message.grantee = object.grantee ?? ""; message.pagination = @@ -324,7 +323,7 @@ export const QueryAllowancesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryAllowancesResponse { + fromPartial(object: Partial): QueryAllowancesResponse { const message = createBaseQueryAllowancesResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = @@ -396,9 +395,7 @@ export const QueryAllowancesByGranterRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllowancesByGranterRequest { + fromPartial(object: Partial): QueryAllowancesByGranterRequest { const message = createBaseQueryAllowancesByGranterRequest(); message.granter = object.granter ?? ""; message.pagination = @@ -478,9 +475,7 @@ export const QueryAllowancesByGranterResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllowancesByGranterResponse { + fromPartial(object: Partial): QueryAllowancesByGranterResponse { const message = createBaseQueryAllowancesByGranterResponse(); message.allowances = object.allowances?.map((e) => Grant.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/feegrant/v1beta1/tx.ts b/src/cosmos/feegrant/v1beta1/tx.ts index caa2836b..00d0acbe 100644 --- a/src/cosmos/feegrant/v1beta1/tx.ts +++ b/src/cosmos/feegrant/v1beta1/tx.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.feegrant.v1beta1"; /** * MsgGrantAllowance adds permission for Grantee to spend up to Allowance @@ -107,7 +106,7 @@ export const MsgGrantAllowance = { return obj; }, - fromPartial, I>>(object: I): MsgGrantAllowance { + fromPartial(object: Partial): MsgGrantAllowance { const message = createBaseMsgGrantAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -155,7 +154,7 @@ export const MsgGrantAllowanceResponse = { return obj; }, - fromPartial, I>>(_: I): MsgGrantAllowanceResponse { + fromPartial(_: Partial): MsgGrantAllowanceResponse { const message = createBaseMsgGrantAllowanceResponse(); return message; }, @@ -221,7 +220,7 @@ export const MsgRevokeAllowance = { return obj; }, - fromPartial, I>>(object: I): MsgRevokeAllowance { + fromPartial(object: Partial): MsgRevokeAllowance { const message = createBaseMsgRevokeAllowance(); message.granter = object.granter ?? ""; message.grantee = object.grantee ?? ""; @@ -265,7 +264,7 @@ export const MsgRevokeAllowanceResponse = { return obj; }, - fromPartial, I>>(_: I): MsgRevokeAllowanceResponse { + fromPartial(_: Partial): MsgRevokeAllowanceResponse { const message = createBaseMsgRevokeAllowanceResponse(); return message; }, diff --git a/src/cosmos/genutil/v1beta1/genesis.ts b/src/cosmos/genutil/v1beta1/genesis.ts index 4b35676c..6cb9329d 100644 --- a/src/cosmos/genutil/v1beta1/genesis.ts +++ b/src/cosmos/genutil/v1beta1/genesis.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmos.genutil.v1beta1"; /** GenesisState defines the raw genesis transaction in JSON. */ @@ -65,7 +64,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.genTxs = object.genTxs?.map((e) => e) || []; return message; diff --git a/src/cosmos/gov/v1beta1/genesis.ts b/src/cosmos/gov/v1beta1/genesis.ts index 7ac0d10c..22ce006f 100644 --- a/src/cosmos/gov/v1beta1/genesis.ts +++ b/src/cosmos/gov/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** GenesisState defines the gov module's genesis state. */ @@ -168,7 +167,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.startingProposalId = object.startingProposalId !== undefined && object.startingProposalId !== null diff --git a/src/cosmos/gov/v1beta1/gov.ts b/src/cosmos/gov/v1beta1/gov.ts index 3d717289..9a446a5c 100644 --- a/src/cosmos/gov/v1beta1/gov.ts +++ b/src/cosmos/gov/v1beta1/gov.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; @@ -7,8 +6,6 @@ import { Duration } from "../../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; import { isSet, - DeepPartial, - Exact, Long, fromJsonTimestamp, fromTimestamp, @@ -347,7 +344,7 @@ export const WeightedVoteOption = { return obj; }, - fromPartial, I>>(object: I): WeightedVoteOption { + fromPartial(object: Partial): WeightedVoteOption { const message = createBaseWeightedVoteOption(); message.option = object.option ?? 0; message.weight = object.weight ?? ""; @@ -415,7 +412,7 @@ export const TextProposal = { return obj; }, - fromPartial, I>>(object: I): TextProposal { + fromPartial(object: Partial): TextProposal { const message = createBaseTextProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -500,7 +497,7 @@ export const Deposit = { return obj; }, - fromPartial, I>>(object: I): Deposit { + fromPartial(object: Partial): Deposit { const message = createBaseDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -666,7 +663,7 @@ export const Proposal = { return obj; }, - fromPartial, I>>(object: I): Proposal { + fromPartial(object: Partial): Proposal { const message = createBaseProposal(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -782,7 +779,7 @@ export const TallyResult = { return obj; }, - fromPartial, I>>(object: I): TallyResult { + fromPartial(object: Partial): TallyResult { const message = createBaseTallyResult(); message.yes = object.yes ?? ""; message.abstain = object.abstain ?? ""; @@ -882,7 +879,7 @@ export const Vote = { return obj; }, - fromPartial, I>>(object: I): Vote { + fromPartial(object: Partial): Vote { const message = createBaseVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -968,7 +965,7 @@ export const DepositParams = { return obj; }, - fromPartial, I>>(object: I): DepositParams { + fromPartial(object: Partial): DepositParams { const message = createBaseDepositParams(); message.minDeposit = object.minDeposit?.map((e) => Coin.fromPartial(e)) || []; message.maxDepositPeriod = @@ -1029,7 +1026,7 @@ export const VotingParams = { return obj; }, - fromPartial, I>>(object: I): VotingParams { + fromPartial(object: Partial): VotingParams { const message = createBaseVotingParams(); message.votingPeriod = object.votingPeriod !== undefined && object.votingPeriod !== null @@ -1117,7 +1114,7 @@ export const TallyParams = { return obj; }, - fromPartial, I>>(object: I): TallyParams { + fromPartial(object: Partial): TallyParams { const message = createBaseTallyParams(); message.quorum = object.quorum ?? new Uint8Array(); message.threshold = object.threshold ?? new Uint8Array(); diff --git a/src/cosmos/gov/v1beta1/query.ts b/src/cosmos/gov/v1beta1/query.ts index 2fd327bf..3e7679e5 100644 --- a/src/cosmos/gov/v1beta1/query.ts +++ b/src/cosmos/gov/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { ProposalStatus, @@ -14,7 +13,7 @@ import { } from "./gov"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { Long, isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** QueryProposalRequest is the request type for the Query/Proposal RPC method. */ @@ -201,7 +200,7 @@ export const QueryProposalRequest = { return obj; }, - fromPartial, I>>(object: I): QueryProposalRequest { + fromPartial(object: Partial): QueryProposalRequest { const message = createBaseQueryProposalRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -261,7 +260,7 @@ export const QueryProposalResponse = { return obj; }, - fromPartial, I>>(object: I): QueryProposalResponse { + fromPartial(object: Partial): QueryProposalResponse { const message = createBaseQueryProposalResponse(); message.proposal = object.proposal !== undefined && object.proposal !== null @@ -355,7 +354,7 @@ export const QueryProposalsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryProposalsRequest { + fromPartial(object: Partial): QueryProposalsRequest { const message = createBaseQueryProposalsRequest(); message.proposalStatus = object.proposalStatus ?? 0; message.voter = object.voter ?? ""; @@ -437,7 +436,7 @@ export const QueryProposalsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryProposalsResponse { + fromPartial(object: Partial): QueryProposalsResponse { const message = createBaseQueryProposalsResponse(); message.proposals = object.proposals?.map((e) => Proposal.fromPartial(e)) || []; message.pagination = @@ -508,7 +507,7 @@ export const QueryVoteRequest = { return obj; }, - fromPartial, I>>(object: I): QueryVoteRequest { + fromPartial(object: Partial): QueryVoteRequest { const message = createBaseQueryVoteRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -568,7 +567,7 @@ export const QueryVoteResponse = { return obj; }, - fromPartial, I>>(object: I): QueryVoteResponse { + fromPartial(object: Partial): QueryVoteResponse { const message = createBaseQueryVoteResponse(); message.vote = object.vote !== undefined && object.vote !== null ? Vote.fromPartial(object.vote) : undefined; @@ -637,7 +636,7 @@ export const QueryVotesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryVotesRequest { + fromPartial(object: Partial): QueryVotesRequest { const message = createBaseQueryVotesRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -718,7 +717,7 @@ export const QueryVotesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryVotesResponse { + fromPartial(object: Partial): QueryVotesResponse { const message = createBaseQueryVotesResponse(); message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; message.pagination = @@ -778,7 +777,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryParamsRequest { + fromPartial(object: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.paramsType = object.paramsType ?? ""; return message; @@ -859,7 +858,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.votingParams = object.votingParams !== undefined && object.votingParams !== null @@ -937,7 +936,7 @@ export const QueryDepositRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDepositRequest { + fromPartial(object: Partial): QueryDepositRequest { const message = createBaseQueryDepositRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -998,7 +997,7 @@ export const QueryDepositResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDepositResponse { + fromPartial(object: Partial): QueryDepositResponse { const message = createBaseQueryDepositResponse(); message.deposit = object.deposit !== undefined && object.deposit !== null @@ -1069,7 +1068,7 @@ export const QueryDepositsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDepositsRequest { + fromPartial(object: Partial): QueryDepositsRequest { const message = createBaseQueryDepositsRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1150,7 +1149,7 @@ export const QueryDepositsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDepositsResponse { + fromPartial(object: Partial): QueryDepositsResponse { const message = createBaseQueryDepositsResponse(); message.deposits = object.deposits?.map((e) => Deposit.fromPartial(e)) || []; message.pagination = @@ -1210,7 +1209,7 @@ export const QueryTallyResultRequest = { return obj; }, - fromPartial, I>>(object: I): QueryTallyResultRequest { + fromPartial(object: Partial): QueryTallyResultRequest { const message = createBaseQueryTallyResultRequest(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -1270,9 +1269,7 @@ export const QueryTallyResultResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryTallyResultResponse { + fromPartial(object: Partial): QueryTallyResultResponse { const message = createBaseQueryTallyResultResponse(); message.tally = object.tally !== undefined && object.tally !== null ? TallyResult.fromPartial(object.tally) : undefined; diff --git a/src/cosmos/gov/v1beta1/tx.ts b/src/cosmos/gov/v1beta1/tx.ts index c23a55e5..3b332f21 100644 --- a/src/cosmos/gov/v1beta1/tx.ts +++ b/src/cosmos/gov/v1beta1/tx.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { VoteOption, WeightedVoteOption, voteOptionFromJSON, voteOptionToJSON } from "./gov"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.gov.v1beta1"; /** * MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -140,7 +139,7 @@ export const MsgSubmitProposal = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitProposal { + fromPartial(object: Partial): MsgSubmitProposal { const message = createBaseMsgSubmitProposal(); message.content = object.content !== undefined && object.content !== null ? Any.fromPartial(object.content) : undefined; @@ -199,9 +198,7 @@ export const MsgSubmitProposalResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgSubmitProposalResponse { + fromPartial(object: Partial): MsgSubmitProposalResponse { const message = createBaseMsgSubmitProposalResponse(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -282,7 +279,7 @@ export const MsgVote = { return obj; }, - fromPartial, I>>(object: I): MsgVote { + fromPartial(object: Partial): MsgVote { const message = createBaseMsgVote(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -330,7 +327,7 @@ export const MsgVoteResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVoteResponse { + fromPartial(_: Partial): MsgVoteResponse { const message = createBaseMsgVoteResponse(); return message; }, @@ -415,7 +412,7 @@ export const MsgVoteWeighted = { return obj; }, - fromPartial, I>>(object: I): MsgVoteWeighted { + fromPartial(object: Partial): MsgVoteWeighted { const message = createBaseMsgVoteWeighted(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -463,7 +460,7 @@ export const MsgVoteWeightedResponse = { return obj; }, - fromPartial, I>>(_: I): MsgVoteWeightedResponse { + fromPartial(_: Partial): MsgVoteWeightedResponse { const message = createBaseMsgVoteWeightedResponse(); return message; }, @@ -546,7 +543,7 @@ export const MsgDeposit = { return obj; }, - fromPartial, I>>(object: I): MsgDeposit { + fromPartial(object: Partial): MsgDeposit { const message = createBaseMsgDeposit(); message.proposalId = object.proposalId !== undefined && object.proposalId !== null @@ -594,7 +591,7 @@ export const MsgDepositResponse = { return obj; }, - fromPartial, I>>(_: I): MsgDepositResponse { + fromPartial(_: Partial): MsgDepositResponse { const message = createBaseMsgDepositResponse(); return message; }, diff --git a/src/cosmos/mint/v1beta1/genesis.ts b/src/cosmos/mint/v1beta1/genesis.ts index d7ce5fa1..cd988c99 100644 --- a/src/cosmos/mint/v1beta1/genesis.ts +++ b/src/cosmos/mint/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Minter, Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** GenesisState defines the mint module's genesis state. */ @@ -74,7 +73,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.minter = object.minter !== undefined && object.minter !== null ? Minter.fromPartial(object.minter) : undefined; diff --git a/src/cosmos/mint/v1beta1/mint.ts b/src/cosmos/mint/v1beta1/mint.ts index a1b084f8..fa0e7d9e 100644 --- a/src/cosmos/mint/v1beta1/mint.ts +++ b/src/cosmos/mint/v1beta1/mint.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, Long } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** Minter represents the minting state. */ @@ -94,7 +93,7 @@ export const Minter = { return obj; }, - fromPartial, I>>(object: I): Minter { + fromPartial(object: Partial): Minter { const message = createBaseMinter(); message.inflation = object.inflation ?? ""; message.annualProvisions = object.annualProvisions ?? ""; @@ -207,7 +206,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.mintDenom = object.mintDenom ?? ""; message.inflationRateChange = object.inflationRateChange ?? ""; diff --git a/src/cosmos/mint/v1beta1/query.ts b/src/cosmos/mint/v1beta1/query.ts index e8112c54..232d8e76 100644 --- a/src/cosmos/mint/v1beta1/query.ts +++ b/src/cosmos/mint/v1beta1/query.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./mint"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.mint.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -77,7 +76,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -132,7 +131,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -176,7 +175,7 @@ export const QueryInflationRequest = { return obj; }, - fromPartial, I>>(_: I): QueryInflationRequest { + fromPartial(_: Partial): QueryInflationRequest { const message = createBaseQueryInflationRequest(); return message; }, @@ -234,7 +233,7 @@ export const QueryInflationResponse = { return obj; }, - fromPartial, I>>(object: I): QueryInflationResponse { + fromPartial(object: Partial): QueryInflationResponse { const message = createBaseQueryInflationResponse(); message.inflation = object.inflation ?? new Uint8Array(); return message; @@ -277,9 +276,7 @@ export const QueryAnnualProvisionsRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryAnnualProvisionsRequest { + fromPartial(_: Partial): QueryAnnualProvisionsRequest { const message = createBaseQueryAnnualProvisionsRequest(); return message; }, @@ -339,9 +336,7 @@ export const QueryAnnualProvisionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAnnualProvisionsResponse { + fromPartial(object: Partial): QueryAnnualProvisionsResponse { const message = createBaseQueryAnnualProvisionsResponse(); message.annualProvisions = object.annualProvisions ?? new Uint8Array(); return message; diff --git a/src/cosmos/params/v1beta1/params.ts b/src/cosmos/params/v1beta1/params.ts index 07deeaad..802572da 100644 --- a/src/cosmos/params/v1beta1/params.ts +++ b/src/cosmos/params/v1beta1/params.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** ParameterChangeProposal defines a proposal to change one or more parameters. */ @@ -98,7 +97,7 @@ export const ParameterChangeProposal = { return obj; }, - fromPartial, I>>(object: I): ParameterChangeProposal { + fromPartial(object: Partial): ParameterChangeProposal { const message = createBaseParameterChangeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -178,7 +177,7 @@ export const ParamChange = { return obj; }, - fromPartial, I>>(object: I): ParamChange { + fromPartial(object: Partial): ParamChange { const message = createBaseParamChange(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; diff --git a/src/cosmos/params/v1beta1/query.ts b/src/cosmos/params/v1beta1/query.ts index 9e851c3a..43765c9e 100644 --- a/src/cosmos/params/v1beta1/query.ts +++ b/src/cosmos/params/v1beta1/query.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { ParamChange } from "./params"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.params.v1beta1"; /** QueryParamsRequest is request type for the Query/Params RPC method. */ @@ -80,7 +79,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryParamsRequest { + fromPartial(object: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); message.subspace = object.subspace ?? ""; message.key = object.key ?? ""; @@ -138,7 +137,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.param = object.param !== undefined && object.param !== null ? ParamChange.fromPartial(object.param) : undefined; diff --git a/src/cosmos/slashing/v1beta1/genesis.ts b/src/cosmos/slashing/v1beta1/genesis.ts index 150a1fbf..eeedda77 100644 --- a/src/cosmos/slashing/v1beta1/genesis.ts +++ b/src/cosmos/slashing/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, Long } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** GenesisState defines the slashing module's genesis state. */ @@ -139,7 +138,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -214,7 +213,7 @@ export const SigningInfo = { return obj; }, - fromPartial, I>>(object: I): SigningInfo { + fromPartial(object: Partial): SigningInfo { const message = createBaseSigningInfo(); message.address = object.address ?? ""; message.validatorSigningInfo = @@ -293,7 +292,7 @@ export const ValidatorMissedBlocks = { return obj; }, - fromPartial, I>>(object: I): ValidatorMissedBlocks { + fromPartial(object: Partial): ValidatorMissedBlocks { const message = createBaseValidatorMissedBlocks(); message.address = object.address ?? ""; message.missedBlocks = object.missedBlocks?.map((e) => MissedBlock.fromPartial(e)) || []; @@ -361,7 +360,7 @@ export const MissedBlock = { return obj; }, - fromPartial, I>>(object: I): MissedBlock { + fromPartial(object: Partial): MissedBlock { const message = createBaseMissedBlock(); message.index = object.index !== undefined && object.index !== null ? Long.fromValue(object.index) : Long.ZERO; diff --git a/src/cosmos/slashing/v1beta1/query.ts b/src/cosmos/slashing/v1beta1/query.ts index cdcccf4b..4007b15c 100644 --- a/src/cosmos/slashing/v1beta1/query.ts +++ b/src/cosmos/slashing/v1beta1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Params, ValidatorSigningInfo } from "./slashing"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** QueryParamsRequest is the request type for the Query/Params RPC method */ @@ -86,7 +85,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -141,7 +140,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -198,7 +197,7 @@ export const QuerySigningInfoRequest = { return obj; }, - fromPartial, I>>(object: I): QuerySigningInfoRequest { + fromPartial(object: Partial): QuerySigningInfoRequest { const message = createBaseQuerySigningInfoRequest(); message.consAddress = object.consAddress ?? ""; return message; @@ -259,9 +258,7 @@ export const QuerySigningInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfoResponse { + fromPartial(object: Partial): QuerySigningInfoResponse { const message = createBaseQuerySigningInfoResponse(); message.valSigningInfo = object.valSigningInfo !== undefined && object.valSigningInfo !== null @@ -321,9 +318,7 @@ export const QuerySigningInfosRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfosRequest { + fromPartial(object: Partial): QuerySigningInfosRequest { const message = createBaseQuerySigningInfosRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -400,9 +395,7 @@ export const QuerySigningInfosResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySigningInfosResponse { + fromPartial(object: Partial): QuerySigningInfosResponse { const message = createBaseQuerySigningInfosResponse(); message.info = object.info?.map((e) => ValidatorSigningInfo.fromPartial(e)) || []; message.pagination = diff --git a/src/cosmos/slashing/v1beta1/slashing.ts b/src/cosmos/slashing/v1beta1/slashing.ts index 9a5a9836..a6ffda9b 100644 --- a/src/cosmos/slashing/v1beta1/slashing.ts +++ b/src/cosmos/slashing/v1beta1/slashing.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Duration } from "../../../google/protobuf/duration"; @@ -8,8 +7,6 @@ import { isSet, fromJsonTimestamp, fromTimestamp, - DeepPartial, - Exact, bytesFromBase64, base64FromBytes, } from "../../../helpers"; @@ -164,7 +161,7 @@ export const ValidatorSigningInfo = { return obj; }, - fromPartial, I>>(object: I): ValidatorSigningInfo { + fromPartial(object: Partial): ValidatorSigningInfo { const message = createBaseValidatorSigningInfo(); message.address = object.address ?? ""; message.startHeight = @@ -304,7 +301,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.signedBlocksWindow = object.signedBlocksWindow !== undefined && object.signedBlocksWindow !== null diff --git a/src/cosmos/slashing/v1beta1/tx.ts b/src/cosmos/slashing/v1beta1/tx.ts index 80678571..608f2a60 100644 --- a/src/cosmos/slashing/v1beta1/tx.ts +++ b/src/cosmos/slashing/v1beta1/tx.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.slashing.v1beta1"; /** MsgUnjail defines the Msg/Unjail request type */ @@ -61,7 +60,7 @@ export const MsgUnjail = { return obj; }, - fromPartial, I>>(object: I): MsgUnjail { + fromPartial(object: Partial): MsgUnjail { const message = createBaseMsgUnjail(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -104,7 +103,7 @@ export const MsgUnjailResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUnjailResponse { + fromPartial(_: Partial): MsgUnjailResponse { const message = createBaseMsgUnjailResponse(); return message; }, diff --git a/src/cosmos/staking/v1beta1/authz.ts b/src/cosmos/staking/v1beta1/authz.ts index 746d6e95..71b594b1 100644 --- a/src/cosmos/staking/v1beta1/authz.ts +++ b/src/cosmos/staking/v1beta1/authz.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../helpers"; +import { isSet } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** * AuthorizationType defines the type of staking module authorization type @@ -190,7 +189,7 @@ export const StakeAuthorization = { return obj; }, - fromPartial, I>>(object: I): StakeAuthorization { + fromPartial(object: Partial): StakeAuthorization { const message = createBaseStakeAuthorization(); message.maxTokens = object.maxTokens !== undefined && object.maxTokens !== null @@ -264,9 +263,7 @@ export const StakeAuthorization_Validators = { return obj; }, - fromPartial, I>>( - object: I, - ): StakeAuthorization_Validators { + fromPartial(object: Partial): StakeAuthorization_Validators { const message = createBaseStakeAuthorization_Validators(); message.address = object.address?.map((e) => e) || []; return message; diff --git a/src/cosmos/staking/v1beta1/genesis.ts b/src/cosmos/staking/v1beta1/genesis.ts index 1422bbcb..c47f9de0 100644 --- a/src/cosmos/staking/v1beta1/genesis.ts +++ b/src/cosmos/staking/v1beta1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Params, Validator, Delegation, UnbondingDelegation, Redelegation } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** GenesisState defines the staking module's genesis state. */ @@ -216,7 +215,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -293,7 +292,7 @@ export const LastValidatorPower = { return obj; }, - fromPartial, I>>(object: I): LastValidatorPower { + fromPartial(object: Partial): LastValidatorPower { const message = createBaseLastValidatorPower(); message.address = object.address ?? ""; message.power = diff --git a/src/cosmos/staking/v1beta1/query.ts b/src/cosmos/staking/v1beta1/query.ts index b119eac2..272b5b0a 100644 --- a/src/cosmos/staking/v1beta1/query.ts +++ b/src/cosmos/staking/v1beta1/query.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { @@ -11,7 +10,7 @@ import { Params, } from "./staking"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** QueryValidatorsRequest is request type for Query/Validators RPC method. */ @@ -344,7 +343,7 @@ export const QueryValidatorsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorsRequest { + fromPartial(object: Partial): QueryValidatorsRequest { const message = createBaseQueryValidatorsRequest(); message.status = object.status ?? ""; message.pagination = @@ -424,7 +423,7 @@ export const QueryValidatorsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorsResponse { + fromPartial(object: Partial): QueryValidatorsResponse { const message = createBaseQueryValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -484,7 +483,7 @@ export const QueryValidatorRequest = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorRequest { + fromPartial(object: Partial): QueryValidatorRequest { const message = createBaseQueryValidatorRequest(); message.validatorAddr = object.validatorAddr ?? ""; return message; @@ -541,7 +540,7 @@ export const QueryValidatorResponse = { return obj; }, - fromPartial, I>>(object: I): QueryValidatorResponse { + fromPartial(object: Partial): QueryValidatorResponse { const message = createBaseQueryValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -612,9 +611,7 @@ export const QueryValidatorDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorDelegationsRequest { + fromPartial(object: Partial): QueryValidatorDelegationsRequest { const message = createBaseQueryValidatorDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; message.pagination = @@ -696,9 +693,7 @@ export const QueryValidatorDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryValidatorDelegationsResponse { + fromPartial(object: Partial): QueryValidatorDelegationsResponse { const message = createBaseQueryValidatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -774,8 +769,8 @@ export const QueryValidatorUnbondingDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryValidatorUnbondingDelegationsRequest { const message = createBaseQueryValidatorUnbondingDelegationsRequest(); message.validatorAddr = object.validatorAddr ?? ""; @@ -861,8 +856,8 @@ export const QueryValidatorUnbondingDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryValidatorUnbondingDelegationsResponse { const message = createBaseQueryValidatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -935,7 +930,7 @@ export const QueryDelegationRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDelegationRequest { + fromPartial(object: Partial): QueryDelegationRequest { const message = createBaseQueryDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -997,7 +992,7 @@ export const QueryDelegationResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDelegationResponse { + fromPartial(object: Partial): QueryDelegationResponse { const message = createBaseQueryDelegationResponse(); message.delegationResponse = object.delegationResponse !== undefined && object.delegationResponse !== null @@ -1067,9 +1062,7 @@ export const QueryUnbondingDelegationRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnbondingDelegationRequest { + fromPartial(object: Partial): QueryUnbondingDelegationRequest { const message = createBaseQueryUnbondingDelegationRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1127,9 +1120,7 @@ export const QueryUnbondingDelegationResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnbondingDelegationResponse { + fromPartial(object: Partial): QueryUnbondingDelegationResponse { const message = createBaseQueryUnbondingDelegationResponse(); message.unbond = object.unbond !== undefined && object.unbond !== null @@ -1200,9 +1191,7 @@ export const QueryDelegatorDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorDelegationsRequest { + fromPartial(object: Partial): QueryDelegatorDelegationsRequest { const message = createBaseQueryDelegatorDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1284,9 +1273,7 @@ export const QueryDelegatorDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorDelegationsResponse { + fromPartial(object: Partial): QueryDelegatorDelegationsResponse { const message = createBaseQueryDelegatorDelegationsResponse(); message.delegationResponses = object.delegationResponses?.map((e) => DelegationResponse.fromPartial(e)) || []; @@ -1362,8 +1349,8 @@ export const QueryDelegatorUnbondingDelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryDelegatorUnbondingDelegationsRequest { const message = createBaseQueryDelegatorUnbondingDelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; @@ -1449,8 +1436,8 @@ export const QueryDelegatorUnbondingDelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: Partial, ): QueryDelegatorUnbondingDelegationsResponse { const message = createBaseQueryDelegatorUnbondingDelegationsResponse(); message.unbondingResponses = @@ -1546,9 +1533,7 @@ export const QueryRedelegationsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRedelegationsRequest { + fromPartial(object: Partial): QueryRedelegationsRequest { const message = createBaseQueryRedelegationsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.srcValidatorAddr = object.srcValidatorAddr ?? ""; @@ -1632,9 +1617,7 @@ export const QueryRedelegationsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRedelegationsResponse { + fromPartial(object: Partial): QueryRedelegationsResponse { const message = createBaseQueryRedelegationsResponse(); message.redelegationResponses = object.redelegationResponses?.map((e) => RedelegationResponse.fromPartial(e)) || []; @@ -1707,9 +1690,7 @@ export const QueryDelegatorValidatorsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsRequest { + fromPartial(object: Partial): QueryDelegatorValidatorsRequest { const message = createBaseQueryDelegatorValidatorsRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.pagination = @@ -1789,9 +1770,7 @@ export const QueryDelegatorValidatorsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorsResponse { + fromPartial(object: Partial): QueryDelegatorValidatorsResponse { const message = createBaseQueryDelegatorValidatorsResponse(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.pagination = @@ -1862,9 +1841,7 @@ export const QueryDelegatorValidatorRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorRequest { + fromPartial(object: Partial): QueryDelegatorValidatorRequest { const message = createBaseQueryDelegatorValidatorRequest(); message.delegatorAddr = object.delegatorAddr ?? ""; message.validatorAddr = object.validatorAddr ?? ""; @@ -1922,9 +1899,7 @@ export const QueryDelegatorValidatorResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDelegatorValidatorResponse { + fromPartial(object: Partial): QueryDelegatorValidatorResponse { const message = createBaseQueryDelegatorValidatorResponse(); message.validator = object.validator !== undefined && object.validator !== null @@ -1983,9 +1958,7 @@ export const QueryHistoricalInfoRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryHistoricalInfoRequest { + fromPartial(object: Partial): QueryHistoricalInfoRequest { const message = createBaseQueryHistoricalInfoRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -2042,9 +2015,7 @@ export const QueryHistoricalInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryHistoricalInfoResponse { + fromPartial(object: Partial): QueryHistoricalInfoResponse { const message = createBaseQueryHistoricalInfoResponse(); message.hist = object.hist !== undefined && object.hist !== null ? HistoricalInfo.fromPartial(object.hist) : undefined; @@ -2088,7 +2059,7 @@ export const QueryPoolRequest = { return obj; }, - fromPartial, I>>(_: I): QueryPoolRequest { + fromPartial(_: Partial): QueryPoolRequest { const message = createBaseQueryPoolRequest(); return message; }, @@ -2143,7 +2114,7 @@ export const QueryPoolResponse = { return obj; }, - fromPartial, I>>(object: I): QueryPoolResponse { + fromPartial(object: Partial): QueryPoolResponse { const message = createBaseQueryPoolResponse(); message.pool = object.pool !== undefined && object.pool !== null ? Pool.fromPartial(object.pool) : undefined; @@ -2187,7 +2158,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -2242,7 +2213,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/cosmos/staking/v1beta1/staking.ts b/src/cosmos/staking/v1beta1/staking.ts index c846f164..c033f672 100644 --- a/src/cosmos/staking/v1beta1/staking.ts +++ b/src/cosmos/staking/v1beta1/staking.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Header } from "../../../tendermint/types/types"; import { Timestamp } from "../../../google/protobuf/timestamp"; @@ -6,7 +5,7 @@ import { Any } from "../../../google/protobuf/any"; import { Duration } from "../../../google/protobuf/duration"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp, Long } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** BondStatus is the status of a validator. */ @@ -404,7 +403,7 @@ export const HistoricalInfo = { return obj; }, - fromPartial, I>>(object: I): HistoricalInfo { + fromPartial(object: Partial): HistoricalInfo { const message = createBaseHistoricalInfo(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -484,7 +483,7 @@ export const CommissionRates = { return obj; }, - fromPartial, I>>(object: I): CommissionRates { + fromPartial(object: Partial): CommissionRates { const message = createBaseCommissionRates(); message.rate = object.rate ?? ""; message.maxRate = object.maxRate ?? ""; @@ -558,7 +557,7 @@ export const Commission = { return obj; }, - fromPartial, I>>(object: I): Commission { + fromPartial(object: Partial): Commission { const message = createBaseCommission(); message.commissionRates = object.commissionRates !== undefined && object.commissionRates !== null @@ -665,7 +664,7 @@ export const Description = { return obj; }, - fromPartial, I>>(object: I): Description { + fromPartial(object: Partial): Description { const message = createBaseDescription(); message.moniker = object.moniker ?? ""; message.identity = object.identity ?? ""; @@ -840,7 +839,7 @@ export const Validator = { return obj; }, - fromPartial, I>>(object: I): Validator { + fromPartial(object: Partial): Validator { const message = createBaseValidator(); message.operatorAddress = object.operatorAddress ?? ""; message.consensusPubkey = @@ -927,7 +926,7 @@ export const ValAddresses = { return obj; }, - fromPartial, I>>(object: I): ValAddresses { + fromPartial(object: Partial): ValAddresses { const message = createBaseValAddresses(); message.addresses = object.addresses?.map((e) => e) || []; return message; @@ -994,7 +993,7 @@ export const DVPair = { return obj; }, - fromPartial, I>>(object: I): DVPair { + fromPartial(object: Partial): DVPair { const message = createBaseDVPair(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1057,7 +1056,7 @@ export const DVPairs = { return obj; }, - fromPartial, I>>(object: I): DVPairs { + fromPartial(object: Partial): DVPairs { const message = createBaseDVPairs(); message.pairs = object.pairs?.map((e) => DVPair.fromPartial(e)) || []; return message; @@ -1135,7 +1134,7 @@ export const DVVTriplet = { return obj; }, - fromPartial, I>>(object: I): DVVTriplet { + fromPartial(object: Partial): DVVTriplet { const message = createBaseDVVTriplet(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1201,7 +1200,7 @@ export const DVVTriplets = { return obj; }, - fromPartial, I>>(object: I): DVVTriplets { + fromPartial(object: Partial): DVVTriplets { const message = createBaseDVVTriplets(); message.triplets = object.triplets?.map((e) => DVVTriplet.fromPartial(e)) || []; return message; @@ -1279,7 +1278,7 @@ export const Delegation = { return obj; }, - fromPartial, I>>(object: I): Delegation { + fromPartial(object: Partial): Delegation { const message = createBaseDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1367,7 +1366,7 @@ export const UnbondingDelegation = { return obj; }, - fromPartial, I>>(object: I): UnbondingDelegation { + fromPartial(object: Partial): UnbondingDelegation { const message = createBaseUnbondingDelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -1460,9 +1459,7 @@ export const UnbondingDelegationEntry = { return obj; }, - fromPartial, I>>( - object: I, - ): UnbondingDelegationEntry { + fromPartial(object: Partial): UnbondingDelegationEntry { const message = createBaseUnbondingDelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1562,7 +1559,7 @@ export const RedelegationEntry = { return obj; }, - fromPartial, I>>(object: I): RedelegationEntry { + fromPartial(object: Partial): RedelegationEntry { const message = createBaseRedelegationEntry(); message.creationHeight = object.creationHeight !== undefined && object.creationHeight !== null @@ -1668,7 +1665,7 @@ export const Redelegation = { return obj; }, - fromPartial, I>>(object: I): Redelegation { + fromPartial(object: Partial): Redelegation { const message = createBaseRedelegation(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -1773,7 +1770,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.unbondingTime = object.unbondingTime !== undefined && object.unbondingTime !== null @@ -1849,7 +1846,7 @@ export const DelegationResponse = { return obj; }, - fromPartial, I>>(object: I): DelegationResponse { + fromPartial(object: Partial): DelegationResponse { const message = createBaseDelegationResponse(); message.delegation = object.delegation !== undefined && object.delegation !== null @@ -1926,9 +1923,7 @@ export const RedelegationEntryResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): RedelegationEntryResponse { + fromPartial(object: Partial): RedelegationEntryResponse { const message = createBaseRedelegationEntryResponse(); message.redelegationEntry = object.redelegationEntry !== undefined && object.redelegationEntry !== null @@ -2008,7 +2003,7 @@ export const RedelegationResponse = { return obj; }, - fromPartial, I>>(object: I): RedelegationResponse { + fromPartial(object: Partial): RedelegationResponse { const message = createBaseRedelegationResponse(); message.redelegation = object.redelegation !== undefined && object.redelegation !== null @@ -2079,7 +2074,7 @@ export const Pool = { return obj; }, - fromPartial, I>>(object: I): Pool { + fromPartial(object: Partial): Pool { const message = createBasePool(); message.notBondedTokens = object.notBondedTokens ?? ""; message.bondedTokens = object.bondedTokens ?? ""; diff --git a/src/cosmos/staking/v1beta1/tx.ts b/src/cosmos/staking/v1beta1/tx.ts index 54f869ee..6cc2a088 100644 --- a/src/cosmos/staking/v1beta1/tx.ts +++ b/src/cosmos/staking/v1beta1/tx.ts @@ -1,11 +1,10 @@ -//@ts-nocheck /* eslint-disable */ import { Description, CommissionRates } from "./staking"; import { Any } from "../../../google/protobuf/any"; import { Coin } from "../../base/v1beta1/coin"; import { Timestamp } from "../../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; +import { isSet, fromJsonTimestamp, fromTimestamp, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.staking.v1beta1"; /** MsgCreateValidator defines a SDK message for creating a new validator. */ @@ -201,7 +200,7 @@ export const MsgCreateValidator = { return obj; }, - fromPartial, I>>(object: I): MsgCreateValidator { + fromPartial(object: Partial): MsgCreateValidator { const message = createBaseMsgCreateValidator(); message.description = object.description !== undefined && object.description !== null @@ -258,7 +257,7 @@ export const MsgCreateValidatorResponse = { return obj; }, - fromPartial, I>>(_: I): MsgCreateValidatorResponse { + fromPartial(_: Partial): MsgCreateValidatorResponse { const message = createBaseMsgCreateValidatorResponse(); return message; }, @@ -347,7 +346,7 @@ export const MsgEditValidator = { return obj; }, - fromPartial, I>>(object: I): MsgEditValidator { + fromPartial(object: Partial): MsgEditValidator { const message = createBaseMsgEditValidator(); message.description = object.description !== undefined && object.description !== null @@ -396,7 +395,7 @@ export const MsgEditValidatorResponse = { return obj; }, - fromPartial, I>>(_: I): MsgEditValidatorResponse { + fromPartial(_: Partial): MsgEditValidatorResponse { const message = createBaseMsgEditValidatorResponse(); return message; }, @@ -473,7 +472,7 @@ export const MsgDelegate = { return obj; }, - fromPartial, I>>(object: I): MsgDelegate { + fromPartial(object: Partial): MsgDelegate { const message = createBaseMsgDelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -519,7 +518,7 @@ export const MsgDelegateResponse = { return obj; }, - fromPartial, I>>(_: I): MsgDelegateResponse { + fromPartial(_: Partial): MsgDelegateResponse { const message = createBaseMsgDelegateResponse(); return message; }, @@ -607,7 +606,7 @@ export const MsgBeginRedelegate = { return obj; }, - fromPartial, I>>(object: I): MsgBeginRedelegate { + fromPartial(object: Partial): MsgBeginRedelegate { const message = createBaseMsgBeginRedelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorSrcAddress = object.validatorSrcAddress ?? ""; @@ -668,9 +667,7 @@ export const MsgBeginRedelegateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgBeginRedelegateResponse { + fromPartial(object: Partial): MsgBeginRedelegateResponse { const message = createBaseMsgBeginRedelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null @@ -751,7 +748,7 @@ export const MsgUndelegate = { return obj; }, - fromPartial, I>>(object: I): MsgUndelegate { + fromPartial(object: Partial): MsgUndelegate { const message = createBaseMsgUndelegate(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; @@ -811,7 +808,7 @@ export const MsgUndelegateResponse = { return obj; }, - fromPartial, I>>(object: I): MsgUndelegateResponse { + fromPartial(object: Partial): MsgUndelegateResponse { const message = createBaseMsgUndelegateResponse(); message.completionTime = object.completionTime !== undefined && object.completionTime !== null diff --git a/src/cosmos/tx/signing/v1beta1/signing.ts b/src/cosmos/tx/signing/v1beta1/signing.ts index d4164184..8b855088 100644 --- a/src/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/cosmos/tx/signing/v1beta1/signing.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { CompactBitArray } from "../../../crypto/multisig/v1beta1/multisig"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "cosmos.tx.signing.v1beta1"; /** SignMode represents a signing mode with its own security guarantees. */ @@ -208,7 +207,7 @@ export const SignatureDescriptors = { return obj; }, - fromPartial, I>>(object: I): SignatureDescriptors { + fromPartial(object: Partial): SignatureDescriptors { const message = createBaseSignatureDescriptors(); message.signatures = object.signatures?.map((e) => SignatureDescriptor.fromPartial(e)) || []; return message; @@ -288,7 +287,7 @@ export const SignatureDescriptor = { return obj; }, - fromPartial, I>>(object: I): SignatureDescriptor { + fromPartial(object: Partial): SignatureDescriptor { const message = createBaseSignatureDescriptor(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -368,9 +367,7 @@ export const SignatureDescriptor_Data = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data { + fromPartial(object: Partial): SignatureDescriptor_Data { const message = createBaseSignatureDescriptor_Data(); message.single = object.single !== undefined && object.single !== null @@ -447,9 +444,7 @@ export const SignatureDescriptor_Data_Single = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data_Single { + fromPartial(object: Partial): SignatureDescriptor_Data_Single { const message = createBaseSignatureDescriptor_Data_Single(); message.mode = object.mode ?? 0; message.signature = object.signature ?? new Uint8Array(); @@ -526,9 +521,7 @@ export const SignatureDescriptor_Data_Multi = { return obj; }, - fromPartial, I>>( - object: I, - ): SignatureDescriptor_Data_Multi { + fromPartial(object: Partial): SignatureDescriptor_Data_Multi { const message = createBaseSignatureDescriptor_Data_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index db1d8248..ba87c0fe 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; @@ -6,7 +5,7 @@ import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; import { BlockID } from "../../../tendermint/types/types"; import { Block } from "../../../tendermint/types/block"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ @@ -331,7 +330,7 @@ export const GetTxsEventRequest = { return obj; }, - fromPartial, I>>(object: I): GetTxsEventRequest { + fromPartial(object: Partial): GetTxsEventRequest { const message = createBaseGetTxsEventRequest(); message.events = object.events?.map((e) => e) || []; message.pagination = @@ -428,7 +427,7 @@ export const GetTxsEventResponse = { return obj; }, - fromPartial, I>>(object: I): GetTxsEventResponse { + fromPartial(object: Partial): GetTxsEventResponse { const message = createBaseGetTxsEventResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.txResponses = object.txResponses?.map((e) => TxResponse.fromPartial(e)) || []; @@ -501,7 +500,7 @@ export const BroadcastTxRequest = { return obj; }, - fromPartial, I>>(object: I): BroadcastTxRequest { + fromPartial(object: Partial): BroadcastTxRequest { const message = createBaseBroadcastTxRequest(); message.txBytes = object.txBytes ?? new Uint8Array(); message.mode = object.mode ?? 0; @@ -559,7 +558,7 @@ export const BroadcastTxResponse = { return obj; }, - fromPartial, I>>(object: I): BroadcastTxResponse { + fromPartial(object: Partial): BroadcastTxResponse { const message = createBaseBroadcastTxResponse(); message.txResponse = object.txResponse !== undefined && object.txResponse !== null @@ -630,7 +629,7 @@ export const SimulateRequest = { return obj; }, - fromPartial, I>>(object: I): SimulateRequest { + fromPartial(object: Partial): SimulateRequest { const message = createBaseSimulateRequest(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txBytes = object.txBytes ?? new Uint8Array(); @@ -699,7 +698,7 @@ export const SimulateResponse = { return obj; }, - fromPartial, I>>(object: I): SimulateResponse { + fromPartial(object: Partial): SimulateResponse { const message = createBaseSimulateResponse(); message.gasInfo = object.gasInfo !== undefined && object.gasInfo !== null @@ -760,7 +759,7 @@ export const GetTxRequest = { return obj; }, - fromPartial, I>>(object: I): GetTxRequest { + fromPartial(object: Partial): GetTxRequest { const message = createBaseGetTxRequest(); message.hash = object.hash ?? ""; return message; @@ -828,7 +827,7 @@ export const GetTxResponse = { return obj; }, - fromPartial, I>>(object: I): GetTxResponse { + fromPartial(object: Partial): GetTxResponse { const message = createBaseGetTxResponse(); message.tx = object.tx !== undefined && object.tx !== null ? Tx.fromPartial(object.tx) : undefined; message.txResponse = @@ -900,7 +899,7 @@ export const GetBlockWithTxsRequest = { return obj; }, - fromPartial, I>>(object: I): GetBlockWithTxsRequest { + fromPartial(object: Partial): GetBlockWithTxsRequest { const message = createBaseGetBlockWithTxsRequest(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1002,7 +1001,7 @@ export const GetBlockWithTxsResponse = { return obj; }, - fromPartial, I>>(object: I): GetBlockWithTxsResponse { + fromPartial(object: Partial): GetBlockWithTxsResponse { const message = createBaseGetBlockWithTxsResponse(); message.txs = object.txs?.map((e) => Tx.fromPartial(e)) || []; message.blockId = diff --git a/src/cosmos/tx/v1beta1/tx.ts b/src/cosmos/tx/v1beta1/tx.ts index 26ee4fdb..23cd689f 100644 --- a/src/cosmos/tx/v1beta1/tx.ts +++ b/src/cosmos/tx/v1beta1/tx.ts @@ -1,11 +1,10 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import { SignMode, signModeFromJSON, signModeToJSON } from "../signing/v1beta1/signing"; import { CompactBitArray } from "../../crypto/multisig/v1beta1/multisig"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmos.tx.v1beta1"; /** Tx is the standard type used for broadcasting transactions. */ @@ -310,7 +309,7 @@ export const Tx = { return obj; }, - fromPartial, I>>(object: I): Tx { + fromPartial(object: Partial): Tx { const message = createBaseTx(); message.body = object.body !== undefined && object.body !== null ? TxBody.fromPartial(object.body) : undefined; @@ -408,7 +407,7 @@ export const TxRaw = { return obj; }, - fromPartial, I>>(object: I): TxRaw { + fromPartial(object: Partial): TxRaw { const message = createBaseTxRaw(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -506,7 +505,7 @@ export const SignDoc = { return obj; }, - fromPartial, I>>(object: I): SignDoc { + fromPartial(object: Partial): SignDoc { const message = createBaseSignDoc(); message.bodyBytes = object.bodyBytes ?? new Uint8Array(); message.authInfoBytes = object.authInfoBytes ?? new Uint8Array(); @@ -636,7 +635,7 @@ export const TxBody = { return obj; }, - fromPartial, I>>(object: I): TxBody { + fromPartial(object: Partial): TxBody { const message = createBaseTxBody(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; message.memo = object.memo ?? ""; @@ -719,7 +718,7 @@ export const AuthInfo = { return obj; }, - fromPartial, I>>(object: I): AuthInfo { + fromPartial(object: Partial): AuthInfo { const message = createBaseAuthInfo(); message.signerInfos = object.signerInfos?.map((e) => SignerInfo.fromPartial(e)) || []; message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined; @@ -800,7 +799,7 @@ export const SignerInfo = { return obj; }, - fromPartial, I>>(object: I): SignerInfo { + fromPartial(object: Partial): SignerInfo { const message = createBaseSignerInfo(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -880,7 +879,7 @@ export const ModeInfo = { return obj; }, - fromPartial, I>>(object: I): ModeInfo { + fromPartial(object: Partial): ModeInfo { const message = createBaseModeInfo(); message.single = object.single !== undefined && object.single !== null @@ -943,7 +942,7 @@ export const ModeInfo_Single = { return obj; }, - fromPartial, I>>(object: I): ModeInfo_Single { + fromPartial(object: Partial): ModeInfo_Single { const message = createBaseModeInfo_Single(); message.mode = object.mode ?? 0; return message; @@ -1019,7 +1018,7 @@ export const ModeInfo_Multi = { return obj; }, - fromPartial, I>>(object: I): ModeInfo_Multi { + fromPartial(object: Partial): ModeInfo_Multi { const message = createBaseModeInfo_Multi(); message.bitarray = object.bitarray !== undefined && object.bitarray !== null @@ -1118,7 +1117,7 @@ export const Fee = { return obj; }, - fromPartial, I>>(object: I): Fee { + fromPartial(object: Partial): Fee { const message = createBaseFee(); message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || []; message.gasLimit = diff --git a/src/cosmos/upgrade/v1beta1/query.ts b/src/cosmos/upgrade/v1beta1/query.ts index 3bc75d65..4f790341 100644 --- a/src/cosmos/upgrade/v1beta1/query.ts +++ b/src/cosmos/upgrade/v1beta1/query.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Plan, ModuleVersion } from "./upgrade"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** * QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -125,7 +124,7 @@ export const QueryCurrentPlanRequest = { return obj; }, - fromPartial, I>>(_: I): QueryCurrentPlanRequest { + fromPartial(_: Partial): QueryCurrentPlanRequest { const message = createBaseQueryCurrentPlanRequest(); return message; }, @@ -180,9 +179,7 @@ export const QueryCurrentPlanResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryCurrentPlanResponse { + fromPartial(object: Partial): QueryCurrentPlanResponse { const message = createBaseQueryCurrentPlanResponse(); message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined; @@ -239,7 +236,7 @@ export const QueryAppliedPlanRequest = { return obj; }, - fromPartial, I>>(object: I): QueryAppliedPlanRequest { + fromPartial(object: Partial): QueryAppliedPlanRequest { const message = createBaseQueryAppliedPlanRequest(); message.name = object.name ?? ""; return message; @@ -295,9 +292,7 @@ export const QueryAppliedPlanResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAppliedPlanResponse { + fromPartial(object: Partial): QueryAppliedPlanResponse { const message = createBaseQueryAppliedPlanResponse(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -354,9 +349,7 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateRequest { + fromPartial(object: Partial): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); message.lastHeight = object.lastHeight !== undefined && object.lastHeight !== null @@ -420,9 +413,7 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateResponse { + fromPartial(object: Partial): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState ?? new Uint8Array(); return message; @@ -478,9 +469,7 @@ export const QueryModuleVersionsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryModuleVersionsRequest { + fromPartial(object: Partial): QueryModuleVersionsRequest { const message = createBaseQueryModuleVersionsRequest(); message.moduleName = object.moduleName ?? ""; return message; @@ -544,9 +533,7 @@ export const QueryModuleVersionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryModuleVersionsResponse { + fromPartial(object: Partial): QueryModuleVersionsResponse { const message = createBaseQueryModuleVersionsResponse(); message.moduleVersions = object.moduleVersions?.map((e) => ModuleVersion.fromPartial(e)) || []; return message; diff --git a/src/cosmos/upgrade/v1beta1/upgrade.ts b/src/cosmos/upgrade/v1beta1/upgrade.ts index ffaa2080..75747569 100644 --- a/src/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../../google/protobuf/timestamp"; import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, fromJsonTimestamp, fromTimestamp, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, fromJsonTimestamp, fromTimestamp } from "../../../helpers"; export const protobufPackage = "cosmos.upgrade.v1beta1"; /** Plan specifies information about a planned upgrade and when it should occur. */ @@ -180,7 +179,7 @@ export const Plan = { return obj; }, - fromPartial, I>>(object: I): Plan { + fromPartial(object: Partial): Plan { const message = createBasePlan(); message.name = object.name ?? ""; message.time = @@ -267,7 +266,7 @@ export const SoftwareUpgradeProposal = { return obj; }, - fromPartial, I>>(object: I): SoftwareUpgradeProposal { + fromPartial(object: Partial): SoftwareUpgradeProposal { const message = createBaseSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -337,9 +336,7 @@ export const CancelSoftwareUpgradeProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): CancelSoftwareUpgradeProposal { + fromPartial(object: Partial): CancelSoftwareUpgradeProposal { const message = createBaseCancelSoftwareUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -407,7 +404,7 @@ export const ModuleVersion = { return obj; }, - fromPartial, I>>(object: I): ModuleVersion { + fromPartial(object: Partial): ModuleVersion { const message = createBaseModuleVersion(); message.name = object.name ?? ""; message.version = diff --git a/src/cosmos/vesting/v1beta1/tx.ts b/src/cosmos/vesting/v1beta1/tx.ts index 2e62ae5c..9464d8b7 100644 --- a/src/cosmos/vesting/v1beta1/tx.ts +++ b/src/cosmos/vesting/v1beta1/tx.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../helpers"; +import { Long, isSet, Rpc } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * MsgCreateVestingAccount defines a message that enables creating a vesting @@ -119,7 +118,7 @@ export const MsgCreateVestingAccount = { return obj; }, - fromPartial, I>>(object: I): MsgCreateVestingAccount { + fromPartial(object: Partial): MsgCreateVestingAccount { const message = createBaseMsgCreateVestingAccount(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; @@ -167,9 +166,7 @@ export const MsgCreateVestingAccountResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgCreateVestingAccountResponse { + fromPartial(_: Partial): MsgCreateVestingAccountResponse { const message = createBaseMsgCreateVestingAccountResponse(); return message; }, diff --git a/src/cosmos/vesting/v1beta1/vesting.ts b/src/cosmos/vesting/v1beta1/vesting.ts index 03f5a6d5..459610a1 100644 --- a/src/cosmos/vesting/v1beta1/vesting.ts +++ b/src/cosmos/vesting/v1beta1/vesting.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../auth/v1beta1/auth"; import { Coin } from "../../base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet } from "../../../helpers"; export const protobufPackage = "cosmos.vesting.v1beta1"; /** * BaseVestingAccount implements the VestingAccount interface. It contains all @@ -179,7 +178,7 @@ export const BaseVestingAccount = { return obj; }, - fromPartial, I>>(object: I): BaseVestingAccount { + fromPartial(object: Partial): BaseVestingAccount { const message = createBaseBaseVestingAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null @@ -259,9 +258,7 @@ export const ContinuousVestingAccount = { return obj; }, - fromPartial, I>>( - object: I, - ): ContinuousVestingAccount { + fromPartial(object: Partial): ContinuousVestingAccount { const message = createBaseContinuousVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -329,7 +326,7 @@ export const DelayedVestingAccount = { return obj; }, - fromPartial, I>>(object: I): DelayedVestingAccount { + fromPartial(object: Partial): DelayedVestingAccount { const message = createBaseDelayedVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -405,7 +402,7 @@ export const Period = { return obj; }, - fromPartial, I>>(object: I): Period { + fromPartial(object: Partial): Period { const message = createBasePeriod(); message.length = object.length !== undefined && object.length !== null ? Long.fromValue(object.length) : Long.ZERO; @@ -498,7 +495,7 @@ export const PeriodicVestingAccount = { return obj; }, - fromPartial, I>>(object: I): PeriodicVestingAccount { + fromPartial(object: Partial): PeriodicVestingAccount { const message = createBasePeriodicVestingAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null @@ -567,7 +564,7 @@ export const PermanentLockedAccount = { return obj; }, - fromPartial, I>>(object: I): PermanentLockedAccount { + fromPartial(object: Partial): PermanentLockedAccount { const message = createBasePermanentLockedAccount(); message.baseVestingAccount = object.baseVestingAccount !== undefined && object.baseVestingAccount !== null diff --git a/src/cosmwasm/wasm/v1/genesis.ts b/src/cosmwasm/wasm/v1/genesis.ts index e3331f54..fdeac3ca 100644 --- a/src/cosmwasm/wasm/v1/genesis.ts +++ b/src/cosmwasm/wasm/v1/genesis.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { MsgStoreCode, MsgInstantiateContract, MsgExecuteContract } from "./tx"; import { Params, CodeInfo, ContractInfo, Model } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** GenesisState - genesis state of x/wasm */ @@ -168,7 +167,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -262,7 +261,7 @@ export const GenesisState_GenMsgs = { return obj; }, - fromPartial, I>>(object: I): GenesisState_GenMsgs { + fromPartial(object: Partial): GenesisState_GenMsgs { const message = createBaseGenesisState_GenMsgs(); message.storeCode = object.storeCode !== undefined && object.storeCode !== null @@ -366,7 +365,7 @@ export const Code = { return obj; }, - fromPartial, I>>(object: I): Code { + fromPartial(object: Partial): Code { const message = createBaseCode(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -460,7 +459,7 @@ export const Contract = { return obj; }, - fromPartial, I>>(object: I): Contract { + fromPartial(object: Partial): Contract { const message = createBaseContract(); message.contractAddress = object.contractAddress ?? ""; message.contractInfo = @@ -533,7 +532,7 @@ export const Sequence = { return obj; }, - fromPartial, I>>(object: I): Sequence { + fromPartial(object: Partial): Sequence { const message = createBaseSequence(); message.idKey = object.idKey ?? new Uint8Array(); message.value = diff --git a/src/cosmwasm/wasm/v1/ibc.ts b/src/cosmwasm/wasm/v1/ibc.ts index c6505e0a..b8e4f046 100644 --- a/src/cosmwasm/wasm/v1/ibc.ts +++ b/src/cosmwasm/wasm/v1/ibc.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgIBCSend */ @@ -118,7 +117,7 @@ export const MsgIBCSend = { return obj; }, - fromPartial, I>>(object: I): MsgIBCSend { + fromPartial(object: Partial): MsgIBCSend { const message = createBaseMsgIBCSend(); message.channel = object.channel ?? ""; message.timeoutHeight = @@ -183,7 +182,7 @@ export const MsgIBCCloseChannel = { return obj; }, - fromPartial, I>>(object: I): MsgIBCCloseChannel { + fromPartial(object: Partial): MsgIBCCloseChannel { const message = createBaseMsgIBCCloseChannel(); message.channel = object.channel ?? ""; return message; diff --git a/src/cosmwasm/wasm/v1/proposal.ts b/src/cosmwasm/wasm/v1/proposal.ts index 0fe4a57e..1b8dddc4 100644 --- a/src/cosmwasm/wasm/v1/proposal.ts +++ b/src/cosmwasm/wasm/v1/proposal.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** StoreCodeProposal gov proposal content type to submit WASM code to the system */ @@ -302,7 +301,7 @@ export const StoreCodeProposal = { return obj; }, - fromPartial, I>>(object: I): StoreCodeProposal { + fromPartial(object: Partial): StoreCodeProposal { const message = createBaseStoreCodeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -449,9 +448,7 @@ export const InstantiateContractProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): InstantiateContractProposal { + fromPartial(object: Partial): InstantiateContractProposal { const message = createBaseInstantiateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -560,7 +557,7 @@ export const MigrateContractProposal = { return obj; }, - fromPartial, I>>(object: I): MigrateContractProposal { + fromPartial(object: Partial): MigrateContractProposal { const message = createBaseMigrateContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -655,7 +652,7 @@ export const SudoContractProposal = { return obj; }, - fromPartial, I>>(object: I): SudoContractProposal { + fromPartial(object: Partial): SudoContractProposal { const message = createBaseSudoContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -776,7 +773,7 @@ export const ExecuteContractProposal = { return obj; }, - fromPartial, I>>(object: I): ExecuteContractProposal { + fromPartial(object: Partial): ExecuteContractProposal { const message = createBaseExecuteContractProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -870,7 +867,7 @@ export const UpdateAdminProposal = { return obj; }, - fromPartial, I>>(object: I): UpdateAdminProposal { + fromPartial(object: Partial): UpdateAdminProposal { const message = createBaseUpdateAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -951,7 +948,7 @@ export const ClearAdminProposal = { return obj; }, - fromPartial, I>>(object: I): ClearAdminProposal { + fromPartial(object: Partial): ClearAdminProposal { const message = createBaseClearAdminProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1049,7 +1046,7 @@ export const PinCodesProposal = { return obj; }, - fromPartial, I>>(object: I): PinCodesProposal { + fromPartial(object: Partial): PinCodesProposal { const message = createBasePinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1147,7 +1144,7 @@ export const UnpinCodesProposal = { return obj; }, - fromPartial, I>>(object: I): UnpinCodesProposal { + fromPartial(object: Partial): UnpinCodesProposal { const message = createBaseUnpinCodesProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -1221,7 +1218,7 @@ export const AccessConfigUpdate = { return obj; }, - fromPartial, I>>(object: I): AccessConfigUpdate { + fromPartial(object: Partial): AccessConfigUpdate { const message = createBaseAccessConfigUpdate(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1314,9 +1311,7 @@ export const UpdateInstantiateConfigProposal = { return obj; }, - fromPartial, I>>( - object: I, - ): UpdateInstantiateConfigProposal { + fromPartial(object: Partial): UpdateInstantiateConfigProposal { const message = createBaseUpdateInstantiateConfigProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; diff --git a/src/cosmwasm/wasm/v1/query.ts b/src/cosmwasm/wasm/v1/query.ts index 8191a507..e799800c 100644 --- a/src/cosmwasm/wasm/v1/query.ts +++ b/src/cosmwasm/wasm/v1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { ContractInfo, ContractCodeHistoryEntry, Model, AccessConfig } from "./types"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** * QueryContractInfoRequest is the request type for the Query/ContractInfo RPC @@ -239,9 +238,7 @@ export const QueryContractInfoRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractInfoRequest { + fromPartial(object: Partial): QueryContractInfoRequest { const message = createBaseQueryContractInfoRequest(); message.address = object.address ?? ""; return message; @@ -309,9 +306,7 @@ export const QueryContractInfoResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractInfoResponse { + fromPartial(object: Partial): QueryContractInfoResponse { const message = createBaseQueryContractInfoResponse(); message.address = object.address ?? ""; message.contractInfo = @@ -383,9 +378,7 @@ export const QueryContractHistoryRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractHistoryRequest { + fromPartial(object: Partial): QueryContractHistoryRequest { const message = createBaseQueryContractHistoryRequest(); message.address = object.address ?? ""; message.pagination = @@ -465,9 +458,7 @@ export const QueryContractHistoryResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractHistoryResponse { + fromPartial(object: Partial): QueryContractHistoryResponse { const message = createBaseQueryContractHistoryResponse(); message.entries = object.entries?.map((e) => ContractCodeHistoryEntry.fromPartial(e)) || []; message.pagination = @@ -539,9 +530,7 @@ export const QueryContractsByCodeRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractsByCodeRequest { + fromPartial(object: Partial): QueryContractsByCodeRequest { const message = createBaseQueryContractsByCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -620,9 +609,7 @@ export const QueryContractsByCodeResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryContractsByCodeResponse { + fromPartial(object: Partial): QueryContractsByCodeResponse { const message = createBaseQueryContractsByCodeResponse(); message.contracts = object.contracts?.map((e) => e) || []; message.pagination = @@ -694,9 +681,7 @@ export const QueryAllContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllContractStateRequest { + fromPartial(object: Partial): QueryAllContractStateRequest { const message = createBaseQueryAllContractStateRequest(); message.address = object.address ?? ""; message.pagination = @@ -774,9 +759,7 @@ export const QueryAllContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryAllContractStateResponse { + fromPartial(object: Partial): QueryAllContractStateResponse { const message = createBaseQueryAllContractStateResponse(); message.models = object.models?.map((e) => Model.fromPartial(e)) || []; message.pagination = @@ -850,9 +833,7 @@ export const QueryRawContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRawContractStateRequest { + fromPartial(object: Partial): QueryRawContractStateRequest { const message = createBaseQueryRawContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -910,9 +891,7 @@ export const QueryRawContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryRawContractStateResponse { + fromPartial(object: Partial): QueryRawContractStateResponse { const message = createBaseQueryRawContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -982,9 +961,7 @@ export const QuerySmartContractStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySmartContractStateRequest { + fromPartial(object: Partial): QuerySmartContractStateRequest { const message = createBaseQuerySmartContractStateRequest(); message.address = object.address ?? ""; message.queryData = object.queryData ?? new Uint8Array(); @@ -1042,9 +1019,7 @@ export const QuerySmartContractStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QuerySmartContractStateResponse { + fromPartial(object: Partial): QuerySmartContractStateResponse { const message = createBaseQuerySmartContractStateResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -1100,7 +1075,7 @@ export const QueryCodeRequest = { return obj; }, - fromPartial, I>>(object: I): QueryCodeRequest { + fromPartial(object: Partial): QueryCodeRequest { const message = createBaseQueryCodeRequest(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1196,7 +1171,7 @@ export const CodeInfoResponse = { return obj; }, - fromPartial, I>>(object: I): CodeInfoResponse { + fromPartial(object: Partial): CodeInfoResponse { const message = createBaseCodeInfoResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -1272,7 +1247,7 @@ export const QueryCodeResponse = { return obj; }, - fromPartial, I>>(object: I): QueryCodeResponse { + fromPartial(object: Partial): QueryCodeResponse { const message = createBaseQueryCodeResponse(); message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null @@ -1333,7 +1308,7 @@ export const QueryCodesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryCodesRequest { + fromPartial(object: Partial): QueryCodesRequest { const message = createBaseQueryCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1412,7 +1387,7 @@ export const QueryCodesResponse = { return obj; }, - fromPartial, I>>(object: I): QueryCodesResponse { + fromPartial(object: Partial): QueryCodesResponse { const message = createBaseQueryCodesResponse(); message.codeInfos = object.codeInfos?.map((e) => CodeInfoResponse.fromPartial(e)) || []; message.pagination = @@ -1473,7 +1448,7 @@ export const QueryPinnedCodesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryPinnedCodesRequest { + fromPartial(object: Partial): QueryPinnedCodesRequest { const message = createBaseQueryPinnedCodesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -1563,9 +1538,7 @@ export const QueryPinnedCodesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPinnedCodesResponse { + fromPartial(object: Partial): QueryPinnedCodesResponse { const message = createBaseQueryPinnedCodesResponse(); message.codeIds = object.codeIds?.map((e) => Long.fromValue(e)) || []; message.pagination = diff --git a/src/cosmwasm/wasm/v1/tx.ts b/src/cosmwasm/wasm/v1/tx.ts index b435c1bd..b407391b 100644 --- a/src/cosmwasm/wasm/v1/tx.ts +++ b/src/cosmwasm/wasm/v1/tx.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { AccessConfig } from "./types"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact, Long, Rpc } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** MsgStoreCode submit Wasm code to the system */ @@ -211,7 +210,7 @@ export const MsgStoreCode = { return obj; }, - fromPartial, I>>(object: I): MsgStoreCode { + fromPartial(object: Partial): MsgStoreCode { const message = createBaseMsgStoreCode(); message.sender = object.sender ?? ""; message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(); @@ -272,7 +271,7 @@ export const MsgStoreCodeResponse = { return obj; }, - fromPartial, I>>(object: I): MsgStoreCodeResponse { + fromPartial(object: Partial): MsgStoreCodeResponse { const message = createBaseMsgStoreCodeResponse(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -391,7 +390,7 @@ export const MsgInstantiateContract = { return obj; }, - fromPartial, I>>(object: I): MsgInstantiateContract { + fromPartial(object: Partial): MsgInstantiateContract { const message = createBaseMsgInstantiateContract(); message.sender = object.sender ?? ""; message.admin = object.admin ?? ""; @@ -465,9 +464,7 @@ export const MsgInstantiateContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgInstantiateContractResponse { + fromPartial(object: Partial): MsgInstantiateContractResponse { const message = createBaseMsgInstantiateContractResponse(); message.address = object.address ?? ""; message.data = object.data ?? new Uint8Array(); @@ -564,7 +561,7 @@ export const MsgExecuteContract = { return obj; }, - fromPartial, I>>(object: I): MsgExecuteContract { + fromPartial(object: Partial): MsgExecuteContract { const message = createBaseMsgExecuteContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -624,9 +621,7 @@ export const MsgExecuteContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgExecuteContractResponse { + fromPartial(object: Partial): MsgExecuteContractResponse { const message = createBaseMsgExecuteContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -716,7 +711,7 @@ export const MsgMigrateContract = { return obj; }, - fromPartial, I>>(object: I): MsgMigrateContract { + fromPartial(object: Partial): MsgMigrateContract { const message = createBaseMsgMigrateContract(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -777,9 +772,7 @@ export const MsgMigrateContractResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgMigrateContractResponse { + fromPartial(object: Partial): MsgMigrateContractResponse { const message = createBaseMsgMigrateContractResponse(); message.data = object.data ?? new Uint8Array(); return message; @@ -857,7 +850,7 @@ export const MsgUpdateAdmin = { return obj; }, - fromPartial, I>>(object: I): MsgUpdateAdmin { + fromPartial(object: Partial): MsgUpdateAdmin { const message = createBaseMsgUpdateAdmin(); message.sender = object.sender ?? ""; message.newAdmin = object.newAdmin ?? ""; @@ -902,7 +895,7 @@ export const MsgUpdateAdminResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpdateAdminResponse { + fromPartial(_: Partial): MsgUpdateAdminResponse { const message = createBaseMsgUpdateAdminResponse(); return message; }, @@ -968,7 +961,7 @@ export const MsgClearAdmin = { return obj; }, - fromPartial, I>>(object: I): MsgClearAdmin { + fromPartial(object: Partial): MsgClearAdmin { const message = createBaseMsgClearAdmin(); message.sender = object.sender ?? ""; message.contract = object.contract ?? ""; @@ -1012,7 +1005,7 @@ export const MsgClearAdminResponse = { return obj; }, - fromPartial, I>>(_: I): MsgClearAdminResponse { + fromPartial(_: Partial): MsgClearAdminResponse { const message = createBaseMsgClearAdminResponse(); return message; }, diff --git a/src/cosmwasm/wasm/v1/types.ts b/src/cosmwasm/wasm/v1/types.ts index 072dd772..606e4df0 100644 --- a/src/cosmwasm/wasm/v1/types.ts +++ b/src/cosmwasm/wasm/v1/types.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../../helpers"; export const protobufPackage = "cosmwasm.wasm.v1"; /** AccessType permission types */ @@ -266,7 +265,7 @@ export const AccessTypeParam = { return obj; }, - fromPartial, I>>(object: I): AccessTypeParam { + fromPartial(object: Partial): AccessTypeParam { const message = createBaseAccessTypeParam(); message.value = object.value ?? 0; return message; @@ -333,7 +332,7 @@ export const AccessConfig = { return obj; }, - fromPartial, I>>(object: I): AccessConfig { + fromPartial(object: Partial): AccessConfig { const message = createBaseAccessConfig(); message.permission = object.permission ?? 0; message.address = object.address ?? ""; @@ -409,7 +408,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.codeUploadAccess = object.codeUploadAccess !== undefined && object.codeUploadAccess !== null @@ -497,7 +496,7 @@ export const CodeInfo = { return obj; }, - fromPartial, I>>(object: I): CodeInfo { + fromPartial(object: Partial): CodeInfo { const message = createBaseCodeInfo(); message.codeHash = object.codeHash ?? new Uint8Array(); message.creator = object.creator ?? ""; @@ -626,7 +625,7 @@ export const ContractInfo = { return obj; }, - fromPartial, I>>(object: I): ContractInfo { + fromPartial(object: Partial): ContractInfo { const message = createBaseContractInfo(); message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO; @@ -731,9 +730,7 @@ export const ContractCodeHistoryEntry = { return obj; }, - fromPartial, I>>( - object: I, - ): ContractCodeHistoryEntry { + fromPartial(object: Partial): ContractCodeHistoryEntry { const message = createBaseContractCodeHistoryEntry(); message.operation = object.operation ?? 0; message.codeId = @@ -807,7 +804,7 @@ export const AbsoluteTxPosition = { return obj; }, - fromPartial, I>>(object: I): AbsoluteTxPosition { + fromPartial(object: Partial): AbsoluteTxPosition { const message = createBaseAbsoluteTxPosition(); message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null @@ -881,7 +878,7 @@ export const Model = { return obj; }, - fromPartial, I>>(object: I): Model { + fromPartial(object: Partial): Model { const message = createBaseModel(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); diff --git a/src/google/api/http.ts b/src/google/api/http.ts index b8003c85..6f5c1e14 100644 --- a/src/google/api/http.ts +++ b/src/google/api/http.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../helpers"; +import { isSet } from "../../helpers"; export const protobufPackage = "google.api"; /** * Defines the HTTP configuration for an API service. It contains a list of @@ -379,7 +378,7 @@ export const Http = { return obj; }, - fromPartial(object: DeepPartial): Http { + fromPartial(object: Partial): Http { const message = createBaseHttp(); message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || []; message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; @@ -544,7 +543,7 @@ export const HttpRule = { return obj; }, - fromPartial(object: DeepPartial): HttpRule { + fromPartial(object: Partial): HttpRule { const message = createBaseHttpRule(); message.selector = object.selector ?? ""; message.get = object.get ?? undefined; @@ -623,7 +622,7 @@ export const CustomHttpPattern = { return obj; }, - fromPartial(object: DeepPartial): CustomHttpPattern { + fromPartial(object: Partial): CustomHttpPattern { const message = createBaseCustomHttpPattern(); message.kind = object.kind ?? ""; message.path = object.path ?? ""; diff --git a/src/google/protobuf/any.ts b/src/google/protobuf/any.ts index d2e50811..b7e3f612 100644 --- a/src/google/protobuf/any.ts +++ b/src/google/protobuf/any.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * `Any` contains an arbitrary serialized protocol buffer message along with a @@ -182,7 +181,7 @@ export const Any = { return obj; }, - fromPartial(object: DeepPartial): Any { + fromPartial(object: Partial): Any { const message = createBaseAny(); message.typeUrl = object.typeUrl ?? ""; message.value = object.value ?? new Uint8Array(); diff --git a/src/google/protobuf/descriptor.ts b/src/google/protobuf/descriptor.ts index 44886a0c..e14c8700 100644 --- a/src/google/protobuf/descriptor.ts +++ b/src/google/protobuf/descriptor.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "google.protobuf"; export enum FieldDescriptorProto_Type { /** @@ -1256,7 +1255,7 @@ export const FileDescriptorSet = { return obj; }, - fromPartial(object: DeepPartial): FileDescriptorSet { + fromPartial(object: Partial): FileDescriptorSet { const message = createBaseFileDescriptorSet(); message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; return message; @@ -1512,7 +1511,7 @@ export const FileDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): FileDescriptorProto { + fromPartial(object: Partial): FileDescriptorProto { const message = createBaseFileDescriptorProto(); message.name = object.name ?? ""; message.package = object.package ?? ""; @@ -1745,7 +1744,7 @@ export const DescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): DescriptorProto { + fromPartial(object: Partial): DescriptorProto { const message = createBaseDescriptorProto(); message.name = object.name ?? ""; message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; @@ -1838,7 +1837,7 @@ export const DescriptorProto_ExtensionRange = { return obj; }, - fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { + fromPartial(object: Partial): DescriptorProto_ExtensionRange { const message = createBaseDescriptorProto_ExtensionRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -1910,7 +1909,7 @@ export const DescriptorProto_ReservedRange = { return obj; }, - fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { + fromPartial(object: Partial): DescriptorProto_ReservedRange { const message = createBaseDescriptorProto_ReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -1977,7 +1976,7 @@ export const ExtensionRangeOptions = { return obj; }, - fromPartial(object: DeepPartial): ExtensionRangeOptions { + fromPartial(object: Partial): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; @@ -1989,8 +1988,8 @@ function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { name: "", number: 0, - label: 0, - type: 0, + label: 1, + type: 1, typeName: "", extendee: "", defaultValue: "", @@ -2010,11 +2009,11 @@ export const FieldDescriptorProto = { writer.uint32(24).int32(message.number); } - if (message.label !== 0) { + if (message.label !== 1) { writer.uint32(32).int32(message.label); } - if (message.type !== 0) { + if (message.type !== 1) { writer.uint32(40).int32(message.type); } @@ -2134,12 +2133,12 @@ export const FieldDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): FieldDescriptorProto { + fromPartial(object: Partial): FieldDescriptorProto { const message = createBaseFieldDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; - message.label = object.label ?? 0; - message.type = object.type ?? 0; + message.label = object.label ?? 1; + message.type = object.type ?? 1; message.typeName = object.typeName ?? ""; message.extendee = object.extendee ?? ""; message.defaultValue = object.defaultValue ?? ""; @@ -2214,7 +2213,7 @@ export const OneofDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): OneofDescriptorProto { + fromPartial(object: Partial): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); message.name = object.name ?? ""; message.options = @@ -2342,7 +2341,7 @@ export const EnumDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): EnumDescriptorProto { + fromPartial(object: Partial): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); message.name = object.name ?? ""; message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; @@ -2420,9 +2419,7 @@ export const EnumDescriptorProto_EnumReservedRange = { return obj; }, - fromPartial( - object: DeepPartial, - ): EnumDescriptorProto_EnumReservedRange { + fromPartial(object: Partial): EnumDescriptorProto_EnumReservedRange { const message = createBaseEnumDescriptorProto_EnumReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -2502,7 +2499,7 @@ export const EnumValueDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): EnumValueDescriptorProto { + fromPartial(object: Partial): EnumValueDescriptorProto { const message = createBaseEnumValueDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; @@ -2594,7 +2591,7 @@ export const ServiceDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): ServiceDescriptorProto { + fromPartial(object: Partial): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); message.name = object.name ?? ""; message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; @@ -2711,7 +2708,7 @@ export const MethodDescriptorProto = { return obj; }, - fromPartial(object: DeepPartial): MethodDescriptorProto { + fromPartial(object: Partial): MethodDescriptorProto { const message = createBaseMethodDescriptorProto(); message.name = object.name ?? ""; message.inputType = object.inputType ?? ""; @@ -2733,7 +2730,7 @@ function createBaseFileOptions(): FileOptions { javaMultipleFiles: false, javaGenerateEqualsAndHash: false, javaStringCheckUtf8: false, - optimizeFor: 0, + optimizeFor: 1, goPackage: "", ccGenericServices: false, javaGenericServices: false, @@ -2774,7 +2771,7 @@ export const FileOptions = { writer.uint32(216).bool(message.javaStringCheckUtf8); } - if (message.optimizeFor !== 0) { + if (message.optimizeFor !== 1) { writer.uint32(72).int32(message.optimizeFor); } @@ -3009,14 +3006,14 @@ export const FileOptions = { return obj; }, - fromPartial(object: DeepPartial): FileOptions { + fromPartial(object: Partial): FileOptions { const message = createBaseFileOptions(); message.javaPackage = object.javaPackage ?? ""; message.javaOuterClassname = object.javaOuterClassname ?? ""; message.javaMultipleFiles = object.javaMultipleFiles ?? false; message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 0; + message.optimizeFor = object.optimizeFor ?? 1; message.goPackage = object.goPackage ?? ""; message.ccGenericServices = object.ccGenericServices ?? false; message.javaGenericServices = object.javaGenericServices ?? false; @@ -3143,7 +3140,7 @@ export const MessageOptions = { return obj; }, - fromPartial(object: DeepPartial): MessageOptions { + fromPartial(object: Partial): MessageOptions { const message = createBaseMessageOptions(); message.messageSetWireFormat = object.messageSetWireFormat ?? false; message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; @@ -3157,9 +3154,9 @@ export const MessageOptions = { function createBaseFieldOptions(): FieldOptions { return { - ctype: 0, + ctype: 1, packed: false, - jstype: 0, + jstype: 1, lazy: false, deprecated: false, weak: false, @@ -3169,7 +3166,7 @@ function createBaseFieldOptions(): FieldOptions { export const FieldOptions = { encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.ctype !== 0) { + if (message.ctype !== 1) { writer.uint32(8).int32(message.ctype); } @@ -3177,7 +3174,7 @@ export const FieldOptions = { writer.uint32(16).bool(message.packed); } - if (message.jstype !== 0) { + if (message.jstype !== 1) { writer.uint32(48).int32(message.jstype); } @@ -3280,11 +3277,11 @@ export const FieldOptions = { return obj; }, - fromPartial(object: DeepPartial): FieldOptions { + fromPartial(object: Partial): FieldOptions { const message = createBaseFieldOptions(); - message.ctype = object.ctype ?? 0; + message.ctype = object.ctype ?? 1; message.packed = object.packed ?? false; - message.jstype = object.jstype ?? 0; + message.jstype = object.jstype ?? 1; message.lazy = object.lazy ?? false; message.deprecated = object.deprecated ?? false; message.weak = object.weak ?? false; @@ -3353,7 +3350,7 @@ export const OneofOptions = { return obj; }, - fromPartial(object: DeepPartial): OneofOptions { + fromPartial(object: Partial): OneofOptions { const message = createBaseOneofOptions(); message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; @@ -3442,7 +3439,7 @@ export const EnumOptions = { return obj; }, - fromPartial(object: DeepPartial): EnumOptions { + fromPartial(object: Partial): EnumOptions { const message = createBaseEnumOptions(); message.allowAlias = object.allowAlias ?? false; message.deprecated = object.deprecated ?? false; @@ -3522,7 +3519,7 @@ export const EnumValueOptions = { return obj; }, - fromPartial(object: DeepPartial): EnumValueOptions { + fromPartial(object: Partial): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; message.uninterpretedOption = @@ -3601,7 +3598,7 @@ export const ServiceOptions = { return obj; }, - fromPartial(object: DeepPartial): ServiceOptions { + fromPartial(object: Partial): ServiceOptions { const message = createBaseServiceOptions(); message.deprecated = object.deprecated ?? false; message.uninterpretedOption = @@ -3613,7 +3610,7 @@ export const ServiceOptions = { function createBaseMethodOptions(): MethodOptions { return { deprecated: false, - idempotencyLevel: 0, + idempotencyLevel: 1, uninterpretedOption: [], }; } @@ -3624,7 +3621,7 @@ export const MethodOptions = { writer.uint32(264).bool(message.deprecated); } - if (message.idempotencyLevel !== 0) { + if (message.idempotencyLevel !== 1) { writer.uint32(272).int32(message.idempotencyLevel); } @@ -3694,10 +3691,10 @@ export const MethodOptions = { return obj; }, - fromPartial(object: DeepPartial): MethodOptions { + fromPartial(object: Partial): MethodOptions { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; - message.idempotencyLevel = object.idempotencyLevel ?? 0; + message.idempotencyLevel = object.idempotencyLevel ?? 1; message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; @@ -3832,7 +3829,7 @@ export const UninterpretedOption = { return obj; }, - fromPartial(object: DeepPartial): UninterpretedOption { + fromPartial(object: Partial): UninterpretedOption { const message = createBaseUninterpretedOption(); message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; message.identifierValue = object.identifierValue ?? ""; @@ -3911,7 +3908,7 @@ export const UninterpretedOption_NamePart = { return obj; }, - fromPartial(object: DeepPartial): UninterpretedOption_NamePart { + fromPartial(object: Partial): UninterpretedOption_NamePart { const message = createBaseUninterpretedOption_NamePart(); message.namePart = object.namePart ?? ""; message.isExtension = object.isExtension ?? false; @@ -3976,7 +3973,7 @@ export const SourceCodeInfo = { return obj; }, - fromPartial(object: DeepPartial): SourceCodeInfo { + fromPartial(object: Partial): SourceCodeInfo { const message = createBaseSourceCodeInfo(); message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; return message; @@ -4120,7 +4117,7 @@ export const SourceCodeInfo_Location = { return obj; }, - fromPartial(object: DeepPartial): SourceCodeInfo_Location { + fromPartial(object: Partial): SourceCodeInfo_Location { const message = createBaseSourceCodeInfo_Location(); message.path = object.path?.map((e) => e) || []; message.span = object.span?.map((e) => e) || []; @@ -4190,7 +4187,7 @@ export const GeneratedCodeInfo = { return obj; }, - fromPartial(object: DeepPartial): GeneratedCodeInfo { + fromPartial(object: Partial): GeneratedCodeInfo { const message = createBaseGeneratedCodeInfo(); message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; return message; @@ -4298,7 +4295,7 @@ export const GeneratedCodeInfo_Annotation = { return obj; }, - fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { + fromPartial(object: Partial): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); message.path = object.path?.map((e) => e) || []; message.sourceFile = object.sourceFile ?? ""; diff --git a/src/google/protobuf/duration.ts b/src/google/protobuf/duration.ts index 1e254ecc..c0c5ff62 100644 --- a/src/google/protobuf/duration.ts +++ b/src/google/protobuf/duration.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../helpers"; +import { Long, isSet } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * A Duration represents a signed, fixed-length span of time represented @@ -143,7 +142,7 @@ export const Duration = { return obj; }, - fromPartial(object: DeepPartial): Duration { + fromPartial(object: Partial): Duration { const message = createBaseDuration(); message.seconds = object.seconds !== undefined && object.seconds !== null ? Long.fromValue(object.seconds) : Long.ZERO; diff --git a/src/google/protobuf/timestamp.ts b/src/google/protobuf/timestamp.ts index c7154be3..18209e66 100644 --- a/src/google/protobuf/timestamp.ts +++ b/src/google/protobuf/timestamp.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../helpers"; +import { Long, isSet } from "../../helpers"; export const protobufPackage = "google.protobuf"; /** * A Timestamp represents a point in time independent of any time zone or local @@ -165,7 +164,7 @@ export const Timestamp = { return obj; }, - fromPartial(object: DeepPartial): Timestamp { + fromPartial(object: Partial): Timestamp { const message = createBaseTimestamp(); message.seconds = object.seconds !== undefined && object.seconds !== null ? Long.fromValue(object.seconds) : Long.ZERO; diff --git a/src/helpers.ts b/src/helpers.ts index 797f2141..194a12e8 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.61.0 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.66.1 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ @@ -9,6 +8,7 @@ import * as _m0 from "protobufjs/minimal"; import * as Long from "long"; +// @ts-ignore if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; @@ -99,7 +99,7 @@ export function toDuration(duration: string): Duration { } export function fromDuration(duration: Duration): string { - return (parseInt(duration.seconds) * 1000000000 + duration.nanos).toString(); + return (parseInt(duration.seconds.toString()) * 1000000000 + duration.nanos).toString(); } export function isSet(value: any): boolean { @@ -145,11 +145,11 @@ export const setPaginationParams = (options: Params, pagination?: PageRequest) = // Uint8Array to String options.params["pagination.key"] = Buffer.from(pagination.key).toString("base64"); } - if (typeof pagination?.offset !== "undefined") { - options.params["pagination.limit"] = Long.toString(pagination.limit); - } if (typeof pagination?.limit !== "undefined") { - options.params["pagination.offset"] = Long.toString(pagination.offset); + options.params["pagination.limit"] = pagination.limit.toString(); + } + if (typeof pagination?.offset !== "undefined") { + options.params["pagination.offset"] = pagination.offset.toString(); } if (typeof pagination?.reverse !== "undefined") { options.params["pagination.reverse"] = pagination.reverse; @@ -218,13 +218,20 @@ const fromJSON = (object: any): Timestamp => { }; }; -export function fromJsonTimestamp(o: any): Date { +const timestampFromJSON = (object: any): Timestamp => { + return { + seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, + nanos: isSet(object.nanos) ? Number(object.nanos) : 0, + }; +}; + +export function fromJsonTimestamp(o: any): Timestamp { if (o instanceof Date) { - return o; + return toTimestamp(o); } else if (typeof o === "string") { - return new Date(o); + return toTimestamp(new Date(o)); } else { - return fromTimestamp(fromJSON(o)); + return timestampFromJSON(o); } } diff --git a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts index 405bc8fc..f1b64156 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../../helpers"; +import { isSet } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -62,7 +61,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.controllerEnabled = object.controllerEnabled ?? false; return message; diff --git a/src/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/ibc/applications/interchain_accounts/controller/v1/query.ts index 83a87986..4780c109 100644 --- a/src/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./controller"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; +import { isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +49,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +104,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/host/v1/host.ts b/src/ibc/applications/interchain_accounts/host/v1/host.ts index 4c663c20..53365a08 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../../helpers"; +import { isSet } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** * Params defines the set of on-chain interchain accounts parameters. @@ -84,7 +83,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.hostEnabled = object.hostEnabled ?? false; message.allowMessages = object.allowMessages?.map((e) => e) || []; diff --git a/src/ibc/applications/interchain_accounts/host/v1/query.ts b/src/ibc/applications/interchain_accounts/host/v1/query.ts index 9b2090e7..2461e77b 100644 --- a/src/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/ibc/applications/interchain_accounts/host/v1/query.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Params } from "./host"; import * as _m0 from "protobufjs/minimal"; -import { DeepPartial, Exact, isSet, Rpc } from "../../../../../helpers"; +import { isSet, Rpc } from "../../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.host.v1"; /** QueryParamsRequest is the request type for the Query/Params RPC method. */ @@ -50,7 +49,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -105,7 +104,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; diff --git a/src/ibc/applications/interchain_accounts/v1/account.ts b/src/ibc/applications/interchain_accounts/v1/account.ts index 2d07c82d..bbb55a4f 100644 --- a/src/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/ibc/applications/interchain_accounts/v1/account.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { BaseAccount } from "../../../../cosmos/auth/v1beta1/auth"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain */ @@ -72,7 +71,7 @@ export const InterchainAccount = { return obj; }, - fromPartial, I>>(object: I): InterchainAccount { + fromPartial(object: Partial): InterchainAccount { const message = createBaseInterchainAccount(); message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null diff --git a/src/ibc/applications/interchain_accounts/v1/genesis.ts b/src/ibc/applications/interchain_accounts/v1/genesis.ts index 94cc057b..b38e0375 100644 --- a/src/ibc/applications/interchain_accounts/v1/genesis.ts +++ b/src/ibc/applications/interchain_accounts/v1/genesis.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Params as Params1 } from "../controller/v1/controller"; import { Params as Params2 } from "../host/v1/host"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** GenesisState defines the interchain accounts genesis state */ @@ -112,7 +111,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.controllerGenesisState = object.controllerGenesisState !== undefined && object.controllerGenesisState !== null @@ -231,7 +230,7 @@ export const ControllerGenesisState = { return obj; }, - fromPartial, I>>(object: I): ControllerGenesisState { + fromPartial(object: Partial): ControllerGenesisState { const message = createBaseControllerGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -343,7 +342,7 @@ export const HostGenesisState = { return obj; }, - fromPartial, I>>(object: I): HostGenesisState { + fromPartial(object: Partial): HostGenesisState { const message = createBaseHostGenesisState(); message.activeChannels = object.activeChannels?.map((e) => ActiveChannel.fromPartial(e)) || []; message.interchainAccounts = @@ -426,7 +425,7 @@ export const ActiveChannel = { return obj; }, - fromPartial, I>>(object: I): ActiveChannel { + fromPartial(object: Partial): ActiveChannel { const message = createBaseActiveChannel(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; @@ -506,9 +505,7 @@ export const RegisteredInterchainAccount = { return obj; }, - fromPartial, I>>( - object: I, - ): RegisteredInterchainAccount { + fromPartial(object: Partial): RegisteredInterchainAccount { const message = createBaseRegisteredInterchainAccount(); message.connectionId = object.connectionId ?? ""; message.portId = object.portId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/metadata.ts b/src/ibc/applications/interchain_accounts/v1/metadata.ts index 214c6920..cef8ff17 100644 --- a/src/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring @@ -138,7 +137,7 @@ export const Metadata = { return obj; }, - fromPartial, I>>(object: I): Metadata { + fromPartial(object: Partial): Metadata { const message = createBaseMetadata(); message.version = object.version ?? ""; message.controllerConnectionId = object.controllerConnectionId ?? ""; diff --git a/src/ibc/applications/interchain_accounts/v1/packet.ts b/src/ibc/applications/interchain_accounts/v1/packet.ts index c73057f5..6f2839d1 100644 --- a/src/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/ibc/applications/interchain_accounts/v1/packet.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.applications.interchain_accounts.v1"; /** * Type defines a classification of message issued from a controller chain to its associated interchain accounts @@ -131,9 +130,7 @@ export const InterchainAccountPacketData = { return obj; }, - fromPartial, I>>( - object: I, - ): InterchainAccountPacketData { + fromPartial(object: Partial): InterchainAccountPacketData { const message = createBaseInterchainAccountPacketData(); message.type = object.type ?? 0; message.data = object.data ?? new Uint8Array(); @@ -197,7 +194,7 @@ export const CosmosTx = { return obj; }, - fromPartial, I>>(object: I): CosmosTx { + fromPartial(object: Partial): CosmosTx { const message = createBaseCosmosTx(); message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; return message; diff --git a/src/ibc/applications/transfer/v1/genesis.ts b/src/ibc/applications/transfer/v1/genesis.ts index 9e0d172b..fd95267c 100644 --- a/src/ibc/applications/transfer/v1/genesis.ts +++ b/src/ibc/applications/transfer/v1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** GenesisState defines the ibc-transfer genesis state */ @@ -91,7 +90,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.portId = object.portId ?? ""; message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; diff --git a/src/ibc/applications/transfer/v1/query.ts b/src/ibc/applications/transfer/v1/query.ts index d2ffc03a..4c5dca2b 100644 --- a/src/ibc/applications/transfer/v1/query.ts +++ b/src/ibc/applications/transfer/v1/query.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { DenomTrace, Params } from "./transfer"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { isSet, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC @@ -121,7 +120,7 @@ export const QueryDenomTraceRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTraceRequest { + fromPartial(object: Partial): QueryDenomTraceRequest { const message = createBaseQueryDenomTraceRequest(); message.hash = object.hash ?? ""; return message; @@ -178,7 +177,7 @@ export const QueryDenomTraceResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTraceResponse { + fromPartial(object: Partial): QueryDenomTraceResponse { const message = createBaseQueryDenomTraceResponse(); message.denomTrace = object.denomTrace !== undefined && object.denomTrace !== null @@ -238,7 +237,7 @@ export const QueryDenomTracesRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomTracesRequest { + fromPartial(object: Partial): QueryDenomTracesRequest { const message = createBaseQueryDenomTracesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -317,9 +316,7 @@ export const QueryDenomTracesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryDenomTracesResponse { + fromPartial(object: Partial): QueryDenomTracesResponse { const message = createBaseQueryDenomTracesResponse(); message.denomTraces = object.denomTraces?.map((e) => DenomTrace.fromPartial(e)) || []; message.pagination = @@ -366,7 +363,7 @@ export const QueryParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryParamsRequest { + fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, @@ -421,7 +418,7 @@ export const QueryParamsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryParamsResponse { + fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -478,7 +475,7 @@ export const QueryDenomHashRequest = { return obj; }, - fromPartial, I>>(object: I): QueryDenomHashRequest { + fromPartial(object: Partial): QueryDenomHashRequest { const message = createBaseQueryDenomHashRequest(); message.trace = object.trace ?? ""; return message; @@ -534,7 +531,7 @@ export const QueryDenomHashResponse = { return obj; }, - fromPartial, I>>(object: I): QueryDenomHashResponse { + fromPartial(object: Partial): QueryDenomHashResponse { const message = createBaseQueryDenomHashResponse(); message.hash = object.hash ?? ""; return message; diff --git a/src/ibc/applications/transfer/v1/transfer.ts b/src/ibc/applications/transfer/v1/transfer.ts index a199ac13..96b826cd 100644 --- a/src/ibc/applications/transfer/v1/transfer.ts +++ b/src/ibc/applications/transfer/v1/transfer.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * DenomTrace contains the base denomination for ICS20 fungible tokens and the @@ -99,7 +98,7 @@ export const DenomTrace = { return obj; }, - fromPartial, I>>(object: I): DenomTrace { + fromPartial(object: Partial): DenomTrace { const message = createBaseDenomTrace(); message.path = object.path ?? ""; message.baseDenom = object.baseDenom ?? ""; @@ -167,7 +166,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.sendEnabled = object.sendEnabled ?? false; message.receiveEnabled = object.receiveEnabled ?? false; diff --git a/src/ibc/applications/transfer/v1/tx.ts b/src/ibc/applications/transfer/v1/tx.ts index f361fba8..6289fa83 100644 --- a/src/ibc/applications/transfer/v1/tx.ts +++ b/src/ibc/applications/transfer/v1/tx.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Coin } from "../../../../cosmos/base/v1beta1/coin"; import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, Rpc } from "../../../../helpers"; +import { Long, isSet, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v1"; /** * MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between @@ -160,7 +159,7 @@ export const MsgTransfer = { return obj; }, - fromPartial, I>>(object: I): MsgTransfer { + fromPartial(object: Partial): MsgTransfer { const message = createBaseMsgTransfer(); message.sourcePort = object.sourcePort ?? ""; message.sourceChannel = object.sourceChannel ?? ""; @@ -216,7 +215,7 @@ export const MsgTransferResponse = { return obj; }, - fromPartial, I>>(_: I): MsgTransferResponse { + fromPartial(_: Partial): MsgTransferResponse { const message = createBaseMsgTransferResponse(); return message; }, diff --git a/src/ibc/applications/transfer/v2/packet.ts b/src/ibc/applications/transfer/v2/packet.ts index ab7b519e..2fafb579 100644 --- a/src/ibc/applications/transfer/v2/packet.ts +++ b/src/ibc/applications/transfer/v2/packet.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.applications.transfer.v2"; /** * FungibleTokenPacketData defines a struct for the packet payload @@ -105,7 +104,7 @@ export const FungibleTokenPacketData = { return obj; }, - fromPartial, I>>(object: I): FungibleTokenPacketData { + fromPartial(object: Partial): FungibleTokenPacketData { const message = createBaseFungibleTokenPacketData(); message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; diff --git a/src/ibc/core/channel/v1/channel.ts b/src/ibc/core/channel/v1/channel.ts index efe66cdc..22ce21d5 100644 --- a/src/ibc/core/channel/v1/channel.ts +++ b/src/ibc/core/channel/v1/channel.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** * State defines if a channel is in one of the following states: @@ -366,7 +365,7 @@ export const Channel = { return obj; }, - fromPartial, I>>(object: I): Channel { + fromPartial(object: Partial): Channel { const message = createBaseChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -504,7 +503,7 @@ export const IdentifiedChannel = { return obj; }, - fromPartial, I>>(object: I): IdentifiedChannel { + fromPartial(object: Partial): IdentifiedChannel { const message = createBaseIdentifiedChannel(); message.state = object.state ?? 0; message.ordering = object.ordering ?? 0; @@ -580,7 +579,7 @@ export const Counterparty = { return obj; }, - fromPartial, I>>(object: I): Counterparty { + fromPartial(object: Partial): Counterparty { const message = createBaseCounterparty(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -717,7 +716,7 @@ export const Packet = { return obj; }, - fromPartial, I>>(object: I): Packet { + fromPartial(object: Partial): Packet { const message = createBasePacket(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -823,7 +822,7 @@ export const PacketState = { return obj; }, - fromPartial, I>>(object: I): PacketState { + fromPartial(object: Partial): PacketState { const message = createBasePacketState(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -897,7 +896,7 @@ export const Acknowledgement = { return obj; }, - fromPartial, I>>(object: I): Acknowledgement { + fromPartial(object: Partial): Acknowledgement { const message = createBaseAcknowledgement(); message.result = object.result ?? undefined; message.error = object.error ?? undefined; diff --git a/src/ibc/core/channel/v1/genesis.ts b/src/ibc/core/channel/v1/genesis.ts index 5e98b394..1fec04fa 100644 --- a/src/ibc/core/channel/v1/genesis.ts +++ b/src/ibc/core/channel/v1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedChannel, PacketState } from "./channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** GenesisState defines the ibc channel submodule's genesis state. */ @@ -208,7 +207,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; @@ -296,7 +295,7 @@ export const PacketSequence = { return obj; }, - fromPartial, I>>(object: I): PacketSequence { + fromPartial(object: Partial): PacketSequence { const message = createBasePacketSequence(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; diff --git a/src/ibc/core/channel/v1/query.ts b/src/ibc/core/channel/v1/query.ts index 0e40c1e7..31ec803d 100644 --- a/src/ibc/core/channel/v1/query.ts +++ b/src/ibc/core/channel/v1/query.ts @@ -1,11 +1,10 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Channel, IdentifiedChannel, PacketState } from "./channel"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** QueryChannelRequest is the request type for the Query/Channel RPC method */ @@ -436,7 +435,7 @@ export const QueryChannelRequest = { return obj; }, - fromPartial, I>>(object: I): QueryChannelRequest { + fromPartial(object: Partial): QueryChannelRequest { const message = createBaseQueryChannelRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -518,7 +517,7 @@ export const QueryChannelResponse = { return obj; }, - fromPartial, I>>(object: I): QueryChannelResponse { + fromPartial(object: Partial): QueryChannelResponse { const message = createBaseQueryChannelResponse(); message.channel = object.channel !== undefined && object.channel !== null @@ -583,7 +582,7 @@ export const QueryChannelsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryChannelsRequest { + fromPartial(object: Partial): QueryChannelsRequest { const message = createBaseQueryChannelsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -673,7 +672,7 @@ export const QueryChannelsResponse = { return obj; }, - fromPartial, I>>(object: I): QueryChannelsResponse { + fromPartial(object: Partial): QueryChannelsResponse { const message = createBaseQueryChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -747,9 +746,7 @@ export const QueryConnectionChannelsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionChannelsRequest { + fromPartial(object: Partial): QueryConnectionChannelsRequest { const message = createBaseQueryConnectionChannelsRequest(); message.connection = object.connection ?? ""; message.pagination = @@ -840,9 +837,7 @@ export const QueryConnectionChannelsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionChannelsResponse { + fromPartial(object: Partial): QueryConnectionChannelsResponse { const message = createBaseQueryConnectionChannelsResponse(); message.channels = object.channels?.map((e) => IdentifiedChannel.fromPartial(e)) || []; message.pagination = @@ -915,9 +910,7 @@ export const QueryChannelClientStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelClientStateRequest { + fromPartial(object: Partial): QueryChannelClientStateRequest { const message = createBaseQueryChannelClientStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1003,9 +996,7 @@ export const QueryChannelClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelClientStateResponse { + fromPartial(object: Partial): QueryChannelClientStateResponse { const message = createBaseQueryChannelClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -1104,9 +1095,7 @@ export const QueryChannelConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelConsensusStateRequest { + fromPartial(object: Partial): QueryChannelConsensusStateRequest { const message = createBaseQueryChannelConsensusStateRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1207,9 +1196,7 @@ export const QueryChannelConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryChannelConsensusStateResponse { + fromPartial(object: Partial): QueryChannelConsensusStateResponse { const message = createBaseQueryChannelConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -1296,9 +1283,7 @@ export const QueryPacketCommitmentRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentRequest { + fromPartial(object: Partial): QueryPacketCommitmentRequest { const message = createBaseQueryPacketCommitmentRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1386,9 +1371,7 @@ export const QueryPacketCommitmentResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentResponse { + fromPartial(object: Partial): QueryPacketCommitmentResponse { const message = createBaseQueryPacketCommitmentResponse(); message.commitment = object.commitment ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -1472,9 +1455,7 @@ export const QueryPacketCommitmentsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentsRequest { + fromPartial(object: Partial): QueryPacketCommitmentsRequest { const message = createBaseQueryPacketCommitmentsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1566,9 +1547,7 @@ export const QueryPacketCommitmentsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketCommitmentsResponse { + fromPartial(object: Partial): QueryPacketCommitmentsResponse { const message = createBaseQueryPacketCommitmentsResponse(); message.commitments = object.commitments?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -1652,9 +1631,7 @@ export const QueryPacketReceiptRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketReceiptRequest { + fromPartial(object: Partial): QueryPacketReceiptRequest { const message = createBaseQueryPacketReceiptRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1739,9 +1716,7 @@ export const QueryPacketReceiptResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketReceiptResponse { + fromPartial(object: Partial): QueryPacketReceiptResponse { const message = createBaseQueryPacketReceiptResponse(); message.received = object.received ?? false; message.proof = object.proof ?? new Uint8Array(); @@ -1824,9 +1799,7 @@ export const QueryPacketAcknowledgementRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementRequest { + fromPartial(object: Partial): QueryPacketAcknowledgementRequest { const message = createBaseQueryPacketAcknowledgementRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1916,9 +1889,7 @@ export const QueryPacketAcknowledgementResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementResponse { + fromPartial(object: Partial): QueryPacketAcknowledgementResponse { const message = createBaseQueryPacketAcknowledgementResponse(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); message.proof = object.proof ?? new Uint8Array(); @@ -2035,9 +2006,7 @@ export const QueryPacketAcknowledgementsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementsRequest { + fromPartial(object: Partial): QueryPacketAcknowledgementsRequest { const message = createBaseQueryPacketAcknowledgementsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2130,9 +2099,7 @@ export const QueryPacketAcknowledgementsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryPacketAcknowledgementsResponse { + fromPartial(object: Partial): QueryPacketAcknowledgementsResponse { const message = createBaseQueryPacketAcknowledgementsResponse(); message.acknowledgements = object.acknowledgements?.map((e) => PacketState.fromPartial(e)) || []; message.pagination = @@ -2238,9 +2205,7 @@ export const QueryUnreceivedPacketsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedPacketsRequest { + fromPartial(object: Partial): QueryUnreceivedPacketsRequest { const message = createBaseQueryUnreceivedPacketsRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2328,9 +2293,7 @@ export const QueryUnreceivedPacketsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedPacketsResponse { + fromPartial(object: Partial): QueryUnreceivedPacketsResponse { const message = createBaseQueryUnreceivedPacketsResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2430,9 +2393,7 @@ export const QueryUnreceivedAcksRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedAcksRequest { + fromPartial(object: Partial): QueryUnreceivedAcksRequest { const message = createBaseQueryUnreceivedAcksRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2520,9 +2481,7 @@ export const QueryUnreceivedAcksResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUnreceivedAcksResponse { + fromPartial(object: Partial): QueryUnreceivedAcksResponse { const message = createBaseQueryUnreceivedAcksResponse(); message.sequences = object.sequences?.map((e) => Long.fromValue(e)) || []; message.height = @@ -2591,9 +2550,7 @@ export const QueryNextSequenceReceiveRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryNextSequenceReceiveRequest { + fromPartial(object: Partial): QueryNextSequenceReceiveRequest { const message = createBaseQueryNextSequenceReceiveRequest(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -2677,9 +2634,7 @@ export const QueryNextSequenceReceiveResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryNextSequenceReceiveResponse { + fromPartial(object: Partial): QueryNextSequenceReceiveResponse { const message = createBaseQueryNextSequenceReceiveResponse(); message.nextSequenceReceive = object.nextSequenceReceive !== undefined && object.nextSequenceReceive !== null diff --git a/src/ibc/core/channel/v1/tx.ts b/src/ibc/core/channel/v1/tx.ts index be8eba06..bcd1a4d2 100644 --- a/src/ibc/core/channel/v1/tx.ts +++ b/src/ibc/core/channel/v1/tx.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Channel, Packet } from "./channel"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.channel.v1"; /** ResponseResultType defines the possible outcomes of the execution of a message */ @@ -289,7 +288,7 @@ export const MsgChannelOpenInit = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenInit { + fromPartial(object: Partial): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); message.portId = object.portId ?? ""; message.channel = @@ -350,9 +349,7 @@ export const MsgChannelOpenInitResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgChannelOpenInitResponse { + fromPartial(object: Partial): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); message.channelId = object.channelId ?? ""; return message; @@ -479,7 +476,7 @@ export const MsgChannelOpenTry = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenTry { + fromPartial(object: Partial): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); message.portId = object.portId ?? ""; message.previousChannelId = object.previousChannelId ?? ""; @@ -534,7 +531,7 @@ export const MsgChannelOpenTryResponse = { return obj; }, - fromPartial, I>>(_: I): MsgChannelOpenTryResponse { + fromPartial(_: Partial): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); return message; }, @@ -658,7 +655,7 @@ export const MsgChannelOpenAck = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenAck { + fromPartial(object: Partial): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -710,7 +707,7 @@ export const MsgChannelOpenAckResponse = { return obj; }, - fromPartial, I>>(_: I): MsgChannelOpenAckResponse { + fromPartial(_: Partial): MsgChannelOpenAckResponse { const message = createBaseMsgChannelOpenAckResponse(); return message; }, @@ -811,7 +808,7 @@ export const MsgChannelOpenConfirm = { return obj; }, - fromPartial, I>>(object: I): MsgChannelOpenConfirm { + fromPartial(object: Partial): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -861,9 +858,7 @@ export const MsgChannelOpenConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelOpenConfirmResponse { + fromPartial(_: Partial): MsgChannelOpenConfirmResponse { const message = createBaseMsgChannelOpenConfirmResponse(); return message; }, @@ -940,7 +935,7 @@ export const MsgChannelCloseInit = { return obj; }, - fromPartial, I>>(object: I): MsgChannelCloseInit { + fromPartial(object: Partial): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -985,9 +980,7 @@ export const MsgChannelCloseInitResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelCloseInitResponse { + fromPartial(_: Partial): MsgChannelCloseInitResponse { const message = createBaseMsgChannelCloseInitResponse(); return message; }, @@ -1090,7 +1083,7 @@ export const MsgChannelCloseConfirm = { return obj; }, - fromPartial, I>>(object: I): MsgChannelCloseConfirm { + fromPartial(object: Partial): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; @@ -1140,9 +1133,7 @@ export const MsgChannelCloseConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgChannelCloseConfirmResponse { + fromPartial(_: Partial): MsgChannelCloseConfirmResponse { const message = createBaseMsgChannelCloseConfirmResponse(); return message; }, @@ -1236,7 +1227,7 @@ export const MsgRecvPacket = { return obj; }, - fromPartial, I>>(object: I): MsgRecvPacket { + fromPartial(object: Partial): MsgRecvPacket { const message = createBaseMsgRecvPacket(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1299,7 +1290,7 @@ export const MsgRecvPacketResponse = { return obj; }, - fromPartial, I>>(object: I): MsgRecvPacketResponse { + fromPartial(object: Partial): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); message.result = object.result ?? 0; return message; @@ -1406,7 +1397,7 @@ export const MsgTimeout = { return obj; }, - fromPartial, I>>(object: I): MsgTimeout { + fromPartial(object: Partial): MsgTimeout { const message = createBaseMsgTimeout(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1473,7 +1464,7 @@ export const MsgTimeoutResponse = { return obj; }, - fromPartial, I>>(object: I): MsgTimeoutResponse { + fromPartial(object: Partial): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); message.result = object.result ?? 0; return message; @@ -1594,7 +1585,7 @@ export const MsgTimeoutOnClose = { return obj; }, - fromPartial, I>>(object: I): MsgTimeoutOnClose { + fromPartial(object: Partial): MsgTimeoutOnClose { const message = createBaseMsgTimeoutOnClose(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1662,9 +1653,7 @@ export const MsgTimeoutOnCloseResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgTimeoutOnCloseResponse { + fromPartial(object: Partial): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); message.result = object.result ?? 0; return message; @@ -1773,7 +1762,7 @@ export const MsgAcknowledgement = { return obj; }, - fromPartial, I>>(object: I): MsgAcknowledgement { + fromPartial(object: Partial): MsgAcknowledgement { const message = createBaseMsgAcknowledgement(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; @@ -1837,9 +1826,7 @@ export const MsgAcknowledgementResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgAcknowledgementResponse { + fromPartial(object: Partial): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); message.result = object.result ?? 0; return message; diff --git a/src/ibc/core/client/v1/client.ts b/src/ibc/core/client/v1/client.ts index 14816a3a..16a61b41 100644 --- a/src/ibc/core/client/v1/client.ts +++ b/src/ibc/core/client/v1/client.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, Long } from "../../../../helpers"; +import { isSet, Long } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * IdentifiedClientState defines a client state with an additional client @@ -172,7 +171,7 @@ export const IdentifiedClientState = { return obj; }, - fromPartial, I>>(object: I): IdentifiedClientState { + fromPartial(object: Partial): IdentifiedClientState { const message = createBaseIdentifiedClientState(); message.clientId = object.clientId ?? ""; message.clientState = @@ -244,9 +243,7 @@ export const ConsensusStateWithHeight = { return obj; }, - fromPartial, I>>( - object: I, - ): ConsensusStateWithHeight { + fromPartial(object: Partial): ConsensusStateWithHeight { const message = createBaseConsensusStateWithHeight(); message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined; @@ -328,7 +325,7 @@ export const ClientConsensusStates = { return obj; }, - fromPartial, I>>(object: I): ClientConsensusStates { + fromPartial(object: Partial): ClientConsensusStates { const message = createBaseClientConsensusStates(); message.clientId = object.clientId ?? ""; message.consensusStates = @@ -419,7 +416,7 @@ export const ClientUpdateProposal = { return obj; }, - fromPartial, I>>(object: I): ClientUpdateProposal { + fromPartial(object: Partial): ClientUpdateProposal { const message = createBaseClientUpdateProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -516,7 +513,7 @@ export const UpgradeProposal = { return obj; }, - fromPartial, I>>(object: I): UpgradeProposal { + fromPartial(object: Partial): UpgradeProposal { const message = createBaseUpgradeProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; @@ -592,7 +589,7 @@ export const Height = { return obj; }, - fromPartial, I>>(object: I): Height { + fromPartial(object: Partial): Height { const message = createBaseHeight(); message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null @@ -663,7 +660,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.allowedClients = object.allowedClients?.map((e) => e) || []; return message; diff --git a/src/ibc/core/client/v1/genesis.ts b/src/ibc/core/client/v1/genesis.ts index 353863b2..9bdabdcc 100644 --- a/src/ibc/core/client/v1/genesis.ts +++ b/src/ibc/core/client/v1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedClientState, ClientConsensusStates, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** GenesisState defines the ibc client submodule's genesis state. */ @@ -178,7 +177,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.clients = object.clients?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.clientsConsensus = @@ -258,7 +257,7 @@ export const GenesisMetadata = { return obj; }, - fromPartial, I>>(object: I): GenesisMetadata { + fromPartial(object: Partial): GenesisMetadata { const message = createBaseGenesisMetadata(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -334,9 +333,7 @@ export const IdentifiedGenesisMetadata = { return obj; }, - fromPartial, I>>( - object: I, - ): IdentifiedGenesisMetadata { + fromPartial(object: Partial): IdentifiedGenesisMetadata { const message = createBaseIdentifiedGenesisMetadata(); message.clientId = object.clientId ?? ""; message.clientMetadata = object.clientMetadata?.map((e) => GenesisMetadata.fromPartial(e)) || []; diff --git a/src/ibc/core/client/v1/query.ts b/src/ibc/core/client/v1/query.ts index b22565c7..ad23b73a 100644 --- a/src/ibc/core/client/v1/query.ts +++ b/src/ibc/core/client/v1/query.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { Any } from "../../../../google/protobuf/any"; import { Height, IdentifiedClientState, ConsensusStateWithHeight, Params } from "./client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** * QueryClientStateRequest is the request type for the Query/ClientState RPC @@ -225,7 +224,7 @@ export const QueryClientStateRequest = { return obj; }, - fromPartial, I>>(object: I): QueryClientStateRequest { + fromPartial(object: Partial): QueryClientStateRequest { const message = createBaseQueryClientStateRequest(); message.clientId = object.clientId ?? ""; return message; @@ -306,9 +305,7 @@ export const QueryClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStateResponse { + fromPartial(object: Partial): QueryClientStateResponse { const message = createBaseQueryClientStateResponse(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -373,9 +370,7 @@ export const QueryClientStatesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatesRequest { + fromPartial(object: Partial): QueryClientStatesRequest { const message = createBaseQueryClientStatesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -454,9 +449,7 @@ export const QueryClientStatesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatesResponse { + fromPartial(object: Partial): QueryClientStatesResponse { const message = createBaseQueryClientStatesResponse(); message.clientStates = object.clientStates?.map((e) => IdentifiedClientState.fromPartial(e)) || []; message.pagination = @@ -551,9 +544,7 @@ export const QueryConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStateRequest { + fromPartial(object: Partial): QueryConsensusStateRequest { const message = createBaseQueryConsensusStateRequest(); message.clientId = object.clientId ?? ""; message.revisionNumber = @@ -643,9 +634,7 @@ export const QueryConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStateResponse { + fromPartial(object: Partial): QueryConsensusStateResponse { const message = createBaseQueryConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null @@ -721,9 +710,7 @@ export const QueryConsensusStatesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStatesRequest { + fromPartial(object: Partial): QueryConsensusStatesRequest { const message = createBaseQueryConsensusStatesRequest(); message.clientId = object.clientId ?? ""; message.pagination = @@ -805,9 +792,7 @@ export const QueryConsensusStatesResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConsensusStatesResponse { + fromPartial(object: Partial): QueryConsensusStatesResponse { const message = createBaseQueryConsensusStatesResponse(); message.consensusStates = object.consensusStates?.map((e) => ConsensusStateWithHeight.fromPartial(e)) || []; @@ -868,9 +853,7 @@ export const QueryClientStatusRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatusRequest { + fromPartial(object: Partial): QueryClientStatusRequest { const message = createBaseQueryClientStatusRequest(); message.clientId = object.clientId ?? ""; return message; @@ -926,9 +909,7 @@ export const QueryClientStatusResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientStatusResponse { + fromPartial(object: Partial): QueryClientStatusResponse { const message = createBaseQueryClientStatusResponse(); message.status = object.status ?? ""; return message; @@ -971,7 +952,7 @@ export const QueryClientParamsRequest = { return obj; }, - fromPartial, I>>(_: I): QueryClientParamsRequest { + fromPartial(_: Partial): QueryClientParamsRequest { const message = createBaseQueryClientParamsRequest(); return message; }, @@ -1026,9 +1007,7 @@ export const QueryClientParamsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientParamsResponse { + fromPartial(object: Partial): QueryClientParamsResponse { const message = createBaseQueryClientParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; @@ -1072,9 +1051,7 @@ export const QueryUpgradedClientStateRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryUpgradedClientStateRequest { + fromPartial(_: Partial): QueryUpgradedClientStateRequest { const message = createBaseQueryUpgradedClientStateRequest(); return message; }, @@ -1134,9 +1111,7 @@ export const QueryUpgradedClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedClientStateResponse { + fromPartial(object: Partial): QueryUpgradedClientStateResponse { const message = createBaseQueryUpgradedClientStateResponse(); message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null @@ -1182,9 +1157,7 @@ export const QueryUpgradedConsensusStateRequest = { return obj; }, - fromPartial, I>>( - _: I, - ): QueryUpgradedConsensusStateRequest { + fromPartial(_: Partial): QueryUpgradedConsensusStateRequest { const message = createBaseQueryUpgradedConsensusStateRequest(); return message; }, @@ -1244,9 +1217,7 @@ export const QueryUpgradedConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryUpgradedConsensusStateResponse { + fromPartial(object: Partial): QueryUpgradedConsensusStateResponse { const message = createBaseQueryUpgradedConsensusStateResponse(); message.upgradedConsensusState = object.upgradedConsensusState !== undefined && object.upgradedConsensusState !== null diff --git a/src/ibc/core/client/v1/tx.ts b/src/ibc/core/client/v1/tx.ts index e3a3c53b..10771641 100644 --- a/src/ibc/core/client/v1/tx.ts +++ b/src/ibc/core/client/v1/tx.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.client.v1"; /** MsgCreateClient defines a message to create an IBC client */ @@ -165,7 +164,7 @@ export const MsgCreateClient = { return obj; }, - fromPartial, I>>(object: I): MsgCreateClient { + fromPartial(object: Partial): MsgCreateClient { const message = createBaseMsgCreateClient(); message.clientState = object.clientState !== undefined && object.clientState !== null @@ -216,7 +215,7 @@ export const MsgCreateClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgCreateClientResponse { + fromPartial(_: Partial): MsgCreateClientResponse { const message = createBaseMsgCreateClientResponse(); return message; }, @@ -293,7 +292,7 @@ export const MsgUpdateClient = { return obj; }, - fromPartial, I>>(object: I): MsgUpdateClient { + fromPartial(object: Partial): MsgUpdateClient { const message = createBaseMsgUpdateClient(); message.clientId = object.clientId ?? ""; message.header = @@ -339,7 +338,7 @@ export const MsgUpdateClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpdateClientResponse { + fromPartial(_: Partial): MsgUpdateClientResponse { const message = createBaseMsgUpdateClientResponse(); return message; }, @@ -463,7 +462,7 @@ export const MsgUpgradeClient = { return obj; }, - fromPartial, I>>(object: I): MsgUpgradeClient { + fromPartial(object: Partial): MsgUpgradeClient { const message = createBaseMsgUpgradeClient(); message.clientId = object.clientId ?? ""; message.clientState = @@ -517,7 +516,7 @@ export const MsgUpgradeClientResponse = { return obj; }, - fromPartial, I>>(_: I): MsgUpgradeClientResponse { + fromPartial(_: Partial): MsgUpgradeClientResponse { const message = createBaseMsgUpgradeClientResponse(); return message; }, @@ -595,7 +594,7 @@ export const MsgSubmitMisbehaviour = { return obj; }, - fromPartial, I>>(object: I): MsgSubmitMisbehaviour { + fromPartial(object: Partial): MsgSubmitMisbehaviour { const message = createBaseMsgSubmitMisbehaviour(); message.clientId = object.clientId ?? ""; message.misbehaviour = @@ -643,9 +642,7 @@ export const MsgSubmitMisbehaviourResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgSubmitMisbehaviourResponse { + fromPartial(_: Partial): MsgSubmitMisbehaviourResponse { const message = createBaseMsgSubmitMisbehaviourResponse(); return message; }, diff --git a/src/ibc/core/commitment/v1/commitment.ts b/src/ibc/core/commitment/v1/commitment.ts index 8e10fb6d..08d2fde8 100644 --- a/src/ibc/core/commitment/v1/commitment.ts +++ b/src/ibc/core/commitment/v1/commitment.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { CommitmentProof } from "../../../../confio/proofs"; import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial, Exact } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.core.commitment.v1"; /** * MerkleRoot defines a merkle root hash. @@ -92,7 +91,7 @@ export const MerkleRoot = { return obj; }, - fromPartial, I>>(object: I): MerkleRoot { + fromPartial(object: Partial): MerkleRoot { const message = createBaseMerkleRoot(); message.hash = object.hash ?? new Uint8Array(); return message; @@ -151,7 +150,7 @@ export const MerklePrefix = { return obj; }, - fromPartial, I>>(object: I): MerklePrefix { + fromPartial(object: Partial): MerklePrefix { const message = createBaseMerklePrefix(); message.keyPrefix = object.keyPrefix ?? new Uint8Array(); return message; @@ -213,7 +212,7 @@ export const MerklePath = { return obj; }, - fromPartial, I>>(object: I): MerklePath { + fromPartial(object: Partial): MerklePath { const message = createBaseMerklePath(); message.keyPath = object.keyPath?.map((e) => e) || []; return message; @@ -275,7 +274,7 @@ export const MerkleProof = { return obj; }, - fromPartial, I>>(object: I): MerkleProof { + fromPartial(object: Partial): MerkleProof { const message = createBaseMerkleProof(); message.proofs = object.proofs?.map((e) => CommitmentProof.fromPartial(e)) || []; return message; diff --git a/src/ibc/core/connection/v1/connection.ts b/src/ibc/core/connection/v1/connection.ts index 6e0edfd1..f481d827 100644 --- a/src/ibc/core/connection/v1/connection.ts +++ b/src/ibc/core/connection/v1/connection.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { MerklePrefix } from "../../commitment/v1/commitment"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * State defines if a connection is in one of the following states: @@ -282,7 +281,7 @@ export const ConnectionEnd = { return obj; }, - fromPartial, I>>(object: I): ConnectionEnd { + fromPartial(object: Partial): ConnectionEnd { const message = createBaseConnectionEnd(); message.clientId = object.clientId ?? ""; message.versions = object.versions?.map((e) => Version.fromPartial(e)) || []; @@ -410,7 +409,7 @@ export const IdentifiedConnection = { return obj; }, - fromPartial, I>>(object: I): IdentifiedConnection { + fromPartial(object: Partial): IdentifiedConnection { const message = createBaseIdentifiedConnection(); message.id = object.id ?? ""; message.clientId = object.clientId ?? ""; @@ -500,7 +499,7 @@ export const Counterparty = { return obj; }, - fromPartial, I>>(object: I): Counterparty { + fromPartial(object: Partial): Counterparty { const message = createBaseCounterparty(); message.clientId = object.clientId ?? ""; message.connectionId = object.connectionId ?? ""; @@ -567,7 +566,7 @@ export const ClientPaths = { return obj; }, - fromPartial, I>>(object: I): ClientPaths { + fromPartial(object: Partial): ClientPaths { const message = createBaseClientPaths(); message.paths = object.paths?.map((e) => e) || []; return message; @@ -640,7 +639,7 @@ export const ConnectionPaths = { return obj; }, - fromPartial, I>>(object: I): ConnectionPaths { + fromPartial(object: Partial): ConnectionPaths { const message = createBaseConnectionPaths(); message.clientId = object.clientId ?? ""; message.paths = object.paths?.map((e) => e) || []; @@ -714,7 +713,7 @@ export const Version = { return obj; }, - fromPartial, I>>(object: I): Version { + fromPartial(object: Partial): Version { const message = createBaseVersion(); message.identifier = object.identifier ?? ""; message.features = object.features?.map((e) => e) || []; @@ -774,7 +773,7 @@ export const Params = { return obj; }, - fromPartial, I>>(object: I): Params { + fromPartial(object: Partial): Params { const message = createBaseParams(); message.maxExpectedTimePerBlock = object.maxExpectedTimePerBlock !== undefined && object.maxExpectedTimePerBlock !== null diff --git a/src/ibc/core/connection/v1/genesis.ts b/src/ibc/core/connection/v1/genesis.ts index 5c212b03..1bd29204 100644 --- a/src/ibc/core/connection/v1/genesis.ts +++ b/src/ibc/core/connection/v1/genesis.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { IdentifiedConnection, ConnectionPaths, Params } from "./connection"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact } from "../../../../helpers"; +import { Long, isSet } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** GenesisState defines the ibc connection submodule's genesis state. */ @@ -117,7 +116,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.clientConnectionPaths = diff --git a/src/ibc/core/connection/v1/query.ts b/src/ibc/core/connection/v1/query.ts index 1ba4e699..d3562727 100644 --- a/src/ibc/core/connection/v1/query.ts +++ b/src/ibc/core/connection/v1/query.ts @@ -1,11 +1,10 @@ -//@ts-nocheck /* eslint-disable */ import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; import { ConnectionEnd, IdentifiedConnection } from "./connection"; import { Height, IdentifiedClientState } from "../../client/v1/client"; import { Any } from "../../../../google/protobuf/any"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes, Long, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * QueryConnectionRequest is the request type for the Query/Connection RPC @@ -182,7 +181,7 @@ export const QueryConnectionRequest = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionRequest { + fromPartial(object: Partial): QueryConnectionRequest { const message = createBaseQueryConnectionRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -263,7 +262,7 @@ export const QueryConnectionResponse = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionResponse { + fromPartial(object: Partial): QueryConnectionResponse { const message = createBaseQueryConnectionResponse(); message.connection = object.connection !== undefined && object.connection !== null @@ -328,7 +327,7 @@ export const QueryConnectionsRequest = { return obj; }, - fromPartial, I>>(object: I): QueryConnectionsRequest { + fromPartial(object: Partial): QueryConnectionsRequest { const message = createBaseQueryConnectionsRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null @@ -418,9 +417,7 @@ export const QueryConnectionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionsResponse { + fromPartial(object: Partial): QueryConnectionsResponse { const message = createBaseQueryConnectionsResponse(); message.connections = object.connections?.map((e) => IdentifiedConnection.fromPartial(e)) || []; message.pagination = @@ -482,9 +479,7 @@ export const QueryClientConnectionsRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientConnectionsRequest { + fromPartial(object: Partial): QueryClientConnectionsRequest { const message = createBaseQueryClientConnectionsRequest(); message.clientId = object.clientId ?? ""; return message; @@ -572,9 +567,7 @@ export const QueryClientConnectionsResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryClientConnectionsResponse { + fromPartial(object: Partial): QueryClientConnectionsResponse { const message = createBaseQueryClientConnectionsResponse(); message.connectionPaths = object.connectionPaths?.map((e) => e) || []; message.proof = object.proof ?? new Uint8Array(); @@ -635,9 +628,7 @@ export const QueryConnectionClientStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionClientStateRequest { + fromPartial(object: Partial): QueryConnectionClientStateRequest { const message = createBaseQueryConnectionClientStateRequest(); message.connectionId = object.connectionId ?? ""; return message; @@ -722,9 +713,7 @@ export const QueryConnectionClientStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionClientStateResponse { + fromPartial(object: Partial): QueryConnectionClientStateResponse { const message = createBaseQueryConnectionClientStateResponse(); message.identifiedClientState = object.identifiedClientState !== undefined && object.identifiedClientState !== null @@ -815,9 +804,7 @@ export const QueryConnectionConsensusStateRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionConsensusStateRequest { + fromPartial(object: Partial): QueryConnectionConsensusStateRequest { const message = createBaseQueryConnectionConsensusStateRequest(); message.connectionId = object.connectionId ?? ""; message.revisionNumber = @@ -920,9 +907,7 @@ export const QueryConnectionConsensusStateResponse = { return obj; }, - fromPartial, I>>( - object: I, - ): QueryConnectionConsensusStateResponse { + fromPartial(object: Partial): QueryConnectionConsensusStateResponse { const message = createBaseQueryConnectionConsensusStateResponse(); message.consensusState = object.consensusState !== undefined && object.consensusState !== null diff --git a/src/ibc/core/connection/v1/tx.ts b/src/ibc/core/connection/v1/tx.ts index a89050ac..9c0230fc 100644 --- a/src/ibc/core/connection/v1/tx.ts +++ b/src/ibc/core/connection/v1/tx.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { Counterparty, Version } from "./connection"; import { Any } from "../../../../google/protobuf/any"; import { Height } from "../../client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes, Rpc } from "../../../../helpers"; export const protobufPackage = "ibc.core.connection.v1"; /** * MsgConnectionOpenInit defines the msg sent by an account on Chain A to @@ -204,7 +203,7 @@ export const MsgConnectionOpenInit = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenInit { + fromPartial(object: Partial): MsgConnectionOpenInit { const message = createBaseMsgConnectionOpenInit(); message.clientId = object.clientId ?? ""; message.counterparty = @@ -260,9 +259,7 @@ export const MsgConnectionOpenInitResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenInitResponse { + fromPartial(_: Partial): MsgConnectionOpenInitResponse { const message = createBaseMsgConnectionOpenInitResponse(); return message; }, @@ -461,7 +458,7 @@ export const MsgConnectionOpenTry = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenTry { + fromPartial(object: Partial): MsgConnectionOpenTry { const message = createBaseMsgConnectionOpenTry(); message.clientId = object.clientId ?? ""; message.previousConnectionId = object.previousConnectionId ?? ""; @@ -530,9 +527,7 @@ export const MsgConnectionOpenTryResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenTryResponse { + fromPartial(_: Partial): MsgConnectionOpenTryResponse { const message = createBaseMsgConnectionOpenTryResponse(); return message; }, @@ -702,7 +697,7 @@ export const MsgConnectionOpenAck = { return obj; }, - fromPartial, I>>(object: I): MsgConnectionOpenAck { + fromPartial(object: Partial): MsgConnectionOpenAck { const message = createBaseMsgConnectionOpenAck(); message.connectionId = object.connectionId ?? ""; message.counterpartyConnectionId = object.counterpartyConnectionId ?? ""; @@ -766,9 +761,7 @@ export const MsgConnectionOpenAckResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenAckResponse { + fromPartial(_: Partial): MsgConnectionOpenAckResponse { const message = createBaseMsgConnectionOpenAckResponse(); return message; }, @@ -858,9 +851,7 @@ export const MsgConnectionOpenConfirm = { return obj; }, - fromPartial, I>>( - object: I, - ): MsgConnectionOpenConfirm { + fromPartial(object: Partial): MsgConnectionOpenConfirm { const message = createBaseMsgConnectionOpenConfirm(); message.connectionId = object.connectionId ?? ""; message.proofAck = object.proofAck ?? new Uint8Array(); @@ -909,9 +900,7 @@ export const MsgConnectionOpenConfirmResponse = { return obj; }, - fromPartial, I>>( - _: I, - ): MsgConnectionOpenConfirmResponse { + fromPartial(_: Partial): MsgConnectionOpenConfirmResponse { const message = createBaseMsgConnectionOpenConfirmResponse(); return message; }, diff --git a/src/ibc/core/types/v1/genesis.ts b/src/ibc/core/types/v1/genesis.ts index 270f1404..edad5e63 100644 --- a/src/ibc/core/types/v1/genesis.ts +++ b/src/ibc/core/types/v1/genesis.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { GenesisState as GenesisState1 } from "../../client/v1/genesis"; import { GenesisState as GenesisState2 } from "../../connection/v1/genesis"; import { GenesisState as GenesisState3 } from "../../channel/v1/genesis"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.core.types.v1"; /** GenesisState defines the ibc module's genesis state. */ @@ -101,7 +100,7 @@ export const GenesisState = { return obj; }, - fromPartial, I>>(object: I): GenesisState { + fromPartial(object: Partial): GenesisState { const message = createBaseGenesisState(); message.clientGenesis = object.clientGenesis !== undefined && object.clientGenesis !== null diff --git a/src/ibc/lightclients/localhost/v1/localhost.ts b/src/ibc/lightclients/localhost/v1/localhost.ts index 8d3fc6c6..666ceb88 100644 --- a/src/ibc/lightclients/localhost/v1/localhost.ts +++ b/src/ibc/lightclients/localhost/v1/localhost.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Height } from "../../../core/client/v1/client"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Exact } from "../../../../helpers"; +import { isSet } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.localhost.v1"; /** * ClientState defines a loopback (localhost) client. It requires (read-only) @@ -77,7 +76,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: Partial): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.height = diff --git a/src/ibc/lightclients/solomachine/v1/solomachine.ts b/src/ibc/lightclients/solomachine/v1/solomachine.ts index 70491bbc..e1862d2e 100644 --- a/src/ibc/lightclients/solomachine/v1/solomachine.ts +++ b/src/ibc/lightclients/solomachine/v1/solomachine.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { Any } from "../../../../google/protobuf/any"; import { ConnectionEnd } from "../../../core/connection/v1/connection"; import { Channel } from "../../../core/channel/v1/channel"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, Exact, bytesFromBase64, base64FromBytes } from "../../../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../../../helpers"; export const protobufPackage = "ibc.lightclients.solomachine.v1"; /** * DataType defines the type of solo machine proof being created. This is done @@ -388,7 +387,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: Partial): ClientState { const message = createBaseClientState(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -479,7 +478,7 @@ export const ConsensusState = { return obj; }, - fromPartial, I>>(object: I): ConsensusState { + fromPartial(object: Partial): ConsensusState { const message = createBaseConsensusState(); message.publicKey = object.publicKey !== undefined && object.publicKey !== null @@ -591,7 +590,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: Partial
): Header { const message = createBaseHeader(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -695,7 +694,7 @@ export const Misbehaviour = { return obj; }, - fromPartial, I>>(object: I): Misbehaviour { + fromPartial(object: Partial): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.sequence = @@ -800,7 +799,7 @@ export const SignatureAndData = { return obj; }, - fromPartial, I>>(object: I): SignatureAndData { + fromPartial(object: Partial): SignatureAndData { const message = createBaseSignatureAndData(); message.signature = object.signature ?? new Uint8Array(); message.dataType = object.dataType ?? 0; @@ -876,9 +875,7 @@ export const TimestampedSignatureData = { return obj; }, - fromPartial, I>>( - object: I, - ): TimestampedSignatureData { + fromPartial(object: Partial): TimestampedSignatureData { const message = createBaseTimestampedSignatureData(); message.signatureData = object.signatureData ?? new Uint8Array(); message.timestamp = @@ -983,7 +980,7 @@ export const SignBytes = { return obj; }, - fromPartial, I>>(object: I): SignBytes { + fromPartial(object: Partial): SignBytes { const message = createBaseSignBytes(); message.sequence = object.sequence !== undefined && object.sequence !== null @@ -1061,7 +1058,7 @@ export const HeaderData = { return obj; }, - fromPartial, I>>(object: I): HeaderData { + fromPartial(object: Partial): HeaderData { const message = createBaseHeaderData(); message.newPubKey = object.newPubKey !== undefined && object.newPubKey !== null @@ -1134,7 +1131,7 @@ export const ClientStateData = { return obj; }, - fromPartial, I>>(object: I): ClientStateData { + fromPartial(object: Partial): ClientStateData { const message = createBaseClientStateData(); message.path = object.path ?? new Uint8Array(); message.clientState = @@ -1207,7 +1204,7 @@ export const ConsensusStateData = { return obj; }, - fromPartial, I>>(object: I): ConsensusStateData { + fromPartial(object: Partial): ConsensusStateData { const message = createBaseConsensusStateData(); message.path = object.path ?? new Uint8Array(); message.consensusState = @@ -1280,7 +1277,7 @@ export const ConnectionStateData = { return obj; }, - fromPartial, I>>(object: I): ConnectionStateData { + fromPartial(object: Partial): ConnectionStateData { const message = createBaseConnectionStateData(); message.path = object.path ?? new Uint8Array(); message.connection = @@ -1353,7 +1350,7 @@ export const ChannelStateData = { return obj; }, - fromPartial, I>>(object: I): ChannelStateData { + fromPartial(object: Partial): ChannelStateData { const message = createBaseChannelStateData(); message.path = object.path ?? new Uint8Array(); message.channel = @@ -1428,7 +1425,7 @@ export const PacketCommitmentData = { return obj; }, - fromPartial, I>>(object: I): PacketCommitmentData { + fromPartial(object: Partial): PacketCommitmentData { const message = createBasePacketCommitmentData(); message.path = object.path ?? new Uint8Array(); message.commitment = object.commitment ?? new Uint8Array(); @@ -1502,9 +1499,7 @@ export const PacketAcknowledgementData = { return obj; }, - fromPartial, I>>( - object: I, - ): PacketAcknowledgementData { + fromPartial(object: Partial): PacketAcknowledgementData { const message = createBasePacketAcknowledgementData(); message.path = object.path ?? new Uint8Array(); message.acknowledgement = object.acknowledgement ?? new Uint8Array(); @@ -1562,9 +1557,7 @@ export const PacketReceiptAbsenceData = { return obj; }, - fromPartial, I>>( - object: I, - ): PacketReceiptAbsenceData { + fromPartial(object: Partial): PacketReceiptAbsenceData { const message = createBasePacketReceiptAbsenceData(); message.path = object.path ?? new Uint8Array(); return message; @@ -1632,7 +1625,7 @@ export const NextSequenceRecvData = { return obj; }, - fromPartial, I>>(object: I): NextSequenceRecvData { + fromPartial(object: Partial): NextSequenceRecvData { const message = createBaseNextSequenceRecvData(); message.path = object.path ?? new Uint8Array(); message.nextSeqRecv = diff --git a/src/ibc/lightclients/tendermint/v1/tendermint.ts b/src/ibc/lightclients/tendermint/v1/tendermint.ts index 438cff86..94333ab5 100644 --- a/src/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Duration } from "../../../../google/protobuf/duration"; import { Height } from "../../../core/client/v1/client"; @@ -10,8 +9,6 @@ import { ValidatorSet } from "../../../../tendermint/types/validator"; import * as _m0 from "protobufjs/minimal"; import { isSet, - DeepPartial, - Exact, fromJsonTimestamp, bytesFromBase64, fromTimestamp, @@ -310,7 +307,7 @@ export const ClientState = { return obj; }, - fromPartial, I>>(object: I): ClientState { + fromPartial(object: Partial): ClientState { const message = createBaseClientState(); message.chainId = object.chainId ?? ""; message.trustLevel = @@ -421,7 +418,7 @@ export const ConsensusState = { return obj; }, - fromPartial, I>>(object: I): ConsensusState { + fromPartial(object: Partial): ConsensusState { const message = createBaseConsensusState(); message.timestamp = object.timestamp !== undefined && object.timestamp !== null @@ -507,7 +504,7 @@ export const Misbehaviour = { return obj; }, - fromPartial, I>>(object: I): Misbehaviour { + fromPartial(object: Partial): Misbehaviour { const message = createBaseMisbehaviour(); message.clientId = object.clientId ?? ""; message.header1 = @@ -612,7 +609,7 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { + fromPartial(object: Partial
): Header { const message = createBaseHeader(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -694,7 +691,7 @@ export const Fraction = { return obj; }, - fromPartial, I>>(object: I): Fraction { + fromPartial(object: Partial): Fraction { const message = createBaseFraction(); message.numerator = object.numerator !== undefined && object.numerator !== null diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index cbe95b1d..7e4c23ba 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Timestamp } from "../../google/protobuf/timestamp"; import { Header } from "../types/types"; @@ -8,7 +7,6 @@ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; import { isSet, - DeepPartial, Long, fromJsonTimestamp, bytesFromBase64, @@ -804,7 +802,7 @@ export const Request = { return obj; }, - fromPartial(object: DeepPartial): Request { + fromPartial(object: Partial): Request { const message = createBaseRequest(); message.echo = object.echo !== undefined && object.echo !== null ? RequestEcho.fromPartial(object.echo) : undefined; @@ -915,7 +913,7 @@ export const RequestEcho = { return obj; }, - fromPartial(object: DeepPartial): RequestEcho { + fromPartial(object: Partial): RequestEcho { const message = createBaseRequestEcho(); message.message = object.message ?? ""; return message; @@ -958,7 +956,7 @@ export const RequestFlush = { return obj; }, - fromPartial(_: DeepPartial): RequestFlush { + fromPartial(_: Partial): RequestFlush { const message = createBaseRequestFlush(); return message; }, @@ -1036,7 +1034,7 @@ export const RequestInfo = { return obj; }, - fromPartial(object: DeepPartial): RequestInfo { + fromPartial(object: Partial): RequestInfo { const message = createBaseRequestInfo(); message.version = object.version ?? ""; message.blockVersion = @@ -1111,7 +1109,7 @@ export const RequestSetOption = { return obj; }, - fromPartial(object: DeepPartial): RequestSetOption { + fromPartial(object: Partial): RequestSetOption { const message = createBaseRequestSetOption(); message.key = object.key ?? ""; message.value = object.value ?? ""; @@ -1240,7 +1238,7 @@ export const RequestInitChain = { return obj; }, - fromPartial(object: DeepPartial): RequestInitChain { + fromPartial(object: Partial): RequestInitChain { const message = createBaseRequestInitChain(); message.time = object.time !== undefined && object.time !== null ? Timestamp.fromPartial(object.time) : undefined; @@ -1342,7 +1340,7 @@ export const RequestQuery = { return obj; }, - fromPartial(object: DeepPartial): RequestQuery { + fromPartial(object: Partial): RequestQuery { const message = createBaseRequestQuery(); message.data = object.data ?? new Uint8Array(); message.path = object.path ?? ""; @@ -1449,7 +1447,7 @@ export const RequestBeginBlock = { return obj; }, - fromPartial(object: DeepPartial): RequestBeginBlock { + fromPartial(object: Partial): RequestBeginBlock { const message = createBaseRequestBeginBlock(); message.hash = object.hash ?? new Uint8Array(); message.header = @@ -1524,7 +1522,7 @@ export const RequestCheckTx = { return obj; }, - fromPartial(object: DeepPartial): RequestCheckTx { + fromPartial(object: Partial): RequestCheckTx { const message = createBaseRequestCheckTx(); message.tx = object.tx ?? new Uint8Array(); message.type = object.type ?? 0; @@ -1582,7 +1580,7 @@ export const RequestDeliverTx = { return obj; }, - fromPartial(object: DeepPartial): RequestDeliverTx { + fromPartial(object: Partial): RequestDeliverTx { const message = createBaseRequestDeliverTx(); message.tx = object.tx ?? new Uint8Array(); return message; @@ -1638,7 +1636,7 @@ export const RequestEndBlock = { return obj; }, - fromPartial(object: DeepPartial): RequestEndBlock { + fromPartial(object: Partial): RequestEndBlock { const message = createBaseRequestEndBlock(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1682,7 +1680,7 @@ export const RequestCommit = { return obj; }, - fromPartial(_: DeepPartial): RequestCommit { + fromPartial(_: Partial): RequestCommit { const message = createBaseRequestCommit(); return message; }, @@ -1724,7 +1722,7 @@ export const RequestListSnapshots = { return obj; }, - fromPartial(_: DeepPartial): RequestListSnapshots { + fromPartial(_: Partial): RequestListSnapshots { const message = createBaseRequestListSnapshots(); return message; }, @@ -1792,7 +1790,7 @@ export const RequestOfferSnapshot = { return obj; }, - fromPartial(object: DeepPartial): RequestOfferSnapshot { + fromPartial(object: Partial): RequestOfferSnapshot { const message = createBaseRequestOfferSnapshot(); message.snapshot = object.snapshot !== undefined && object.snapshot !== null @@ -1874,7 +1872,7 @@ export const RequestLoadSnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): RequestLoadSnapshotChunk { + fromPartial(object: Partial): RequestLoadSnapshotChunk { const message = createBaseRequestLoadSnapshotChunk(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; @@ -1956,7 +1954,7 @@ export const RequestApplySnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): RequestApplySnapshotChunk { + fromPartial(object: Partial): RequestApplySnapshotChunk { const message = createBaseRequestApplySnapshotChunk(); message.index = object.index ?? 0; message.chunk = object.chunk ?? new Uint8Array(); @@ -2209,7 +2207,7 @@ export const Response = { return obj; }, - fromPartial(object: DeepPartial): Response { + fromPartial(object: Partial): Response { const message = createBaseResponse(); message.exception = object.exception !== undefined && object.exception !== null @@ -2324,7 +2322,7 @@ export const ResponseException = { return obj; }, - fromPartial(object: DeepPartial): ResponseException { + fromPartial(object: Partial): ResponseException { const message = createBaseResponseException(); message.error = object.error ?? ""; return message; @@ -2380,7 +2378,7 @@ export const ResponseEcho = { return obj; }, - fromPartial(object: DeepPartial): ResponseEcho { + fromPartial(object: Partial): ResponseEcho { const message = createBaseResponseEcho(); message.message = object.message ?? ""; return message; @@ -2423,7 +2421,7 @@ export const ResponseFlush = { return obj; }, - fromPartial(_: DeepPartial): ResponseFlush { + fromPartial(_: Partial): ResponseFlush { const message = createBaseResponseFlush(); return message; }, @@ -2528,7 +2526,7 @@ export const ResponseInfo = { return obj; }, - fromPartial(object: DeepPartial): ResponseInfo { + fromPartial(object: Partial): ResponseInfo { const message = createBaseResponseInfo(); message.data = object.data ?? ""; message.version = object.version ?? ""; @@ -2616,7 +2614,7 @@ export const ResponseSetOption = { return obj; }, - fromPartial(object: DeepPartial): ResponseSetOption { + fromPartial(object: Partial): ResponseSetOption { const message = createBaseResponseSetOption(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2710,7 +2708,7 @@ export const ResponseInitChain = { return obj; }, - fromPartial(object: DeepPartial): ResponseInitChain { + fromPartial(object: Partial): ResponseInitChain { const message = createBaseResponseInitChain(); message.consensusParams = object.consensusParams !== undefined && object.consensusParams !== null @@ -2862,7 +2860,7 @@ export const ResponseQuery = { return obj; }, - fromPartial(object: DeepPartial): ResponseQuery { + fromPartial(object: Partial): ResponseQuery { const message = createBaseResponseQuery(); message.code = object.code ?? 0; message.log = object.log ?? ""; @@ -2937,7 +2935,7 @@ export const ResponseBeginBlock = { return obj; }, - fromPartial(object: DeepPartial): ResponseBeginBlock { + fromPartial(object: Partial): ResponseBeginBlock { const message = createBaseResponseBeginBlock(); message.events = object.events?.map((e) => Event.fromPartial(e)) || []; return message; @@ -3077,7 +3075,7 @@ export const ResponseCheckTx = { return obj; }, - fromPartial(object: DeepPartial): ResponseCheckTx { + fromPartial(object: Partial): ResponseCheckTx { const message = createBaseResponseCheckTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3228,7 +3226,7 @@ export const ResponseDeliverTx = { return obj; }, - fromPartial(object: DeepPartial): ResponseDeliverTx { + fromPartial(object: Partial): ResponseDeliverTx { const message = createBaseResponseDeliverTx(); message.code = object.code ?? 0; message.data = object.data ?? new Uint8Array(); @@ -3336,7 +3334,7 @@ export const ResponseEndBlock = { return obj; }, - fromPartial(object: DeepPartial): ResponseEndBlock { + fromPartial(object: Partial): ResponseEndBlock { const message = createBaseResponseEndBlock(); message.validatorUpdates = object.validatorUpdates?.map((e) => ValidatorUpdate.fromPartial(e)) || []; message.consensusParamUpdates = @@ -3409,7 +3407,7 @@ export const ResponseCommit = { return obj; }, - fromPartial(object: DeepPartial): ResponseCommit { + fromPartial(object: Partial): ResponseCommit { const message = createBaseResponseCommit(); message.data = object.data ?? new Uint8Array(); message.retainHeight = @@ -3477,7 +3475,7 @@ export const ResponseListSnapshots = { return obj; }, - fromPartial(object: DeepPartial): ResponseListSnapshots { + fromPartial(object: Partial): ResponseListSnapshots { const message = createBaseResponseListSnapshots(); message.snapshots = object.snapshots?.map((e) => Snapshot.fromPartial(e)) || []; return message; @@ -3533,7 +3531,7 @@ export const ResponseOfferSnapshot = { return obj; }, - fromPartial(object: DeepPartial): ResponseOfferSnapshot { + fromPartial(object: Partial): ResponseOfferSnapshot { const message = createBaseResponseOfferSnapshot(); message.result = object.result ?? 0; return message; @@ -3590,7 +3588,7 @@ export const ResponseLoadSnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): ResponseLoadSnapshotChunk { + fromPartial(object: Partial): ResponseLoadSnapshotChunk { const message = createBaseResponseLoadSnapshotChunk(); message.chunk = object.chunk ?? new Uint8Array(); return message; @@ -3696,7 +3694,7 @@ export const ResponseApplySnapshotChunk = { return obj; }, - fromPartial(object: DeepPartial): ResponseApplySnapshotChunk { + fromPartial(object: Partial): ResponseApplySnapshotChunk { const message = createBaseResponseApplySnapshotChunk(); message.result = object.result ?? 0; message.refetchChunks = object.refetchChunks?.map((e) => e) || []; @@ -3791,7 +3789,7 @@ export const ConsensusParams = { return obj; }, - fromPartial(object: DeepPartial): ConsensusParams { + fromPartial(object: Partial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -3871,7 +3869,7 @@ export const BlockParams = { return obj; }, - fromPartial(object: DeepPartial): BlockParams { + fromPartial(object: Partial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -3947,7 +3945,7 @@ export const LastCommitInfo = { return obj; }, - fromPartial(object: DeepPartial): LastCommitInfo { + fromPartial(object: Partial): LastCommitInfo { const message = createBaseLastCommitInfo(); message.round = object.round ?? 0; message.votes = object.votes?.map((e) => VoteInfo.fromPartial(e)) || []; @@ -4023,7 +4021,7 @@ export const Event = { return obj; }, - fromPartial(object: DeepPartial): Event { + fromPartial(object: Partial): Event { const message = createBaseEvent(); message.type = object.type ?? ""; message.attributes = object.attributes?.map((e) => EventAttribute.fromPartial(e)) || []; @@ -4104,7 +4102,7 @@ export const EventAttribute = { return obj; }, - fromPartial(object: DeepPartial): EventAttribute { + fromPartial(object: Partial): EventAttribute { const message = createBaseEventAttribute(); message.key = object.key ?? new Uint8Array(); message.value = object.value ?? new Uint8Array(); @@ -4197,7 +4195,7 @@ export const TxResult = { return obj; }, - fromPartial(object: DeepPartial): TxResult { + fromPartial(object: Partial): TxResult { const message = createBaseTxResult(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -4272,7 +4270,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial(object: Partial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.power = @@ -4342,7 +4340,7 @@ export const ValidatorUpdate = { return obj; }, - fromPartial(object: DeepPartial): ValidatorUpdate { + fromPartial(object: Partial): ValidatorUpdate { const message = createBaseValidatorUpdate(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null @@ -4415,7 +4413,7 @@ export const VoteInfo = { return obj; }, - fromPartial(object: DeepPartial): VoteInfo { + fromPartial(object: Partial): VoteInfo { const message = createBaseVoteInfo(); message.validator = object.validator !== undefined && object.validator !== null @@ -4521,7 +4519,7 @@ export const Evidence = { return obj; }, - fromPartial(object: DeepPartial): Evidence { + fromPartial(object: Partial): Evidence { const message = createBaseEvidence(); message.type = object.type ?? 0; message.validator = @@ -4635,7 +4633,7 @@ export const Snapshot = { return obj; }, - fromPartial(object: DeepPartial): Snapshot { + fromPartial(object: Partial): Snapshot { const message = createBaseSnapshot(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.UZERO; diff --git a/src/tendermint/crypto/keys.ts b/src/tendermint/crypto/keys.ts index adf582ef..439f3e78 100644 --- a/src/tendermint/crypto/keys.ts +++ b/src/tendermint/crypto/keys.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; +import { isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; /** PublicKey defines the keys available for use with Tendermint Validators */ @@ -72,7 +71,7 @@ export const PublicKey = { return obj; }, - fromPartial(object: DeepPartial): PublicKey { + fromPartial(object: Partial): PublicKey { const message = createBasePublicKey(); message.ed25519 = object.ed25519 ?? undefined; message.secp256k1 = object.secp256k1 ?? undefined; diff --git a/src/tendermint/crypto/proof.ts b/src/tendermint/crypto/proof.ts index 6e84072c..e5cd21d0 100644 --- a/src/tendermint/crypto/proof.ts +++ b/src/tendermint/crypto/proof.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, bytesFromBase64, base64FromBytes, DeepPartial } from "../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.crypto"; export interface Proof { total: Long; @@ -127,7 +126,7 @@ export const Proof = { return obj; }, - fromPartial(object: DeepPartial): Proof { + fromPartial(object: Partial): Proof { const message = createBaseProof(); message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.ZERO; @@ -200,7 +199,7 @@ export const ValueOp = { return obj; }, - fromPartial(object: DeepPartial): ValueOp { + fromPartial(object: Partial): ValueOp { const message = createBaseValueOp(); message.key = object.key ?? new Uint8Array(); message.proof = @@ -280,7 +279,7 @@ export const DominoOp = { return obj; }, - fromPartial(object: DeepPartial): DominoOp { + fromPartial(object: Partial): DominoOp { const message = createBaseDominoOp(); message.key = object.key ?? ""; message.input = object.input ?? ""; @@ -362,7 +361,7 @@ export const ProofOp = { return obj; }, - fromPartial(object: DeepPartial): ProofOp { + fromPartial(object: Partial): ProofOp { const message = createBaseProofOp(); message.type = object.type ?? ""; message.key = object.key ?? new Uint8Array(); @@ -426,7 +425,7 @@ export const ProofOps = { return obj; }, - fromPartial(object: DeepPartial): ProofOps { + fromPartial(object: Partial): ProofOps { const message = createBaseProofOps(); message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || []; return message; diff --git a/src/tendermint/p2p/types.ts b/src/tendermint/p2p/types.ts index 3a3dd206..8978d336 100644 --- a/src/tendermint/p2p/types.ts +++ b/src/tendermint/p2p/types.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { isSet, Long, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.p2p"; export interface NetAddress { id: string; @@ -99,7 +98,7 @@ export const NetAddress = { return obj; }, - fromPartial(object: DeepPartial): NetAddress { + fromPartial(object: Partial): NetAddress { const message = createBaseNetAddress(); message.id = object.id ?? ""; message.ip = object.ip ?? ""; @@ -179,7 +178,7 @@ export const ProtocolVersion = { return obj; }, - fromPartial(object: DeepPartial): ProtocolVersion { + fromPartial(object: Partial): ProtocolVersion { const message = createBaseProtocolVersion(); message.p2p = object.p2p !== undefined && object.p2p !== null ? Long.fromValue(object.p2p) : Long.UZERO; message.block = @@ -322,7 +321,7 @@ export const DefaultNodeInfo = { return obj; }, - fromPartial(object: DeepPartial): DefaultNodeInfo { + fromPartial(object: Partial): DefaultNodeInfo { const message = createBaseDefaultNodeInfo(); message.protocolVersion = object.protocolVersion !== undefined && object.protocolVersion !== null @@ -402,7 +401,7 @@ export const DefaultNodeInfoOther = { return obj; }, - fromPartial(object: DeepPartial): DefaultNodeInfoOther { + fromPartial(object: Partial): DefaultNodeInfoOther { const message = createBaseDefaultNodeInfoOther(); message.txIndex = object.txIndex ?? ""; message.rpcAddress = object.rpcAddress ?? ""; diff --git a/src/tendermint/types/block.ts b/src/tendermint/types/block.ts index 0bfb1e9b..3da298c2 100644 --- a/src/tendermint/types/block.ts +++ b/src/tendermint/types/block.ts @@ -1,9 +1,8 @@ -//@ts-nocheck /* eslint-disable */ import { Header, Data, Commit } from "./types"; import { EvidenceList } from "./evidence"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial } from "../../helpers"; +import { isSet } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Block { header?: Header; @@ -96,7 +95,7 @@ export const Block = { return obj; }, - fromPartial(object: DeepPartial): Block { + fromPartial(object: Partial): Block { const message = createBaseBlock(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; diff --git a/src/tendermint/types/evidence.ts b/src/tendermint/types/evidence.ts index 3fb3ef88..c8a6ab35 100644 --- a/src/tendermint/types/evidence.ts +++ b/src/tendermint/types/evidence.ts @@ -1,10 +1,9 @@ -//@ts-nocheck /* eslint-disable */ import { Vote, LightBlock } from "./types"; import { Timestamp } from "../../google/protobuf/timestamp"; import { Validator } from "./validator"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; +import { isSet, Long, fromJsonTimestamp, fromTimestamp } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface Evidence { duplicateVoteEvidence?: DuplicateVoteEvidence; @@ -102,7 +101,7 @@ export const Evidence = { return obj; }, - fromPartial(object: DeepPartial): Evidence { + fromPartial(object: Partial): Evidence { const message = createBaseEvidence(); message.duplicateVoteEvidence = object.duplicateVoteEvidence !== undefined && object.duplicateVoteEvidence !== null @@ -211,7 +210,7 @@ export const DuplicateVoteEvidence = { return obj; }, - fromPartial(object: DeepPartial): DuplicateVoteEvidence { + fromPartial(object: Partial): DuplicateVoteEvidence { const message = createBaseDuplicateVoteEvidence(); message.voteA = object.voteA !== undefined && object.voteA !== null ? Vote.fromPartial(object.voteA) : undefined; @@ -340,7 +339,7 @@ export const LightClientAttackEvidence = { return obj; }, - fromPartial(object: DeepPartial): LightClientAttackEvidence { + fromPartial(object: Partial): LightClientAttackEvidence { const message = createBaseLightClientAttackEvidence(); message.conflictingBlock = object.conflictingBlock !== undefined && object.conflictingBlock !== null @@ -418,7 +417,7 @@ export const EvidenceList = { return obj; }, - fromPartial(object: DeepPartial): EvidenceList { + fromPartial(object: Partial): EvidenceList { const message = createBaseEvidenceList(); message.evidence = object.evidence?.map((e) => Evidence.fromPartial(e)) || []; return message; diff --git a/src/tendermint/types/params.ts b/src/tendermint/types/params.ts index 2eccfa83..77808af5 100644 --- a/src/tendermint/types/params.ts +++ b/src/tendermint/types/params.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { Duration } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; -import { isSet, DeepPartial, Long } from "../../helpers"; +import { isSet, Long } from "../../helpers"; export const protobufPackage = "tendermint.types"; /** * ConsensusParams contains consensus critical parameters that determine the @@ -175,7 +174,7 @@ export const ConsensusParams = { return obj; }, - fromPartial(object: DeepPartial): ConsensusParams { + fromPartial(object: Partial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; @@ -266,7 +265,7 @@ export const BlockParams = { return obj; }, - fromPartial(object: DeepPartial): BlockParams { + fromPartial(object: Partial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? Long.fromValue(object.maxBytes) : Long.ZERO; @@ -353,7 +352,7 @@ export const EvidenceParams = { return obj; }, - fromPartial(object: DeepPartial): EvidenceParams { + fromPartial(object: Partial): EvidenceParams { const message = createBaseEvidenceParams(); message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null @@ -424,7 +423,7 @@ export const ValidatorParams = { return obj; }, - fromPartial(object: DeepPartial): ValidatorParams { + fromPartial(object: Partial): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pubKeyTypes?.map((e) => e) || []; return message; @@ -480,7 +479,7 @@ export const VersionParams = { return obj; }, - fromPartial(object: DeepPartial): VersionParams { + fromPartial(object: Partial): VersionParams { const message = createBaseVersionParams(); message.appVersion = object.appVersion !== undefined && object.appVersion !== null @@ -551,7 +550,7 @@ export const HashedParams = { return obj; }, - fromPartial(object: DeepPartial): HashedParams { + fromPartial(object: Partial): HashedParams { const message = createBaseHashedParams(); message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null diff --git a/src/tendermint/types/types.ts b/src/tendermint/types/types.ts index c780c376..431bb2c4 100644 --- a/src/tendermint/types/types.ts +++ b/src/tendermint/types/types.ts @@ -1,4 +1,3 @@ -//@ts-nocheck /* eslint-disable */ import { Proof } from "../crypto/proof"; import { Consensus } from "../version/types"; @@ -9,7 +8,6 @@ import { isSet, bytesFromBase64, base64FromBytes, - DeepPartial, Long, fromJsonTimestamp, fromTimestamp, @@ -308,7 +306,7 @@ export const PartSetHeader = { return obj; }, - fromPartial(object: DeepPartial): PartSetHeader { + fromPartial(object: Partial): PartSetHeader { const message = createBasePartSetHeader(); message.total = object.total ?? 0; message.hash = object.hash ?? new Uint8Array(); @@ -388,7 +386,7 @@ export const Part = { return obj; }, - fromPartial(object: DeepPartial): Part { + fromPartial(object: Partial): Part { const message = createBasePart(); message.index = object.index ?? 0; message.bytes = object.bytes ?? new Uint8Array(); @@ -460,7 +458,7 @@ export const BlockID = { return obj; }, - fromPartial(object: DeepPartial): BlockID { + fromPartial(object: Partial): BlockID { const message = createBaseBlockID(); message.hash = object.hash ?? new Uint8Array(); message.partSetHeader = @@ -698,7 +696,7 @@ export const Header = { return obj; }, - fromPartial(object: DeepPartial
): Header { + fromPartial(object: Partial
): Header { const message = createBaseHeader(); message.version = object.version !== undefined && object.version !== null @@ -781,7 +779,7 @@ export const Data = { return obj; }, - fromPartial(object: DeepPartial): Data { + fromPartial(object: Partial): Data { const message = createBaseData(); message.txs = object.txs?.map((e) => e) || []; return message; @@ -923,7 +921,7 @@ export const Vote = { return obj; }, - fromPartial(object: DeepPartial): Vote { + fromPartial(object: Partial): Vote { const message = createBaseVote(); message.type = object.type ?? 0; message.height = @@ -1035,7 +1033,7 @@ export const Commit = { return obj; }, - fromPartial(object: DeepPartial): Commit { + fromPartial(object: Partial): Commit { const message = createBaseCommit(); message.height = object.height !== undefined && object.height !== null ? Long.fromValue(object.height) : Long.ZERO; @@ -1139,7 +1137,7 @@ export const CommitSig = { return obj; }, - fromPartial(object: DeepPartial): CommitSig { + fromPartial(object: Partial): CommitSig { const message = createBaseCommitSig(); message.blockIdFlag = object.blockIdFlag ?? 0; message.validatorAddress = object.validatorAddress ?? new Uint8Array(); @@ -1271,7 +1269,7 @@ export const Proposal = { return obj; }, - fromPartial(object: DeepPartial): Proposal { + fromPartial(object: Partial): Proposal { const message = createBaseProposal(); message.type = object.type ?? 0; message.height = @@ -1351,7 +1349,7 @@ export const SignedHeader = { return obj; }, - fromPartial(object: DeepPartial): SignedHeader { + fromPartial(object: Partial): SignedHeader { const message = createBaseSignedHeader(); message.header = object.header !== undefined && object.header !== null ? Header.fromPartial(object.header) : undefined; @@ -1423,7 +1421,7 @@ export const LightBlock = { return obj; }, - fromPartial(object: DeepPartial): LightBlock { + fromPartial(object: Partial): LightBlock { const message = createBaseLightBlock(); message.signedHeader = object.signedHeader !== undefined && object.signedHeader !== null @@ -1520,7 +1518,7 @@ export const BlockMeta = { return obj; }, - fromPartial(object: DeepPartial): BlockMeta { + fromPartial(object: Partial): BlockMeta { const message = createBaseBlockMeta(); message.blockId = object.blockId !== undefined && object.blockId !== null @@ -1611,7 +1609,7 @@ export const TxProof = { return obj; }, - fromPartial(object: DeepPartial): TxProof { + fromPartial(object: Partial): TxProof { const message = createBaseTxProof(); message.rootHash = object.rootHash ?? new Uint8Array(); message.data = object.data ?? new Uint8Array(); diff --git a/src/tendermint/types/validator.ts b/src/tendermint/types/validator.ts index 207d2748..882f91e0 100644 --- a/src/tendermint/types/validator.ts +++ b/src/tendermint/types/validator.ts @@ -1,8 +1,7 @@ -//@ts-nocheck /* eslint-disable */ import { PublicKey } from "../crypto/keys"; import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../helpers"; +import { Long, isSet, bytesFromBase64, base64FromBytes } from "../../helpers"; export const protobufPackage = "tendermint.types"; export interface ValidatorSet { validators: Validator[]; @@ -101,7 +100,7 @@ export const ValidatorSet = { return obj; }, - fromPartial(object: DeepPartial): ValidatorSet { + fromPartial(object: Partial): ValidatorSet { const message = createBaseValidatorSet(); message.validators = object.validators?.map((e) => Validator.fromPartial(e)) || []; message.proposer = @@ -201,7 +200,7 @@ export const Validator = { return obj; }, - fromPartial(object: DeepPartial): Validator { + fromPartial(object: Partial): Validator { const message = createBaseValidator(); message.address = object.address ?? new Uint8Array(); message.pubKey = @@ -281,7 +280,7 @@ export const SimpleValidator = { return obj; }, - fromPartial(object: DeepPartial): SimpleValidator { + fromPartial(object: Partial): SimpleValidator { const message = createBaseSimpleValidator(); message.pubKey = object.pubKey !== undefined && object.pubKey !== null diff --git a/src/tendermint/version/types.ts b/src/tendermint/version/types.ts index ee26bf30..9aba02b2 100644 --- a/src/tendermint/version/types.ts +++ b/src/tendermint/version/types.ts @@ -1,7 +1,6 @@ -//@ts-nocheck /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { Long, isSet, DeepPartial } from "../../helpers"; +import { Long, isSet } from "../../helpers"; export const protobufPackage = "tendermint.version"; /** * App includes the protocol and software version for the application. @@ -84,7 +83,7 @@ export const App = { return obj; }, - fromPartial(object: DeepPartial): App { + fromPartial(object: Partial): App { const message = createBaseApp(); message.protocol = object.protocol !== undefined && object.protocol !== null @@ -155,7 +154,7 @@ export const Consensus = { return obj; }, - fromPartial(object: DeepPartial): Consensus { + fromPartial(object: Partial): Consensus { const message = createBaseConsensus(); message.block = object.block !== undefined && object.block !== null ? Long.fromValue(object.block) : Long.UZERO; From a199b974bd57d95507913d71f230faaf2e422aff Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 16:11:31 -0700 Subject: [PATCH 36/38] update to/from JSON for json_name proto option --- package-lock.json | 74 ++++++++++++++++++------------------ package.json | 2 +- scripts/codegen.js | 2 +- src/helpers.ts | 2 +- src/tendermint/abci/types.ts | 16 ++++---- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 94403a66..d86284e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.66.1", + "@osmonauts/telescope": "^0.66.2", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.0.tgz", - "integrity": "sha512-s2PGxvYJUhDkLdQs6eGaX06clSpafglKR8Yr0O5Baacc4XI3sYjBa76eBFikN3ijXYji2Ue3cJsvXakb4z5EVg==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.1.tgz", + "integrity": "sha512-h5TvMpZdcOSN8tAh8nF6Dg5gf9gxplT0ffD87kzaL5oEMvdTAHuD8JNFwq/o+Q/c2LRkGBC+BQblb0yBCeWE+g==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.30.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/proto-parser": "^0.30.1", + "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.0.tgz", - "integrity": "sha512-2BcXrE3/yp2cev8X3uUXKvgMjg7t5qJcGZQerBjihbhIee1YtKdXQDlpcj4fzQqhM6JObBDmClt3mDDCeRhViQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.1.tgz", + "integrity": "sha512-rNYiXKlMUqY5X17y1Ck2tD7pXczXecLcFriCTSuQBzSqJ2p2OHbKmJGuYERmoDnbTtxJ2jOEV1sc/SSxtpITJA==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/types": "^0.22.1", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.1.tgz", - "integrity": "sha512-YNFzP/wUItwpTffTLXuUEiw5Yjj3cM51yV3ZHCAkQpk2gg2lV5j8k9W1Q6EWNyvWQYHZ9an8neov4irKhSk+Aw==", + "version": "0.66.2", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.2.tgz", + "integrity": "sha512-LqgnPitgEm0qp9vr38ati143guvWErKX9mbX5Y5lZIvvSAXPlLiNeJqs0YUajK9lF1iC8lH1mY2YaDsw72vSaw==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,9 +2189,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.59.0", - "@osmonauts/proto-parser": "^0.30.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/ast": "^0.59.1", + "@osmonauts/proto-parser": "^0.30.1", + "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2342,9 +2342,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.0.tgz", - "integrity": "sha512-b2nHnXseMzgYZPBotKatevrKYMHObKZ+nVz63Km07yfmW2QqYmJkfUdBv+ieP3qvDrOQPMs1mdGvlYLWW7e4LA==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.1.tgz", + "integrity": "sha512-H+Ajjno32SRtvgaFfv0fDMnoxP9I974E2TzFCoCGi0yDWOHkaaqNp8rGXPo2cZytGHDoxlCwhnlC8Z3oo7TfzQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -6490,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.0.tgz", - "integrity": "sha512-s2PGxvYJUhDkLdQs6eGaX06clSpafglKR8Yr0O5Baacc4XI3sYjBa76eBFikN3ijXYji2Ue3cJsvXakb4z5EVg==", + "version": "0.59.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.1.tgz", + "integrity": "sha512-h5TvMpZdcOSN8tAh8nF6Dg5gf9gxplT0ffD87kzaL5oEMvdTAHuD8JNFwq/o+Q/c2LRkGBC+BQblb0yBCeWE+g==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.30.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/proto-parser": "^0.30.1", + "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.0.tgz", - "integrity": "sha512-2BcXrE3/yp2cev8X3uUXKvgMjg7t5qJcGZQerBjihbhIee1YtKdXQDlpcj4fzQqhM6JObBDmClt3mDDCeRhViQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.1.tgz", + "integrity": "sha512-rNYiXKlMUqY5X17y1Ck2tD7pXczXecLcFriCTSuQBzSqJ2p2OHbKmJGuYERmoDnbTtxJ2jOEV1sc/SSxtpITJA==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/types": "^0.22.1", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.1.tgz", - "integrity": "sha512-YNFzP/wUItwpTffTLXuUEiw5Yjj3cM51yV3ZHCAkQpk2gg2lV5j8k9W1Q6EWNyvWQYHZ9an8neov4irKhSk+Aw==", + "version": "0.66.2", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.2.tgz", + "integrity": "sha512-LqgnPitgEm0qp9vr38ati143guvWErKX9mbX5Y5lZIvvSAXPlLiNeJqs0YUajK9lF1iC8lH1mY2YaDsw72vSaw==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,9 +6537,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.59.0", - "@osmonauts/proto-parser": "^0.30.0", - "@osmonauts/types": "^0.22.0", + "@osmonauts/ast": "^0.59.1", + "@osmonauts/proto-parser": "^0.30.1", + "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6674,9 +6674,9 @@ } }, "@osmonauts/types": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.0.tgz", - "integrity": "sha512-b2nHnXseMzgYZPBotKatevrKYMHObKZ+nVz63Km07yfmW2QqYmJkfUdBv+ieP3qvDrOQPMs1mdGvlYLWW7e4LA==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.1.tgz", + "integrity": "sha512-H+Ajjno32SRtvgaFfv0fDMnoxP9I974E2TzFCoCGi0yDWOHkaaqNp8rGXPo2cZytGHDoxlCwhnlC8Z3oo7TfzQ==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", diff --git a/package.json b/package.json index 674979a5..c9e0db1f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.66.1", + "@osmonauts/telescope": "^0.66.2", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index 894366e0..ef2cad43 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -12,7 +12,7 @@ telescope({ ], outPath: join(__dirname, '/../src'), options: { - logLevel: 2, + logLevel: 0, useSDKTypes: false, tsDisable: { disableAll: false diff --git a/src/helpers.ts b/src/helpers.ts index 194a12e8..6fff0715 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.66.1 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.66.2 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index 7e4c23ba..e1efc67b 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -3048,8 +3048,8 @@ export const ResponseCheckTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gas_wanted) ? Long.fromValue(object.gas_wanted) : Long.ZERO, + gasUsed: isSet(object.gas_used) ? Long.fromValue(object.gas_used) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -3062,8 +3062,8 @@ export const ResponseCheckTx = { (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 || Long.ZERO).toString()); - message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString()); + message.gasWanted !== undefined && (obj.gas_wanted = (message.gasWanted || Long.ZERO).toString()); + message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || Long.ZERO).toString()); if (message.events) { obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); @@ -3199,8 +3199,8 @@ export const ResponseDeliverTx = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(), log: isSet(object.log) ? String(object.log) : "", info: isSet(object.info) ? String(object.info) : "", - gasWanted: isSet(object.gasWanted) ? Long.fromValue(object.gasWanted) : Long.ZERO, - gasUsed: isSet(object.gasUsed) ? Long.fromValue(object.gasUsed) : Long.ZERO, + gasWanted: isSet(object.gas_wanted) ? Long.fromValue(object.gas_wanted) : Long.ZERO, + gasUsed: isSet(object.gas_used) ? Long.fromValue(object.gas_used) : Long.ZERO, events: Array.isArray(object?.events) ? object.events.map((e: any) => Event.fromJSON(e)) : [], codespace: isSet(object.codespace) ? String(object.codespace) : "", }; @@ -3213,8 +3213,8 @@ export const ResponseDeliverTx = { (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 || Long.ZERO).toString()); - message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString()); + message.gasWanted !== undefined && (obj.gas_wanted = (message.gasWanted || Long.ZERO).toString()); + message.gasUsed !== undefined && (obj.gas_used = (message.gasUsed || Long.ZERO).toString()); if (message.events) { obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined)); From 75a15feb5c681362837bc47be086a7cb6751b94a Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 13 Oct 2022 16:39:10 -0700 Subject: [PATCH 37/38] QueryClientImpl -> ServiceClientImpl for relevant services --- package-lock.json | 30 ++++++++++----------- package.json | 2 +- src/cosmos/base/tendermint/v1beta1/query.ts | 2 +- src/cosmos/tx/v1beta1/service.ts | 2 +- src/helpers.ts | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index d86284e3..f28dd3fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.66.2", + "@osmonauts/telescope": "^0.67.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,9 +2142,9 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.1.tgz", - "integrity": "sha512-h5TvMpZdcOSN8tAh8nF6Dg5gf9gxplT0ffD87kzaL5oEMvdTAHuD8JNFwq/o+Q/c2LRkGBC+BQblb0yBCeWE+g==", + "version": "0.60.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.60.1.tgz", + "integrity": "sha512-se4PAiZ5mIw1YQ1lTyCHDWe+P+F4/WoYNj5jkbq8255ojfubG0ecKn2UhbDesQRLDnb/5Nx8l1/JV71uPtv5MA==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.2.tgz", - "integrity": "sha512-LqgnPitgEm0qp9vr38ati143guvWErKX9mbX5Y5lZIvvSAXPlLiNeJqs0YUajK9lF1iC8lH1mY2YaDsw72vSaw==", + "version": "0.67.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.67.1.tgz", + "integrity": "sha512-o9gnVeerbKaTQPNm+m1DTE9Mr9B3aTNTNsFdAKKCwsJsLFgLhjIhVt+yTbQQ1phpE4sbWuo3KVnPVDcZYTyvFQ==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,7 +2189,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.59.1", + "@osmonauts/ast": "^0.60.1", "@osmonauts/proto-parser": "^0.30.1", "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", @@ -6490,9 +6490,9 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.59.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.59.1.tgz", - "integrity": "sha512-h5TvMpZdcOSN8tAh8nF6Dg5gf9gxplT0ffD87kzaL5oEMvdTAHuD8JNFwq/o+Q/c2LRkGBC+BQblb0yBCeWE+g==", + "version": "0.60.1", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.60.1.tgz", + "integrity": "sha512-se4PAiZ5mIw1YQ1lTyCHDWe+P+F4/WoYNj5jkbq8255ojfubG0ecKn2UhbDesQRLDnb/5Nx8l1/JV71uPtv5MA==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.66.2.tgz", - "integrity": "sha512-LqgnPitgEm0qp9vr38ati143guvWErKX9mbX5Y5lZIvvSAXPlLiNeJqs0YUajK9lF1iC8lH1mY2YaDsw72vSaw==", + "version": "0.67.1", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.67.1.tgz", + "integrity": "sha512-o9gnVeerbKaTQPNm+m1DTE9Mr9B3aTNTNsFdAKKCwsJsLFgLhjIhVt+yTbQQ1phpE4sbWuo3KVnPVDcZYTyvFQ==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,7 +6537,7 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.59.1", + "@osmonauts/ast": "^0.60.1", "@osmonauts/proto-parser": "^0.30.1", "@osmonauts/types": "^0.22.1", "@osmonauts/utils": "^0.7.0", diff --git a/package.json b/package.json index c9e0db1f..918cc578 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.66.2", + "@osmonauts/telescope": "^0.67.1", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/src/cosmos/base/tendermint/v1beta1/query.ts b/src/cosmos/base/tendermint/v1beta1/query.ts index 204c2f20..4eb375f3 100644 --- a/src/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/cosmos/base/tendermint/v1beta1/query.ts @@ -1249,7 +1249,7 @@ export interface Service { GetValidatorSetByHeight(request: GetValidatorSetByHeightRequest): Promise; } -export class QueryClientImpl implements Service { +export class ServiceClientImpl implements Service { private readonly rpc: Rpc; constructor(rpc: Rpc) { diff --git a/src/cosmos/tx/v1beta1/service.ts b/src/cosmos/tx/v1beta1/service.ts index ba87c0fe..ccad0b63 100644 --- a/src/cosmos/tx/v1beta1/service.ts +++ b/src/cosmos/tx/v1beta1/service.ts @@ -1039,7 +1039,7 @@ export interface Service { GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; } -export class QueryClientImpl implements Service { +export class ServiceClientImpl implements Service { private readonly rpc: Rpc; constructor(rpc: Rpc) { diff --git a/src/helpers.ts b/src/helpers.ts index 6fff0715..db22aca9 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.66.2 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.67.1 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ From 2842408de637d43abb5353a57cbe8cb17287c3ff Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Fri, 14 Oct 2022 15:25:33 -0700 Subject: [PATCH 38/38] services --- package-lock.json | 74 +++++----- package.json | 2 +- scripts/codegen.js | 9 +- .../base/reflection/v1beta1/reflection.ts | 46 ++++++- src/helpers.ts | 4 +- src/tendermint/abci/types.ts | 130 ++++++++++++++++++ 6 files changed, 223 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index f28dd3fb..f663775f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.67.1", + "@osmonauts/telescope": "^0.69.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", @@ -2142,28 +2142,28 @@ "dev": true }, "node_modules/@osmonauts/ast": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.60.1.tgz", - "integrity": "sha512-se4PAiZ5mIw1YQ1lTyCHDWe+P+F4/WoYNj5jkbq8255ojfubG0ecKn2UhbDesQRLDnb/5Nx8l1/JV71uPtv5MA==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.61.0.tgz", + "integrity": "sha512-GunM8DIOaTlDlXC1uF/eUfAFgWiBt6TI/UcKPVIGYaBSWQeWjcWd25+CBAQT6dn89Tq72bp6ck+wdvVqIoGR7g==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.30.1", - "@osmonauts/types": "^0.22.1", + "@osmonauts/proto-parser": "^0.31.0", + "@osmonauts/types": "^0.23.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "node_modules/@osmonauts/proto-parser": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.1.tgz", - "integrity": "sha512-rNYiXKlMUqY5X17y1Ck2tD7pXczXecLcFriCTSuQBzSqJ2p2OHbKmJGuYERmoDnbTtxJ2jOEV1sc/SSxtpITJA==", + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.31.0.tgz", + "integrity": "sha512-C1v5ndzU8h7dfIuwsbIW/w1/tL48h4vpn3C+Brq2wQCIXAbO6vuFaLn4PaTbHyChHMSQY8xs+kQoFKarog75Xw==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.22.1", + "@osmonauts/types": "^0.23.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -2171,9 +2171,9 @@ } }, "node_modules/@osmonauts/telescope": { - "version": "0.67.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.67.1.tgz", - "integrity": "sha512-o9gnVeerbKaTQPNm+m1DTE9Mr9B3aTNTNsFdAKKCwsJsLFgLhjIhVt+yTbQQ1phpE4sbWuo3KVnPVDcZYTyvFQ==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.69.0.tgz", + "integrity": "sha512-nd7xgv1PI5mEOTdqJepmiqgelc+4Bu/pqPSQX+5kkY8tFqD4CKw4RWnBdDLkMbEDhJSNU7VehsDh9X46s2DjMA==", "dev": true, "dependencies": { "@babel/core": "7.19.3", @@ -2189,9 +2189,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.60.1", - "@osmonauts/proto-parser": "^0.30.1", - "@osmonauts/types": "^0.22.1", + "@osmonauts/ast": "^0.61.0", + "@osmonauts/proto-parser": "^0.31.0", + "@osmonauts/types": "^0.23.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -2342,9 +2342,9 @@ "dev": true }, "node_modules/@osmonauts/types": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.1.tgz", - "integrity": "sha512-H+Ajjno32SRtvgaFfv0fDMnoxP9I974E2TzFCoCGi0yDWOHkaaqNp8rGXPo2cZytGHDoxlCwhnlC8Z3oo7TfzQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.23.0.tgz", + "integrity": "sha512-zNCYAU0tSQfiDuWl1r1eldvPgJikSQXM3JDDWznQtyIEBZ82pijFAOro/Wm58f3V+4tlxt/XTlL06JOvn9mJLg==", "dev": true, "dependencies": { "@babel/runtime": "^7.19.0", @@ -6490,28 +6490,28 @@ "dev": true }, "@osmonauts/ast": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.60.1.tgz", - "integrity": "sha512-se4PAiZ5mIw1YQ1lTyCHDWe+P+F4/WoYNj5jkbq8255ojfubG0ecKn2UhbDesQRLDnb/5Nx8l1/JV71uPtv5MA==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@osmonauts/ast/-/ast-0.61.0.tgz", + "integrity": "sha512-GunM8DIOaTlDlXC1uF/eUfAFgWiBt6TI/UcKPVIGYaBSWQeWjcWd25+CBAQT6dn89Tq72bp6ck+wdvVqIoGR7g==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", "@babel/types": "7.19.3", - "@osmonauts/proto-parser": "^0.30.1", - "@osmonauts/types": "^0.22.1", + "@osmonauts/proto-parser": "^0.31.0", + "@osmonauts/types": "^0.23.0", "@osmonauts/utils": "^0.7.0", "case": "1.6.3", "dotty": "0.1.2" } }, "@osmonauts/proto-parser": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.30.1.tgz", - "integrity": "sha512-rNYiXKlMUqY5X17y1Ck2tD7pXczXecLcFriCTSuQBzSqJ2p2OHbKmJGuYERmoDnbTtxJ2jOEV1sc/SSxtpITJA==", + "version": "0.31.0", + "resolved": "https://registry.npmjs.org/@osmonauts/proto-parser/-/proto-parser-0.31.0.tgz", + "integrity": "sha512-C1v5ndzU8h7dfIuwsbIW/w1/tL48h4vpn3C+Brq2wQCIXAbO6vuFaLn4PaTbHyChHMSQY8xs+kQoFKarog75Xw==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", - "@osmonauts/types": "^0.22.1", + "@osmonauts/types": "^0.23.0", "@pyramation/protobufjs": "6.11.5", "dotty": "0.1.2", "glob": "8.0.3", @@ -6519,9 +6519,9 @@ } }, "@osmonauts/telescope": { - "version": "0.67.1", - "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.67.1.tgz", - "integrity": "sha512-o9gnVeerbKaTQPNm+m1DTE9Mr9B3aTNTNsFdAKKCwsJsLFgLhjIhVt+yTbQQ1phpE4sbWuo3KVnPVDcZYTyvFQ==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@osmonauts/telescope/-/telescope-0.69.0.tgz", + "integrity": "sha512-nd7xgv1PI5mEOTdqJepmiqgelc+4Bu/pqPSQX+5kkY8tFqD4CKw4RWnBdDLkMbEDhJSNU7VehsDh9X46s2DjMA==", "dev": true, "requires": { "@babel/core": "7.19.3", @@ -6537,9 +6537,9 @@ "@babel/traverse": "7.19.3", "@babel/types": "7.19.3", "@cosmwasm/ts-codegen": "0.17.0", - "@osmonauts/ast": "^0.60.1", - "@osmonauts/proto-parser": "^0.30.1", - "@osmonauts/types": "^0.22.1", + "@osmonauts/ast": "^0.61.0", + "@osmonauts/proto-parser": "^0.31.0", + "@osmonauts/types": "^0.23.0", "@osmonauts/utils": "^0.7.0", "@types/parse-package-name": "0.1.0", "case": "1.6.3", @@ -6674,9 +6674,9 @@ } }, "@osmonauts/types": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.22.1.tgz", - "integrity": "sha512-H+Ajjno32SRtvgaFfv0fDMnoxP9I974E2TzFCoCGi0yDWOHkaaqNp8rGXPo2cZytGHDoxlCwhnlC8Z3oo7TfzQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@osmonauts/types/-/types-0.23.0.tgz", + "integrity": "sha512-zNCYAU0tSQfiDuWl1r1eldvPgJikSQXM3JDDWznQtyIEBZ82pijFAOro/Wm58f3V+4tlxt/XTlL06JOvn9mJLg==", "dev": true, "requires": { "@babel/runtime": "^7.19.0", diff --git a/package.json b/package.json index 918cc578..808cd4cc 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "protobufjs": "~6.11.2" }, "devDependencies": { - "@osmonauts/telescope": "^0.67.1", + "@osmonauts/telescope": "^0.69.0", "@types/long": "^4.0.1", "@types/node": "^15.6.2", "prettier": "^2.7.1", diff --git a/scripts/codegen.js b/scripts/codegen.js index ef2cad43..df3c08e1 100755 --- a/scripts/codegen.js +++ b/scripts/codegen.js @@ -67,7 +67,14 @@ telescope({ enabled: true, inline: true, extensions: false, - camelCase: false + camelCase: false, + enabledServices: [ + 'Msg', + 'Query', + 'Service', + 'ReflectionService', + 'ABCIApplication' + ] }, aminoEncoding: { enabled: false diff --git a/src/cosmos/base/reflection/v1beta1/reflection.ts b/src/cosmos/base/reflection/v1beta1/reflection.ts index 8d2d8a61..57c55ddf 100644 --- a/src/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import * as _m0 from "protobufjs/minimal"; -import { isSet } from "../../../../helpers"; +import { isSet, Rpc } from "../../../../helpers"; export const protobufPackage = "cosmos.base.reflection.v1beta1"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ @@ -254,3 +254,47 @@ export const ListImplementationsResponse = { return message; }, }; +/** ReflectionService defines a service for interface reflection. */ + +export interface ReflectionService { + /** + * ListAllInterfaces lists all the interfaces registered in the interface + * registry. + */ + ListAllInterfaces(request?: ListAllInterfacesRequest): Promise; + /** + * ListImplementations list all the concrete types that implement a given + * interface. + */ + + ListImplementations(request: ListImplementationsRequest): Promise; +} +export class ReflectionServiceClientImpl implements ReflectionService { + private readonly rpc: Rpc; + + constructor(rpc: Rpc) { + this.rpc = rpc; + this.ListAllInterfaces = this.ListAllInterfaces.bind(this); + this.ListImplementations = this.ListImplementations.bind(this); + } + + ListAllInterfaces(request: ListAllInterfacesRequest = {}): Promise { + const data = ListAllInterfacesRequest.encode(request).finish(); + const promise = this.rpc.request( + "cosmos.base.reflection.v1beta1.ReflectionService", + "ListAllInterfaces", + data, + ); + return promise.then((data) => ListAllInterfacesResponse.decode(new _m0.Reader(data))); + } + + ListImplementations(request: ListImplementationsRequest): Promise { + const data = ListImplementationsRequest.encode(request).finish(); + const promise = this.rpc.request( + "cosmos.base.reflection.v1beta1.ReflectionService", + "ListImplementations", + data, + ); + return promise.then((data) => ListImplementationsResponse.decode(new _m0.Reader(data))); + } +} diff --git a/src/helpers.ts b/src/helpers.ts index db22aca9..3a99f520 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,12 +1,12 @@ /* eslint-disable */ /** - * This file and any referenced files were automatically generated by @osmonauts/telescope@0.67.1 + * This file and any referenced files were automatically generated by @osmonauts/telescope@0.69.0 * DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain * and run the transpile command or yarn proto command to regenerate this bundle. */ import * as _m0 from "protobufjs/minimal"; -import * as Long from "long"; +import Long from "long"; // @ts-ignore if (_m0.util.Long !== Long) { diff --git a/src/tendermint/abci/types.ts b/src/tendermint/abci/types.ts index e1efc67b..3707ba34 100644 --- a/src/tendermint/abci/types.ts +++ b/src/tendermint/abci/types.ts @@ -12,6 +12,7 @@ import { bytesFromBase64, fromTimestamp, base64FromBytes, + Rpc, } from "../../helpers"; export const protobufPackage = "tendermint.abci"; export enum CheckTxType { @@ -4644,3 +4645,132 @@ export const Snapshot = { 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; + this.Echo = this.Echo.bind(this); + this.Flush = this.Flush.bind(this); + this.Info = this.Info.bind(this); + this.SetOption = this.SetOption.bind(this); + this.DeliverTx = this.DeliverTx.bind(this); + this.CheckTx = this.CheckTx.bind(this); + this.Query = this.Query.bind(this); + this.Commit = this.Commit.bind(this); + this.InitChain = this.InitChain.bind(this); + this.BeginBlock = this.BeginBlock.bind(this); + this.EndBlock = this.EndBlock.bind(this); + this.ListSnapshots = this.ListSnapshots.bind(this); + this.OfferSnapshot = this.OfferSnapshot.bind(this); + this.LoadSnapshotChunk = this.LoadSnapshotChunk.bind(this); + this.ApplySnapshotChunk = this.ApplySnapshotChunk.bind(this); + } + + 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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.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 _m0.Reader(data))); + } +}