From a8e9615987501b8a6e35900579319ca6829cafaa Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Mon, 18 Apr 2022 10:38:16 +0300 Subject: [PATCH 01/11] feature: clone Tendermint34client init new package clone tendermint client fix: @tharsis/client build fix: setup my env fix: extends Tendermint34Client fix: clone Tendermint34Client --- packages/client/.npmignore | 7 + packages/client/README.md | 7 + packages/client/package.json | 37 +++++ packages/client/src/index.ts | 9 ++ packages/client/tsconfig.build.json | 12 ++ packages/client/tsconfig.json | 5 + yarn.lock | 200 +++++++++++++++++++++++++++- 7 files changed, 274 insertions(+), 3 deletions(-) create mode 100644 packages/client/.npmignore create mode 100644 packages/client/README.md create mode 100644 packages/client/package.json create mode 100644 packages/client/src/index.ts create mode 100644 packages/client/tsconfig.build.json create mode 100644 packages/client/tsconfig.json diff --git a/packages/client/.npmignore b/packages/client/.npmignore new file mode 100644 index 00000000..086c13d7 --- /dev/null +++ b/packages/client/.npmignore @@ -0,0 +1,7 @@ +# Blacklist all files +.* +* +src + +# Whitelist dist +!dist/**/* diff --git a/packages/client/README.md b/packages/client/README.md new file mode 100644 index 00000000..de9f757c --- /dev/null +++ b/packages/client/README.md @@ -0,0 +1,7 @@ +# `client` + +> TODO: description + +## Usage + +> TODO: DEMONSTRATE API diff --git a/packages/client/package.json b/packages/client/package.json new file mode 100644 index 00000000..85f376f9 --- /dev/null +++ b/packages/client/package.json @@ -0,0 +1,37 @@ +{ + "name": "@evmos/client", + "version": "0.1.0", + "description": "EVMOS network RPC client", + "author": "Yury Shapkarin ", + "homepage": "https://github.com/tharsis/evmosjs#readme", + "license": "MIT", + "main": "src/index.tx", + "files": [ + "dist" + ], + "_moduleAliases": { + "~client": "dist" + }, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tharsis/evmosjs.git" + }, + "scripts": { + "postinstall": "shx mkdir -p dist && link-module-alias", + "build": "tsc --build tsconfig.build.json && link-module-alias", + "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", + "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache" + }, + "bugs": { + "url": "https://github.com/tharsis/evmosjs/issues" + }, + "dependencies": { + "@cosmjs/tendermint-rpc": "^0.28.4" + }, + "directories": { + "src": "src" + } +} diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts new file mode 100644 index 00000000..97b02c31 --- /dev/null +++ b/packages/client/src/index.ts @@ -0,0 +1,9 @@ +export { Tendermint34Client as EvmosClient } from '@cosmjs/tendermint-rpc' + +export { + BlockIdFlag, + CommitSignature, + ValidatorEd25519Pubkey, + ValidatorPubkey, + ValidatorSecp256k1Pubkey, +} from '@cosmjs/tendermint-rpc' diff --git a/packages/client/tsconfig.build.json b/packages/client/tsconfig.build.json new file mode 100644 index 00000000..5eb08ebe --- /dev/null +++ b/packages/client/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.build.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist" + }, + "include": [ + "./src/**/*.ts" + ], + "references": [ + ] +} diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json new file mode 100644 index 00000000..2bd0d4d7 --- /dev/null +++ b/packages/client/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "references": [ + ] +} diff --git a/yarn.lock b/yarn.lock index 0538b5c3..cbb9f1f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -452,6 +452,81 @@ dependencies: chalk "^4.0.0" +"@cosmjs/crypto@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.28.4.tgz#b2f1ccb9edee7d357ed1dcd92bdb61f6a1ca06d3" + integrity sha512-JRxNLlED3DDh9d04A0RcRw3mYkoobN7q7wafUFy3vI1TjoyWx33v0gqqaYE6/hoo9ghUrJSVOfzVihl8fZajJA== + dependencies: + "@cosmjs/encoding" "0.28.4" + "@cosmjs/math" "0.28.4" + "@cosmjs/utils" "0.28.4" + "@noble/hashes" "^1" + bn.js "^5.2.0" + elliptic "^6.5.3" + libsodium-wrappers "^0.7.6" + +"@cosmjs/encoding@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.28.4.tgz#ea39eb4c27ebf7b35e62e9898adae189b86d0da7" + integrity sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A== + dependencies: + base64-js "^1.3.0" + bech32 "^1.1.4" + readonly-date "^1.0.0" + +"@cosmjs/json-rpc@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.28.4.tgz#19bc38b895bbb74122832a22aea5b25087143636" + integrity sha512-An8ZQi9OKbnS8ew/MyHhF90zQpXBF8RTj2wdvIH+Hr8yA6QjynY8hxRpUwYUt3Skc5NeUnTZNuWCzlluHnoxVg== + dependencies: + "@cosmjs/stream" "0.28.4" + xstream "^11.14.0" + +"@cosmjs/math@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.28.4.tgz#ddc35b69fa1ffeaf5928f70d4c2faf9284627d84" + integrity sha512-wsWjbxFXvk46Dsx8jQ5vsBZOIQuiUIyaaZbUvxsgIhAMpuuBnV5O/drK87+B+4cL+umTelFqTbWnkqueVCIFxQ== + dependencies: + bn.js "^5.2.0" + +"@cosmjs/socket@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.28.4.tgz#f2c337bee18c631739ba6c2357fe564dbf17df45" + integrity sha512-jAEL3Ri+s8XuBM3mqgO4yvmeQu+R+704V37lGROC1B6kAbGxWRyOWrMdOOiFJzCZ35sSMB7L+xKjpE8ug0vJjg== + dependencies: + "@cosmjs/stream" "0.28.4" + isomorphic-ws "^4.0.1" + ws "^7" + xstream "^11.14.0" + +"@cosmjs/stream@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.28.4.tgz#88a294c2404107327f8e293b952db047ab182179" + integrity sha512-BDwDdFOrOgRx/Wm5nknb9YCV9HHIUcsOxykTDZqdArCUsn4QJBq79QIjp919G05Z8UemkoHwiUCUNB2BfoKmFw== + dependencies: + xstream "^11.14.0" + +"@cosmjs/tendermint-rpc@^0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.28.4.tgz#78835fdc8126baa3122c8b2b396c1d7d290c7167" + integrity sha512-iz6p4UW2QUZNh55WeJy9wHbMdqM8COo0AJdrGU4Ikb/xU0/H6b0dFPoEK+i6ngR0cSizh+hpTMzh3AA7ySUKlA== + dependencies: + "@cosmjs/crypto" "0.28.4" + "@cosmjs/encoding" "0.28.4" + "@cosmjs/json-rpc" "0.28.4" + "@cosmjs/math" "0.28.4" + "@cosmjs/socket" "0.28.4" + "@cosmjs/stream" "0.28.4" + "@cosmjs/utils" "0.28.4" + axios "^0.21.2" + readonly-date "^1.0.0" + xstream "^11.14.0" + +"@cosmjs/utils@0.28.4": + version "0.28.4" + resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.28.4.tgz#ecbc72458cdaffa6eeef572bc691502b3151330f" + integrity sha512-lb3TU6833arPoPZF8HTeG9V418CpurvqH5Aa/ls0I0wYdPDEMO6622+PQNQhQ8Vw8Az2MXoSyc8jsqrgawT84Q== + "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" @@ -1377,6 +1452,11 @@ npmlog "^4.1.2" write-file-atomic "^3.0.3" +"@noble/hashes@^1": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" + integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -2105,6 +2185,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== +axios@^0.21.2: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + babel-jest@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" @@ -2178,7 +2265,7 @@ base-x@^3.0.2, base-x@^3.0.8: dependencies: safe-buffer "^5.0.1" -base64-js@^1.3.1: +base64-js@^1.3.0, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -2190,6 +2277,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +bech32@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + bech32@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" @@ -2215,6 +2307,16 @@ blakejs@^1.1.0: resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== +bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2230,6 +2332,11 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -3020,6 +3127,19 @@ electron-to-chromium@^1.4.84: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.92.tgz#88996e9aceb3a500710fd439abfa89b6cc1ac56c" integrity sha512-YAVbvQIcDE/IJ/vzDMjD484/hsRbFPW2qXJPaYTfOhtligmfYEYOep+5QojpaEU9kq6bMvNeC2aG7arYvTHYsA== +elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emittery@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" @@ -3515,6 +3635,11 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== +follow-redirects@^1.14.0: + version "1.14.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -3761,6 +3886,13 @@ globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" +globalthis@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b" + integrity sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ== + dependencies: + define-properties "^1.1.3" + globby@^11.0.2, globby@^11.0.3: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -3852,6 +3984,23 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -3999,7 +4148,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4307,6 +4456,11 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -4984,6 +5138,18 @@ libnpmpublish@^4.0.0: semver "^7.1.3" ssri "^8.0.1" +libsodium-wrappers@^0.7.6: + version "0.7.10" + resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz#13ced44cacb0fc44d6ac9ce67d725956089ce733" + integrity sha512-pO3F1Q9NPLB/MWIhehim42b/Fwb30JNScCNh8TcQ/kIc+qGLQch8ag8wb0keK3EP5kbGakk1H8Wwo7v+36rNQg== + dependencies: + libsodium "^0.7.0" + +libsodium@^0.7.0: + version "0.7.10" + resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.10.tgz#c2429a7e4c0836f879d701fec2c8a208af024159" + integrity sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ== + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -5346,6 +5512,16 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@^3.0.4: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -6395,6 +6571,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +readonly-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/readonly-date/-/readonly-date-1.0.0.tgz#5af785464d8c7d7c40b9d738cbde8c646f97dcd9" + integrity sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ== + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -7017,6 +7198,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +symbol-observable@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" + integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -7697,7 +7883,7 @@ write-pkg@^4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" -ws@^7.4.6: +ws@^7, ws@^7.4.6: version "7.5.7" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== @@ -7717,6 +7903,14 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xstream@^11.14.0: + version "11.14.0" + resolved "https://registry.yarnpkg.com/xstream/-/xstream-11.14.0.tgz#2c071d26b18310523b6877e86b4e54df068a9ae5" + integrity sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw== + dependencies: + globalthis "^1.0.1" + symbol-observable "^2.0.3" + xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" From 44bc238271422a839ecc9fbb02f839d414ce1c10 Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Fri, 22 Apr 2022 16:11:49 +0300 Subject: [PATCH 02/11] docs: package will to support Cosmos and JSON-RPC transactions at the same time --- packages/client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/package.json b/packages/client/package.json index 85f376f9..db478a56 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,7 +1,7 @@ { "name": "@evmos/client", "version": "0.1.0", - "description": "EVMOS network RPC client", + "description": "EVMOS client", "author": "Yury Shapkarin ", "homepage": "https://github.com/tharsis/evmosjs#readme", "license": "MIT", From 47e9d727f572ef6ed5599656ae28e182a3797ba0 Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 12:20:14 +0300 Subject: [PATCH 03/11] chore: generate api from swagger url --- packages/provider/package.json | 3 +- packages/provider/src/restApiExample.ts | 12353 ++++++++++++++++++++++ 2 files changed, 12355 insertions(+), 1 deletion(-) create mode 100644 packages/provider/src/restApiExample.ts diff --git a/packages/provider/package.json b/packages/provider/package.json index a54ae730..ef33587e 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -13,8 +13,9 @@ }, "scripts": { "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "tsc --build tsconfig.build.json && link-module-alias", + "build": "tsc --build tsconfig.build.json && npm build:api && link-module-alias && autorest", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", + "build:api": "npx swagger-typescript-api -p https://api.evmos.org/openapi.json -o ./src -n restApiExample.ts", "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", "test": "jest", "test:unit": "jest test/unit", diff --git a/packages/provider/src/restApiExample.ts b/packages/provider/src/restApiExample.ts new file mode 100644 index 00000000..1f6fe53e --- /dev/null +++ b/packages/provider/src/restApiExample.ts @@ -0,0 +1,12353 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +/** +* message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } +*/ +export interface CosmosBaseQueryV1Beta1PageRequest { + /** + * key is a value returned in PageResponse.next_key to begin + * querying the next page most efficiently. Only one of offset or key + * should be set. + * @format byte + */ + key?: string + + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + * @format uint64 + */ + offset?: string + + /** + * limit is the total number of results to be returned in the result page. + * If left empty it will default to a value to be set by each app. + * @format uint64 + */ + limit?: string + + /** + * count_total is set to true to indicate that the result set should include + * a count of the total number of items available for pagination in UIs. + * count_total is only respected when offset is used. It is ignored when key + * is set. + */ + count_total?: boolean + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean +} + +/** +* PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } +*/ +export interface CosmosBaseQueryV1Beta1PageResponse { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + * @format byte + */ + next_key?: string + + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + * @format uint64 + */ + total?: string +} + +/** +* 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 CosmosBaseV1Beta1Coin { + denom?: string + amount?: string +} + +/** +* Action defines the list of available actions to claim the airdrop tokens. + + - ACTION_UNSPECIFIED: UNSPECIFIED defines an invalid action. + - ACTION_VOTE: VOTE defines a proposal vote. + - ACTION_DELEGATE: DELEGATE defines an staking delegation. + - ACTION_EVM: EVM defines an EVM transaction. + - ACTION_IBC_TRANSFER: IBC Transfer defines a fungible token transfer transaction via IBC. +*/ +export enum EvmosClaimsV1Action { + ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED', + ACTION_VOTE = 'ACTION_VOTE', + ACTION_DELEGATE = 'ACTION_DELEGATE', + ACTION_EVM = 'ACTION_EVM', + ACTION_IBC_TRANSFER = 'ACTION_IBC_TRANSFER', +} + +/** +* Claim defines the action, completed flag and the remaining claimable amount +for a given user. This is only used during client queries. +*/ +export interface EvmosClaimsV1Claim { + /** + * action enum + * Action defines the list of available actions to claim the airdrop tokens. + * - ACTION_UNSPECIFIED: UNSPECIFIED defines an invalid action. + * - ACTION_VOTE: VOTE defines a proposal vote. + * - ACTION_DELEGATE: DELEGATE defines an staking delegation. + * - ACTION_EVM: EVM defines an EVM transaction. + * - ACTION_IBC_TRANSFER: IBC Transfer defines a fungible token transfer transaction via IBC. + */ + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + + /** true if the action has been completed */ + completed?: boolean + + /** claimable token amount for the action. Zero if completed */ + claimable_amount?: string +} + +/** +* ClaimsRecordAddress is the claims metadata per address that is used at +Genesis. +*/ +export interface EvmosClaimsV1ClaimsRecordAddress { + /** bech32 or hex address of claim user */ + address?: string + + /** total initial claimable amount for the user */ + initial_claimable_amount?: string + + /** slice of the available actions completed */ + actions_completed?: boolean[] +} + +/** + * Params defines the claims module's parameters. + */ +export interface EvmosClaimsV1Params { + /** enable claiming process */ + enable_claims?: boolean + + /** + * timestamp of the airdrop start + * @format date-time + */ + airdrop_start_time?: string + + /** duration until decay of claimable tokens begin */ + duration_until_decay?: string + + /** duration of the token claim decay period */ + duration_of_decay?: string + + /** denom of claimable coin */ + claims_denom?: string + + /** + * list of authorized channel identifiers that can perform address + * attestations via IBC. + */ + authorized_channels?: string[] + + /** list of channel identifiers from EVM compatible chains */ + evm_channels?: string[] +} + +/** +* QueryClaimsRecordResponse is the response type for the Query/ClaimsRecord RPC +method. +*/ +export interface EvmosClaimsV1QueryClaimsRecordResponse { + /** total initial claimable amount for the user */ + initial_claimable_amount?: string + + /** the claims of the user */ + claims?: { + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + completed?: boolean + claimable_amount?: string + }[] +} + +/** +* QueryClaimsRecordsResponse is the response type for the Query/ClaimsRecords +RPC method. +*/ +export interface EvmosClaimsV1QueryClaimsRecordsResponse { + /** claims defines all claims records */ + claims?: { + address?: string + initial_claimable_amount?: string + actions_completed?: boolean[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosClaimsV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + enable_claims?: boolean + airdrop_start_time?: string + duration_until_decay?: string + duration_of_decay?: string + claims_denom?: string + authorized_channels?: string[] + evm_channels?: string[] + } +} + +/** +* QueryTotalUnclaimedResponse is the response type for the Query/TotalUnclaimed +RPC method. +*/ +export interface EvmosClaimsV1QueryTotalUnclaimedResponse { + /** coins defines the unclaimed coins */ + coins?: { denom?: string; amount?: string }[] +} + +/** +* `Any` contains an arbitrary serialized protocol buffer message along with a +URL that describes the type of the serialized message. + +Protobuf library provides support to pack/unpack Any values in the form +of utility functions or additional generated methods of the Any type. + +Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + +Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + +The pack methods provided by protobuf library will by default use +'type.googleapis.com/full.type.name' as the type URL and the unpack +methods only use the fully qualified type name after the last '/' +in the type URL, for example "foo.bar.com/x/y.z" will yield type +name "y.z". + + +JSON +==== +The JSON representation of an `Any` value uses the regular +representation of the deserialized, embedded message, with an +additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + +If the embedded message type is well-known and has a custom JSON +representation, that representation will be embedded adding a field +`value` which holds the custom JSON in addition to the `@type` +field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } +*/ +export interface GoogleProtobufAny { + /** + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + */ + type_url?: string + + /** + * Must be a valid serialized protocol buffer of the above specified type. + * @format byte + */ + value?: string +} + +export interface GrpcGatewayRuntimeError { + error?: string + + /** @format int32 */ + code?: number + message?: string + details?: { type_url?: string; value?: string }[] +} + +export interface EvmosEpochsV1EpochInfo { + identifier?: string + + /** @format date-time */ + start_time?: string + duration?: string + + /** @format int64 */ + current_epoch?: string + + /** @format date-time */ + current_epoch_start_time?: string + epoch_counting_started?: boolean + + /** @format int64 */ + current_epoch_start_height?: string +} + +export interface EvmosEpochsV1QueryCurrentEpochResponse { + /** @format int64 */ + current_epoch?: string +} + +export interface EvmosEpochsV1QueryEpochsInfoResponse { + epochs?: { + identifier?: string + start_time?: string + duration?: string + current_epoch?: string + current_epoch_start_time?: string + epoch_counting_started?: boolean + current_epoch_start_height?: string + }[] + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* Owner enumerates the ownership of a ERC20 contract. + + - OWNER_UNSPECIFIED: OWNER_UNSPECIFIED defines an invalid/undefined owner. + - OWNER_MODULE: OWNER_MODULE erc20 is owned by the erc20 module account. + - OWNER_EXTERNAL: EXTERNAL erc20 is owned by an external account. +*/ +export enum EvmosErc20V1Owner { + OWNER_UNSPECIFIED = 'OWNER_UNSPECIFIED', + OWNER_MODULE = 'OWNER_MODULE', + OWNER_EXTERNAL = 'OWNER_EXTERNAL', +} + +export interface EvmosErc20V1Params { + /** parameter to enable the conversion of Cosmos coins <--> ERC20 tokens. */ + enable_erc20?: boolean + + /** + * parameter to enable the EVM hook that converts an ERC20 token to a Cosmos + * Coin by transferring the Tokens through a MsgEthereumTx to the + * ModuleAddress Ethereum address. + */ + enable_evm_hook?: boolean +} + +/** +* QueryParamsResponse is the response type for the Query/Params RPC +method. +*/ +export interface EvmosErc20V1QueryParamsResponse { + /** Params defines the erc20 module params */ + params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } +} + +/** +* QueryTokenPairResponse is the response type for the Query/TokenPair RPC +method. +*/ +export interface EvmosErc20V1QueryTokenPairResponse { + /** TokenPair defines an instance that records a pairing consisting of a native Cosmos Coin and an ERC20 token address. */ + token_pair?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' + } +} + +/** +* QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC +method. +*/ +export interface EvmosErc20V1QueryTokenPairsResponse { + token_pairs?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * TokenPair defines an instance that records a pairing consisting of a native Cosmos Coin and an ERC20 token address. + */ +export interface EvmosErc20V1TokenPair { + /** address of ERC20 contract token */ + erc20_address?: string + + /** cosmos base denomination to be mapped to */ + denom?: string + + /** shows token mapping enable status */ + enabled?: boolean + + /** + * ERC20 owner address ENUM (0 invalid, 1 ModuleAccount, 2 external address) + * Owner enumerates the ownership of a ERC20 contract. + * + * - OWNER_UNSPECIFIED: OWNER_UNSPECIFIED defines an invalid/undefined owner. + * - OWNER_MODULE: OWNER_MODULE erc20 is owned by the erc20 module account. + * - OWNER_EXTERNAL: EXTERNAL erc20 is owned by an external account. + */ + contract_owner?: 'OWNER_UNSPECIFIED' | 'OWNER_MODULE' | 'OWNER_EXTERNAL' +} + +/** +* 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 CosmosBaseV1Beta1DecCoin { + denom?: string + amount?: string +} + +export interface EvmosIncentivesV1GasMeter { + /** hex address of the incentivized contract */ + contract?: string + + /** participant address that interacts with the incentive */ + participant?: string + + /** + * cumulative gas spent during the epoch + * @format uint64 + */ + cumulative_gas?: string +} + +export interface EvmosIncentivesV1Incentive { + /** contract address */ + contract?: string + + /** denoms and percentage of rewards to be allocated */ + allocations?: { denom?: string; amount?: string }[] + + /** + * number of remaining epochs + * @format int64 + */ + epochs?: number + + /** + * distribution start time + * @format date-time + */ + start_time?: string + + /** + * cumulative gas spent by all gasmeters of the incentive during the epoch + * @format uint64 + */ + total_gas?: string +} + +export interface EvmosIncentivesV1Params { + /** parameter to enable incentives */ + enable_incentives?: boolean + + /** maximum percentage an incentive can allocate per denomination */ + allocation_limit?: string + + /** identifier for the epochs module hooks */ + incentives_epoch_identifier?: string + + /** scaling factor for capping rewards */ + reward_scaler?: string +} + +/** +* QueryAllocationMeterResponse is the response type for the +Query/AllocationMeter RPC method. +*/ +export interface EvmosIncentivesV1QueryAllocationMeterResponse { + /** + * 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. + */ + allocation_meter?: { denom?: string; amount?: string } +} + +/** +* QueryAllocationMetersResponse is the response type for the +Query/AllocationMeters RPC method. +*/ +export interface EvmosIncentivesV1QueryAllocationMetersResponse { + allocation_meters?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryGasMeterResponse is the response type for the Query/Incentive RPC +method. +*/ +export interface EvmosIncentivesV1QueryGasMeterResponse { + /** @format uint64 */ + gas_meter?: string +} + +/** +* QueryGasMetersResponse is the response type for the Query/Incentives RPC +method. +*/ +export interface EvmosIncentivesV1QueryGasMetersResponse { + gas_meters?: { + contract?: string + participant?: string + cumulative_gas?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryIncentiveResponse is the response type for the Query/Incentive RPC +method. +*/ +export interface EvmosIncentivesV1QueryIncentiveResponse { + /** + * Incentive defines an instance that organizes distribution conditions for a + * given smart contract + */ + incentive?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + } +} + +/** +* QueryIncentivesResponse is the response type for the Query/Incentives RPC +method. +*/ +export interface EvmosIncentivesV1QueryIncentivesResponse { + incentives?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryParamsResponse is the response type for the Query/Params RPC +method. +*/ +export interface EvmosIncentivesV1QueryParamsResponse { + /** Params defines the incentives module params */ + params?: { + enable_incentives?: boolean + allocation_limit?: string + incentives_epoch_identifier?: string + reward_scaler?: string + } +} + +export interface EvmosInflationV1ExponentialCalculation { + /** initial value */ + a?: string + + /** reduction factor */ + r?: string + + /** long term inflation */ + c?: string + + /** bonding target */ + bonding_target?: string + + /** max variance */ + max_variance?: string +} + +export interface EvmosInflationV1InflationDistribution { + /** + * staking_rewards defines the proportion of the minted minted_denom that is + * to be allocated as staking rewards + */ + staking_rewards?: string + + /** + * usage_incentives defines the proportion of the minted minted_denom that is + * to be allocated to the incentives module address + */ + usage_incentives?: string + + /** + * community_pool defines the proportion of the minted minted_denom that is to + * be allocated to the community pool + */ + community_pool?: string +} + +/** + * Params holds parameters for the inflation module. + */ +export interface EvmosInflationV1Params { + /** type of coin to mint */ + mint_denom?: string + + /** variables to calculate exponential inflation */ + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + + /** inflation distribution of the minted denom */ + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + + /** parameter to enable inflation and halt increasing the skipped_epochs */ + enable_inflation?: boolean +} + +/** +* QueryCirculatingSupplyResponse is the response type for the +Query/CirculatingSupply RPC method. +*/ +export interface EvmosInflationV1QueryCirculatingSupplyResponse { + /** + * total amount of coins in circulation + * 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. + */ + circulating_supply?: { denom?: string; amount?: string } +} + +/** +* QueryEpochMintProvisionResponse is the response type for the +Query/EpochMintProvision RPC method. +*/ +export interface EvmosInflationV1QueryEpochMintProvisionResponse { + /** epoch_mint_provision is the current minting per epoch provision value. */ + epoch_mint_provision?: { denom?: string; amount?: string } +} + +/** +* QueryInflationRateResponse is the response type for the Query/InflationRate +RPC method. +*/ +export interface EvmosInflationV1QueryInflationRateResponse { + /** rate by which the total supply increases within one period */ + inflation_rate?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosInflationV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + mint_denom?: string + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + enable_inflation?: boolean + } +} + +/** + * QueryPeriodResponse is the response type for the Query/Period RPC method. + */ +export interface EvmosInflationV1QueryPeriodResponse { + /** + * period is the current minting per epoch provision value. + * @format uint64 + */ + period?: string +} + +/** +* QuerySkippedEpochsResponse is the response type for the Query/SkippedEpochs +RPC method. +*/ +export interface EvmosInflationV1QuerySkippedEpochsResponse { + /** + * number of epochs that the inflation module has been disabled. + * @format uint64 + */ + skipped_epochs?: string +} + +/** +* QueryBalancesResponse is the response type for the Query/Balances RPC +method. +*/ +export interface EvmosVestingV1QueryBalancesResponse { + /** current amount of locked tokens */ + locked?: { denom?: string; amount?: string }[] + + /** current amount of unvested tokens */ + unvested?: { denom?: string; amount?: string }[] + + /** current amount of vested tokens */ + vested?: { denom?: string; amount?: string }[] +} + +export interface EvmosRecoveryV1Params { + /** enable recovery IBC middleware */ + enable_recovery?: boolean + + /** duration added to timeout timestamp for balances recovered via IBC packets */ + packet_timeout_duration?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface EvmosRecoveryV1QueryParamsResponse { + /** + * Params holds parameters for the recovery module + * params defines the parameters of the module. + */ + params?: { enable_recovery?: boolean; packet_timeout_duration?: string } +} + +/** +* ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +instead of *big.Int. +*/ +export interface EthermintEvmV1ChainConfig { + /** Homestead switch block (nil no fork, 0 = already homestead) */ + homestead_block?: string + + /** TheDAO hard-fork switch block (nil no fork) */ + dao_fork_block?: string + + /** Whether the nodes supports or opposes the DAO hard-fork */ + dao_fork_support?: boolean + + /** + * EIP150 implements the Gas price changes + * (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) + */ + eip150_block?: string + + /** EIP150 HF hash (needed for header only clients as only gas pricing changed) */ + eip150_hash?: string + + /** EIP155Block HF block */ + eip155_block?: string + + /** EIP158 HF block */ + eip158_block?: string + + /** Byzantium switch block (nil no fork, 0 = already on byzantium) */ + byzantium_block?: string + + /** Constantinople switch block (nil no fork, 0 = already activated) */ + constantinople_block?: string + + /** Petersburg switch block (nil same as Constantinople) */ + petersburg_block?: string + + /** Istanbul switch block (nil no fork, 0 = already on istanbul) */ + istanbul_block?: string + + /** Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) */ + muir_glacier_block?: string + + /** Berlin switch block (nil = no fork, 0 = already on berlin) */ + berlin_block?: string + + /** London switch block (nil = no fork, 0 = already on london) */ + london_block?: string + + /** Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) */ + arrow_glacier_block?: string + + /** EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) */ + merge_fork_block?: string +} + +export interface EthermintEvmV1EstimateGasResponse { + /** + * the estimated gas + * @format uint64 + */ + gas?: string +} + +/** +* Log represents an protobuf compatible Ethereum Log that defines a contract +log event. These events are generated by the LOG opcode and stored/indexed by +the node. +*/ +export interface EthermintEvmV1Log { + /** address of the contract that generated the event */ + address?: string + + /** list of topics provided by the contract. */ + topics?: string[] + + /** + * supplied by the contract, usually ABI-encoded + * @format byte + */ + data?: string + + /** + * block in which the transaction was included + * @format uint64 + */ + block_number?: string + + /** hash of the transaction */ + tx_hash?: string + + /** + * index of the transaction in the block + * @format uint64 + */ + tx_index?: string + + /** hash of the block in which the transaction was included */ + block_hash?: string + + /** + * index of the log in the block + * @format uint64 + */ + index?: string + + /** + * The Removed field is true if this log was reverted due to a chain + * reorganisation. You must pay attention to this field if you receive logs + * through a filter query. + */ + removed?: boolean +} + +/** + * MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. + */ +export interface EthermintEvmV1MsgEthereumTx { + /** + * inner transaction data + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + data?: { type_url?: string; value?: string } + + /** + * encoded storage size of the transaction + * @format double + */ + size?: number + + /** transaction hash in hex format */ + hash?: string + + /** + * ethereum signer address in hex format. This address value is checked + * against the address derived from the signature (V, R, S) using the + * secp256k1 elliptic curve + */ + from?: string +} + +/** + * MsgEthereumTxResponse defines the Msg/EthereumTx response type. + */ +export interface EthermintEvmV1MsgEthereumTxResponse { + /** + * ethereum transaction hash in hex format. This hash differs from the + * Tendermint sha256 hash of the transaction bytes. See + * https://github.com/tendermint/tendermint/issues/6539 for reference + */ + hash?: string + + /** + * logs contains the transaction hash and the proto-compatible ethereum + * logs. + */ + logs?: { + address?: string + topics?: string[] + data?: string + block_number?: string + tx_hash?: string + tx_index?: string + block_hash?: string + index?: string + removed?: boolean + }[] + + /** + * returned data from evm function (result or data supplied with revert + * opcode) + * @format byte + */ + ret?: string + + /** vm error is the error returned by vm execution */ + vm_error?: string + + /** + * gas consumed by the transaction + * @format uint64 + */ + gas_used?: string +} + +export interface EthermintEvmV1Params { + /** + * evm denom represents the token denomination used to run the EVM state + * transitions. + */ + evm_denom?: string + + /** enable create toggles state transitions that use the vm.Create function */ + enable_create?: boolean + + /** enable call toggles state transitions that use the vm.Call function */ + enable_call?: boolean + + /** extra eips defines the additional EIPs for the vm.Config */ + extra_eips?: string[] + + /** + * chain config defines the EVM chain configuration parameters + * ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values + * instead of *big.Int. + */ + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + + /** + * Allow unprotected transactions defines if replay-protected (i.e non EIP155 + * signed) transactions can be executed on the state machine. + */ + allow_unprotected_txs?: boolean +} + +/** + * QueryAccountResponse is the response type for the Query/Account RPC method. + */ +export interface EthermintEvmV1QueryAccountResponse { + /** balance is the balance of the EVM denomination. */ + balance?: string + + /** code hash is the hex-formatted code bytes from the EOA. */ + code_hash?: string + + /** + * nonce is the account's sequence number. + * @format uint64 + */ + nonce?: string +} + +/** + * QueryBalanceResponse is the response type for the Query/Balance RPC method. + */ +export interface EthermintEvmV1QueryBalanceResponse { + /** balance is the balance of the EVM denomination. */ + balance?: string +} + +/** + * BaseFeeResponse returns the EIP1559 base fee. + */ +export interface EthermintEvmV1QueryBaseFeeResponse { + base_fee?: string +} + +/** +* QueryCodeResponse is the response type for the Query/Code RPC +method. +*/ +export interface EthermintEvmV1QueryCodeResponse { + /** + * code represents the code bytes from an ethereum address. + * @format byte + */ + code?: string +} + +/** +* QueryCosmosAccountResponse is the response type for the Query/CosmosAccount +RPC method. +*/ +export interface EthermintEvmV1QueryCosmosAccountResponse { + /** cosmos_address is the cosmos address of the account. */ + cosmos_address?: string + + /** + * sequence is the account's sequence number. + * @format uint64 + */ + sequence?: string + + /** + * account_number is the account numbert + * @format uint64 + */ + account_number?: string +} + +/** + * QueryParamsResponse defines the response type for querying x/evm parameters. + */ +export interface EthermintEvmV1QueryParamsResponse { + /** + * Params defines the EVM module parameters + * params define the evm module parameters. + */ + params?: { + evm_denom?: string + enable_create?: boolean + enable_call?: boolean + extra_eips?: string[] + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + allow_unprotected_txs?: boolean + } +} + +/** +* QueryStorageResponse is the response type for the Query/Storage RPC +method. +*/ +export interface EthermintEvmV1QueryStorageResponse { + /** key defines the storage state value hash associated with the given key. */ + value?: string +} + +export interface EthermintEvmV1QueryTraceBlockResponse { + /** @format byte */ + data?: string +} + +export interface EthermintEvmV1QueryTraceTxResponse { + /** + * response serialized in bytes + * @format byte + */ + data?: string +} + +/** +* QueryValidatorAccountResponse is the response type for the +Query/ValidatorAccount RPC method. +*/ +export interface EthermintEvmV1QueryValidatorAccountResponse { + /** account_address is the cosmos address of the account in bech32 format. */ + account_address?: string + + /** + * sequence is the account's sequence number. + * @format uint64 + */ + sequence?: string + + /** + * account_number is the account number + * @format uint64 + */ + account_number?: string +} + +/** + * TraceConfig holds extra parameters to trace functions. + */ +export interface EthermintEvmV1TraceConfig { + /** custom javascript tracer */ + tracer?: string + + /** + * overrides the default timeout of 5 seconds for JavaScript-based tracing + * calls + */ + timeout?: string + + /** + * number of blocks the tracer is willing to go back + * @format uint64 + */ + reexec?: string + + /** disable stack capture */ + disable_stack?: boolean + + /** disable storage capture */ + disable_storage?: boolean + + /** print output during capture end */ + debug?: boolean + + /** + * maximum length of output, but zero means unlimited + * @format int32 + */ + limit?: number + + /** + * Chain overrides, can be used to execute a trace using future fork rules + * ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values + * instead of *big.Int. + */ + overrides?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + + /** enable memory capture */ + enable_memory?: boolean + + /** enable return data capture */ + enable_return_data?: boolean +} + +export interface EthermintFeemarketV1Params { + /** no base fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) */ + no_base_fee?: boolean + + /** + * base fee change denominator bounds the amount the base fee can change + * between blocks. + * @format int64 + */ + base_fee_change_denominator?: number + + /** + * elasticity multiplier bounds the maximum gas limit an EIP-1559 block may + * have. + * @format int64 + */ + elasticity_multiplier?: number + + /** + * height at which the base fee calculation is enabled. + * @format int64 + */ + enable_height?: string + + /** base fee for EIP-1559 blocks. */ + base_fee?: string + + /** min_gas_price defines the minimum gas price value for cosmos and eth transactions */ + min_gas_price?: string + + /** + * min gas denominator bounds the minimum gasUsed to be charged + * to senders based on GasLimit + */ + min_gas_multiplier?: string +} + +/** + * BaseFeeResponse returns the EIP1559 base fee. + */ +export interface EthermintFeemarketV1QueryBaseFeeResponse { + base_fee?: string +} + +/** + * QueryBlockGasResponse returns block gas used for a given height. + */ +export interface EthermintFeemarketV1QueryBlockGasResponse { + /** @format int64 */ + gas?: string +} + +/** + * QueryParamsResponse defines the response type for querying x/evm parameters. + */ +export interface EthermintFeemarketV1QueryParamsResponse { + /** + * Params defines the EVM module parameters + * params define the evm module parameters. + */ + params?: { + no_base_fee?: boolean + base_fee_change_denominator?: number + elasticity_multiplier?: number + enable_height?: string + base_fee?: string + min_gas_price?: string + min_gas_multiplier?: string + } +} + +/** +* DenomTrace contains the base denomination for ICS20 fungible tokens and the +source tracing information path. +*/ +export interface IbcApplicationsTransferV1DenomTrace { + /** + * path defines the chain of port/channel identifiers used for tracing the + * source of the fungible token. + */ + path?: string + + /** base denomination of the relayed fungible token. */ + base_denom?: 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 IbcApplicationsTransferV1Params { + /** + * send_enabled enables or disables all cross-chain token transfers from this + * chain. + */ + send_enabled?: boolean + + /** + * receive_enabled enables or disables all cross-chain token transfers to this + * chain. + */ + receive_enabled?: boolean +} + +/** +* QueryDenomHashResponse is the response type for the Query/DenomHash RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomHashResponse { + /** hash (in hex format) of the denomination trace information. */ + hash?: string +} + +/** +* QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomTraceResponse { + /** denom_trace returns the requested denomination trace information. */ + denom_trace?: { path?: string; base_denom?: string } +} + +/** +* QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +method. +*/ +export interface IbcApplicationsTransferV1QueryDenomTracesResponse { + /** denom_traces returns all denominations trace information. */ + denom_traces?: { path?: string; base_denom?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface IbcApplicationsTransferV1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { send_enabled?: boolean; receive_enabled?: boolean } +} + +/** +* ConsensusStateWithHeight defines a consensus state with an additional height +field. +*/ +export interface IbcCoreClientV1ConsensusStateWithHeight { + /** + * consensus state height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } + + /** + * consensus state + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } +} + +/** +* Normally the RevisionHeight is incremented at each height while keeping +RevisionNumber the same. However some consensus algorithms may choose to +reset the height in certain conditions e.g. hard forks, state-machine +breaking changes In these cases, the RevisionNumber is incremented so that +height continues to be monitonically increasing even as the RevisionHeight +gets reset +*/ +export interface IbcCoreClientV1Height { + /** + * the revision that the client is currently on + * @format uint64 + */ + revision_number?: string + + /** + * the height within the given revision + * @format uint64 + */ + revision_height?: string +} + +/** +* IdentifiedClientState defines a client state with an additional client +identifier field. +*/ +export interface IbcCoreClientV1IdentifiedClientState { + /** client identifier */ + client_id?: string + + /** + * client state + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + client_state?: { type_url?: string; value?: string } +} + +/** + * Params defines the set of IBC light client parameters. + */ +export interface IbcCoreClientV1Params { + /** allowed_clients defines the list of allowed client state types. */ + allowed_clients?: string[] +} + +/** +* QueryClientParamsResponse is the response type for the Query/ClientParams RPC +method. +*/ +export interface IbcCoreClientV1QueryClientParamsResponse { + /** params defines the parameters of the module. */ + params?: { allowed_clients?: 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 IbcCoreClientV1QueryClientStateResponse { + /** + * client state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + client_state?: { type_url?: string; value?: string } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryClientStatesResponse is the response type for the Query/ClientStates RPC +method. +*/ +export interface IbcCoreClientV1QueryClientStatesResponse { + /** list of stored ClientStates of the chain. */ + client_states?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +method. It returns the current status of the IBC client. +*/ +export interface IbcCoreClientV1QueryClientStatusResponse { + status?: string +} + +export interface IbcCoreClientV1QueryConsensusStateResponse { + /** + * consensus state associated with the client identifier at the given height + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreClientV1QueryConsensusStatesResponse { + /** consensus states associated with the identifier */ + consensus_states?: { + height?: { revision_number?: string; revision_height?: string } + consensus_state?: { type_url?: string; value?: string } + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryUpgradedClientStateResponse is the response type for the +Query/UpgradedClientState RPC method. +*/ +export interface IbcCoreClientV1QueryUpgradedClientStateResponse { + /** + * client state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + upgraded_client_state?: { type_url?: string; value?: string } +} + +/** +* QueryUpgradedConsensusStateResponse is the response type for the +Query/UpgradedConsensusState RPC method. +*/ +export interface IbcCoreClientV1QueryUpgradedConsensusStateResponse { + /** + * Consensus state associated with the request identifier + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + upgraded_consensus_state?: { type_url?: string; value?: string } +} + +export interface IbcCoreCommitmentV1MerklePrefix { + /** @format byte */ + key_prefix?: string +} + +/** +* ConnectionEnd defines a stateful object on a chain connected to another +separate one. +NOTE: there must only be 2 defined ConnectionEnds to establish +a connection between two chains. +*/ +export interface IbcCoreConnectionV1ConnectionEnd { + /** client associated with this connection. */ + client_id?: string + + /** + * IBC version which can be utilised to determine encodings or protocols for + * channels or packets utilising this connection. + */ + versions?: { identifier?: string; features?: string[] }[] + + /** current state of the connection end. */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + + /** counterparty chain associated with this connection. */ + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + + /** + * delay period that must pass before a consensus state can be used for + * packet-verification NOTE: delay period logic is only implemented by some + * clients. + * @format uint64 + */ + delay_period?: string +} + +/** + * Counterparty defines the counterparty chain associated with a connection end. + */ +export interface IbcCoreConnectionV1Counterparty { + /** + * identifies the client on the counterparty chain associated with a given + * connection. + */ + client_id?: string + + /** + * identifies the connection end on the counterparty chain associated with a + * given connection. + */ + connection_id?: string + + /** + * 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...)) + * commitment merkle prefix of the counterparty chain. + */ + prefix?: { key_prefix?: string } +} + +/** +* IdentifiedConnection defines a connection with additional connection +identifier field. +*/ +export interface IbcCoreConnectionV1IdentifiedConnection { + /** connection identifier. */ + id?: string + + /** client associated with this connection. */ + client_id?: string + + /** + * IBC version which can be utilised to determine encodings or protocols for + * channels or packets utilising this connection + */ + versions?: { identifier?: string; features?: string[] }[] + + /** current state of the connection end. */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + + /** counterparty chain associated with this connection. */ + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + + /** + * delay period associated with this connection. + * @format uint64 + */ + delay_period?: string +} + +export interface IbcCoreConnectionV1QueryClientConnectionsResponse { + /** slice of all the connection paths associated with a client. */ + connection_paths?: string[] + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was generated + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreConnectionV1QueryConnectionClientStateResponse { + /** + * client state associated with the channel + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreConnectionV1QueryConnectionConsensusStateResponse { + /** + * consensus state associated with the channel + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** client ID associated with the consensus state */ + client_id?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: 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 IbcCoreConnectionV1QueryConnectionResponse { + /** + * connection associated with the request identifier + * ConnectionEnd defines a stateful object on a chain connected to another + * separate one. + * NOTE: there must only be 2 defined ConnectionEnds to establish + * a connection between two chains. + */ + connection?: { + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** +* QueryConnectionsResponse is the response type for the Query/Connections RPC +method. +*/ +export interface IbcCoreConnectionV1QueryConnectionsResponse { + /** list of stored connections of the chain. */ + connections?: { + id?: string + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +/** +* State defines if a connection is in one of the following states: +INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A connection end has just started the opening handshake. + - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty +chain. + - STATE_OPEN: A connection end has completed the handshake. +*/ +export enum IbcCoreConnectionV1State { + STATE_UNINITIALIZED_UNSPECIFIED = 'STATE_UNINITIALIZED_UNSPECIFIED', + STATE_INIT = 'STATE_INIT', + STATE_TRYOPEN = 'STATE_TRYOPEN', + STATE_OPEN = 'STATE_OPEN', +} + +/** +* Version defines the versioning scheme used to negotiate the IBC verison in +the connection handshake. +*/ +export interface IbcCoreConnectionV1Version { + /** unique version identifier */ + identifier?: string + + /** list of features compatible with the specified identifier */ + features?: string[] +} + +/** +* Channel defines pipeline for exactly-once packet delivery between specific +modules on separate blockchains, which has at least one end capable of +sending packets and one end capable of receiving packets. +*/ +export interface IbcCoreChannelV1Channel { + /** + * current state of the channel end + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * - STATE_UNINITIALIZED_UNSPECIFIED: Default State + * - STATE_INIT: A channel has just started the opening handshake. + * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + * - STATE_OPEN: A channel has completed the handshake. Open channels are + * ready to send and receive packets. + * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + * packets. + */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + + /** + * whether the channel is ordered or unordered + * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + * which they were sent. + * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + */ + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + + /** counterparty channel end */ + counterparty?: { port_id?: string; channel_id?: string } + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + */ + connection_hops?: string[] + + /** opaque channel version, which is agreed upon during the handshake */ + version?: string +} + +export interface IbcCoreChannelV1Counterparty { + /** port on the counterparty chain which owns the other end of the channel. */ + port_id?: string + + /** channel end on the counterparty chain */ + channel_id?: string +} + +/** +* IdentifiedChannel defines a channel with additional port and channel +identifier fields. +*/ +export interface IbcCoreChannelV1IdentifiedChannel { + /** + * current state of the channel end + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * - STATE_UNINITIALIZED_UNSPECIFIED: Default State + * - STATE_INIT: A channel has just started the opening handshake. + * - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + * - STATE_OPEN: A channel has completed the handshake. Open channels are + * ready to send and receive packets. + * - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + * packets. + */ + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + + /** + * whether the channel is ordered or unordered + * - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + * - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + * which they were sent. + * - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + */ + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + + /** counterparty channel end */ + counterparty?: { port_id?: string; channel_id?: string } + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + */ + connection_hops?: string[] + + /** opaque channel version, which is agreed upon during the handshake */ + version?: string + + /** port identifier */ + port_id?: string + + /** channel identifier */ + channel_id?: string +} + +/** +* - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in +which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent +*/ +export enum IbcCoreChannelV1Order { + ORDER_NONE_UNSPECIFIED = 'ORDER_NONE_UNSPECIFIED', + ORDER_UNORDERED = 'ORDER_UNORDERED', + ORDER_ORDERED = 'ORDER_ORDERED', +} + +/** +* 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 IbcCoreChannelV1PacketState { + /** channel port identifier. */ + port_id?: string + + /** channel unique identifier. */ + channel_id?: string + + /** + * packet sequence. + * @format uint64 + */ + sequence?: string + + /** + * embedded data that represents packet state. + * @format byte + */ + data?: string +} + +export interface IbcCoreChannelV1QueryChannelClientStateResponse { + /** + * client state associated with the channel + * IdentifiedClientState defines a client state with an additional client + * identifier field. + */ + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryChannelConsensusStateResponse { + /** + * consensus state associated with the channel + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + consensus_state?: { type_url?: string; value?: string } + + /** client ID associated with the consensus state */ + client_id?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: 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 IbcCoreChannelV1QueryChannelResponse { + /** + * channel associated with the request identifiers + * Channel defines pipeline for exactly-once packet delivery between specific + * modules on separate blockchains, which has at least one end capable of + * sending packets and one end capable of receiving packets. + */ + channel?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + } + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +/** + * QueryChannelsResponse is the response type for the Query/Channels RPC method. + */ +export interface IbcCoreChannelV1QueryChannelsResponse { + /** list of stored channels of the chain. */ + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryConnectionChannelsResponse { + /** list of channels associated with a connection. */ + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: 'ORDER_NONE_UNSPECIFIED' | 'ORDER_UNORDERED' | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryNextSequenceReceiveResponse { + /** + * next sequence receive number + * @format uint64 + */ + next_sequence_receive?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketAcknowledgementResponse { + /** + * packet associated with the request fields + * @format byte + */ + acknowledgement?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketAcknowledgementsResponse { + acknowledgements?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketCommitmentResponse { + /** + * packet associated with the request fields + * @format byte + */ + commitment?: string + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketCommitmentsResponse { + commitments?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + + /** + * pagination response + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryPacketReceiptResponse { + /** success flag for if receipt exists */ + received?: boolean + + /** + * merkle proof of existence + * @format byte + */ + proof?: string + + /** + * height at which the proof was retrieved + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + proof_height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryUnreceivedAcksResponse { + /** list of unreceived acknowledgement sequences */ + sequences?: string[] + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +export interface IbcCoreChannelV1QueryUnreceivedPacketsResponse { + /** list of unreceived packet sequences */ + sequences?: string[] + + /** + * query block height + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + */ + height?: { revision_number?: string; revision_height?: string } +} + +/** +* State defines if a channel is in one of the following states: +CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are +ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive +packets. +*/ +export enum IbcCoreChannelV1State { + STATE_UNINITIALIZED_UNSPECIFIED = 'STATE_UNINITIALIZED_UNSPECIFIED', + STATE_INIT = 'STATE_INIT', + STATE_TRYOPEN = 'STATE_TRYOPEN', + STATE_OPEN = 'STATE_OPEN', + STATE_CLOSED = 'STATE_CLOSED', +} + +/** + * Params defines the parameters for the auth module. + */ +export interface CosmosAuthV1Beta1Params { + /** @format uint64 */ + max_memo_characters?: string + + /** @format uint64 */ + tx_sig_limit?: string + + /** @format uint64 */ + tx_size_cost_per_byte?: string + + /** @format uint64 */ + sig_verify_cost_ed25519?: string + + /** @format uint64 */ + sig_verify_cost_secp256k1?: string +} + +/** + * QueryAccountResponse is the response type for the Query/Account RPC method. + */ +export interface CosmosAuthV1Beta1QueryAccountResponse { + /** account defines the account of the corresponding address. */ + account?: { type_url?: string; value?: string } +} + +/** +* QueryAccountsResponse is the response type for the Query/Accounts RPC method. + +Since: cosmos-sdk 0.43 +*/ +export interface CosmosAuthV1Beta1QueryAccountsResponse { + /** accounts are the existing accounts */ + accounts?: { type_url?: string; value?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosAuthV1Beta1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + max_memo_characters?: string + tx_sig_limit?: string + tx_size_cost_per_byte?: string + sig_verify_cost_ed25519?: string + sig_verify_cost_secp256k1?: string + } +} + +/** +* Grant gives permissions to execute +the provide method with expiration time. +*/ +export interface CosmosAuthzV1Beta1Grant { + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + authorization?: { type_url?: string; value?: string } + + /** @format date-time */ + expiration?: string +} + +/** + * Since: cosmos-sdk 0.45.2 + */ +export interface CosmosAuthzV1Beta1GrantAuthorization { + granter?: string + grantee?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + authorization?: { type_url?: string; value?: string } + + /** @format date-time */ + expiration?: string +} + +/** + * QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGranteeGrantsResponse { + /** grants is a list of grants granted to the grantee. */ + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGranterGrantsResponse { + /** grants is a list of grants granted by the granter. */ + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + */ +export interface CosmosAuthzV1Beta1QueryGrantsResponse { + /** authorizations is a list of grants granted for grantee by granter. */ + grants?: { + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* DenomUnit represents a struct that describes a given +denomination unit of the basic token. +*/ +export interface CosmosBankV1Beta1DenomUnit { + /** denom represents the string name of the given denom unit (e.g uatom). */ + denom?: string + + /** + * exponent represents power of 10 exponent that one must + * raise the base_denom to in order to equal the given DenomUnit's denom + * 1 denom = 1^exponent base_denom + * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + * exponent = 6, thus: 1 atom = 10^6 uatom). + * @format int64 + */ + exponent?: number + + /** aliases is a list of string aliases for the given denom */ + aliases?: string[] +} + +/** +* Metadata represents a struct that describes +a basic token. +*/ +export interface CosmosBankV1Beta1Metadata { + description?: string + + /** denom_units represents the list of DenomUnit's for a given coin */ + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + + /** 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 + * be the same as the display. + * + * Since: cosmos-sdk 0.43 + */ + symbol?: string +} + +/** + * Params defines the parameters for the bank module. + */ +export interface CosmosBankV1Beta1Params { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean +} + +/** +* QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +method. +*/ +export interface CosmosBankV1Beta1QueryAllBalancesResponse { + /** balances is the balances of all the coins. */ + balances?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryBalanceResponse is the response type for the Query/Balance RPC method. + */ +export interface CosmosBankV1Beta1QueryBalanceResponse { + /** balance is the balance of the coin. */ + balance?: { denom?: string; amount?: string } +} + +/** +* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC +method. +*/ +export interface CosmosBankV1Beta1QueryDenomMetadataResponse { + /** metadata describes and provides all the client information for the requested token. */ + metadata?: { + description?: string + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + base?: string + display?: string + name?: string + symbol?: string + } +} + +/** +* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC +method. +*/ +export interface CosmosBankV1Beta1QueryDenomsMetadataResponse { + /** metadata provides the client information for all the registered tokens. */ + metadatas?: { + description?: string + denom_units?: { denom?: string; exponent?: number; aliases?: string[] }[] + base?: string + display?: string + name?: string + symbol?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse defines the response type for querying x/bank parameters. + */ +export interface CosmosBankV1Beta1QueryParamsResponse { + /** Params defines the parameters for the bank module. */ + params?: { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean + } +} + +/** +* QuerySpendableBalancesResponse defines the gRPC response structure for querying +an account's spendable balances. +*/ +export interface CosmosBankV1Beta1QuerySpendableBalancesResponse { + /** balances is the spendable balances of all the coins. */ + balances?: { denom?: string; amount?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + */ +export interface CosmosBankV1Beta1QuerySupplyOfResponse { + /** amount is the supply of the coin. */ + amount?: { denom?: string; amount?: string } +} + +export interface CosmosBankV1Beta1QueryTotalSupplyResponse { + /** supply is the supply of the coins */ + supply?: { denom?: string; amount?: string }[] + + /** + * pagination defines the pagination in the response. + * + * Since: cosmos-sdk 0.43 + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* SendEnabled maps coin denom to a send_enabled status (whether a denom is +sendable). +*/ +export interface CosmosBankV1Beta1SendEnabled { + denom?: string + enabled?: boolean +} + +/** +* DelegationDelegatorReward represents the properties +of a delegator's delegation reward. +*/ +export interface CosmosDistributionV1Beta1DelegationDelegatorReward { + validator_address?: string + reward?: { denom?: string; amount?: string }[] +} + +/** + * Params defines the set of params for the distribution module. + */ +export interface CosmosDistributionV1Beta1Params { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean +} + +/** +* QueryCommunityPoolResponse is the response type for the Query/CommunityPool +RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryCommunityPoolResponse { + /** pool defines community pool's coins. */ + pool?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegationRewardsResponse is the response type for the +Query/DelegationRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegationRewardsResponse { + /** rewards defines the rewards accrued by a delegation. */ + rewards?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegationTotalRewardsResponse is the response type for the +Query/DelegationTotalRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegationTotalRewardsResponse { + /** rewards defines all the rewards accrued by a delegator. */ + rewards?: { + validator_address?: string + reward?: { denom?: string; amount?: string }[] + }[] + + /** total defines the sum of all the rewards. */ + total?: { denom?: string; amount?: string }[] +} + +/** +* QueryDelegatorValidatorsResponse is the response type for the +Query/DelegatorValidators RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegatorValidatorsResponse { + /** validators defines the validators a delegator is delegating for. */ + validators?: string[] +} + +/** +* QueryDelegatorWithdrawAddressResponse is the response type for the +Query/DelegatorWithdrawAddress RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryDelegatorWithdrawAddressResponse { + /** withdraw_address defines the delegator address to query for. */ + withdraw_address?: string +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosDistributionV1Beta1QueryParamsResponse { + /** params defines the parameters of the module. */ + params?: { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean + } +} + +export interface CosmosDistributionV1Beta1QueryValidatorCommissionResponse { + /** commission defines the commision the validator received. */ + commission?: { commission?: { denom?: string; amount?: string }[] } +} + +/** +* QueryValidatorOutstandingRewardsResponse is the response type for the +Query/ValidatorOutstandingRewards RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryValidatorOutstandingRewardsResponse { + /** + * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + * for a validator inexpensive to track, allows simple sanity checks. + */ + rewards?: { rewards?: { denom?: string; amount?: string }[] } +} + +/** +* QueryValidatorSlashesResponse is the response type for the +Query/ValidatorSlashes RPC method. +*/ +export interface CosmosDistributionV1Beta1QueryValidatorSlashesResponse { + /** slashes defines the slashes the validator received. */ + slashes?: { validator_period?: string; fraction?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* ValidatorAccumulatedCommission represents accumulated commission +for a validator kept as a running counter, can be withdrawn at any time. +*/ +export interface CosmosDistributionV1Beta1ValidatorAccumulatedCommission { + commission?: { denom?: string; amount?: string }[] +} + +/** +* ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +for a validator inexpensive to track, allows simple sanity checks. +*/ +export interface CosmosDistributionV1Beta1ValidatorOutstandingRewards { + rewards?: { denom?: string; amount?: string }[] +} + +/** +* 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 CosmosDistributionV1Beta1ValidatorSlashEvent { + /** @format uint64 */ + validator_period?: string + fraction?: string +} + +export interface CosmosFeegrantV1Beta1Grant { + /** 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?: { type_url?: string; value?: string } +} + +/** + * QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + */ +export interface CosmosFeegrantV1Beta1QueryAllowanceResponse { + /** + * Grant is stored in the KVStore to record a grant with full context + * allowance is a allowance granted for grantee by granter. + */ + allowance?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + } +} + +/** + * QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + */ +export interface CosmosFeegrantV1Beta1QueryAllowancesResponse { + /** allowances are allowance's granted for grantee by granter. */ + allowances?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +method. +*/ +export interface CosmosEvidenceV1Beta1QueryAllEvidenceResponse { + /** evidence returns all evidences. */ + evidence?: { type_url?: string; value?: string }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + */ +export interface CosmosEvidenceV1Beta1QueryEvidenceResponse { + /** evidence returns the requested evidence. */ + evidence?: { type_url?: string; value?: string } +} + +/** +* Deposit defines an amount deposited by an account address to an active +proposal. +*/ +export interface CosmosGovV1Beta1Deposit { + /** @format uint64 */ + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] +} + +/** + * DepositParams defines the params for deposits on governance proposals. + */ +export interface CosmosGovV1Beta1DepositParams { + /** Minimum deposit for a proposal to enter voting period. */ + min_deposit?: { denom?: string; amount?: string }[] + + /** Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. */ + max_deposit_period?: string +} + +/** + * Proposal defines the core field members of a governance proposal. + */ +export interface CosmosGovV1Beta1Proposal { + /** @format uint64 */ + proposal_id?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + content?: { type_url?: string; value?: string } + + /** + * ProposalStatus enumerates the valid statuses of a proposal. + * + * - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + * - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + * period. + * - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + * - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + * passed. + * - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + * been rejected. + * - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + * failed. + */ + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + + /** TallyResult defines a standard tally for a governance proposal. */ + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + + /** @format date-time */ + submit_time?: string + + /** @format date-time */ + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + + /** @format date-time */ + voting_start_time?: string + + /** @format date-time */ + voting_end_time?: string +} + +/** +* ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit +period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting +period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has +passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has +been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has +failed. +*/ +export enum CosmosGovV1Beta1ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 'PROPOSAL_STATUS_UNSPECIFIED', + PROPOSAL_STATUS_DEPOSIT_PERIOD = 'PROPOSAL_STATUS_DEPOSIT_PERIOD', + PROPOSAL_STATUS_VOTING_PERIOD = 'PROPOSAL_STATUS_VOTING_PERIOD', + PROPOSAL_STATUS_PASSED = 'PROPOSAL_STATUS_PASSED', + PROPOSAL_STATUS_REJECTED = 'PROPOSAL_STATUS_REJECTED', + PROPOSAL_STATUS_FAILED = 'PROPOSAL_STATUS_FAILED', +} + +/** + * QueryDepositResponse is the response type for the Query/Deposit RPC method. + */ +export interface CosmosGovV1Beta1QueryDepositResponse { + /** deposit defines the requested deposit. */ + deposit?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + } +} + +/** + * QueryDepositsResponse is the response type for the Query/Deposits RPC method. + */ +export interface CosmosGovV1Beta1QueryDepositsResponse { + deposits?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + */ +export interface CosmosGovV1Beta1QueryParamsResponse { + /** voting_params defines the parameters related to voting. */ + voting_params?: { voting_period?: string } + + /** deposit_params defines the parameters related to deposit. */ + deposit_params?: { + min_deposit?: { denom?: string; amount?: string }[] + max_deposit_period?: string + } + + /** tally_params defines the parameters related to tally. */ + tally_params?: { + quorum?: string + threshold?: string + veto_threshold?: string + } +} + +/** + * QueryProposalResponse is the response type for the Query/Proposal RPC method. + */ +export interface CosmosGovV1Beta1QueryProposalResponse { + /** Proposal defines the core field members of a governance proposal. */ + proposal?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + } +} + +/** +* QueryProposalsResponse is the response type for the Query/Proposals RPC +method. +*/ +export interface CosmosGovV1Beta1QueryProposalsResponse { + proposals?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * QueryTallyResultResponse is the response type for the Query/Tally RPC method. + */ +export interface CosmosGovV1Beta1QueryTallyResultResponse { + /** tally defines the requested tally. */ + tally?: { yes?: string; abstain?: string; no?: string; no_with_veto?: string } +} + +/** + * QueryVoteResponse is the response type for the Query/Vote RPC method. + */ +export interface CosmosGovV1Beta1QueryVoteResponse { + /** vote defined the queried vote. */ + vote?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + } +} + +/** + * QueryVotesResponse is the response type for the Query/Votes RPC method. + */ +export interface CosmosGovV1Beta1QueryVotesResponse { + /** votes defined the queried votes. */ + votes?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * TallyParams defines the params for tallying votes on governance proposals. + */ +export interface CosmosGovV1Beta1TallyParams { + /** + * Minimum percentage of total stake needed to vote for a result to be + * considered valid. + * @format byte + */ + quorum?: string + + /** + * Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + * @format byte + */ + threshold?: string + + /** + * Minimum value of Veto votes to Total votes ratio for proposal to be + * vetoed. Default value: 1/3. + * @format byte + */ + veto_threshold?: string +} + +/** + * TallyResult defines a standard tally for a governance proposal. + */ +export interface CosmosGovV1Beta1TallyResult { + yes?: string + abstain?: string + no?: string + no_with_veto?: string +} + +/** +* Vote defines a vote on a governance proposal. +A Vote consists of a proposal ID, the voter, and the vote option. +*/ +export interface CosmosGovV1Beta1Vote { + /** @format uint64 */ + proposal_id?: string + voter?: string + + /** + * 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. + */ + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + + /** Since: cosmos-sdk 0.43 */ + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] +} + +/** +* VoteOption enumerates the valid vote options for a given governance proposal. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. +*/ +export enum CosmosGovV1Beta1VoteOption { + VOTE_OPTION_UNSPECIFIED = 'VOTE_OPTION_UNSPECIFIED', + VOTE_OPTION_YES = 'VOTE_OPTION_YES', + VOTE_OPTION_ABSTAIN = 'VOTE_OPTION_ABSTAIN', + VOTE_OPTION_NO = 'VOTE_OPTION_NO', + VOTE_OPTION_NO_WITH_VETO = 'VOTE_OPTION_NO_WITH_VETO', +} + +/** + * VotingParams defines the params for voting on governance proposals. + */ +export interface CosmosGovV1Beta1VotingParams { + /** Length of the voting period. */ + voting_period?: string +} + +/** +* WeightedVoteOption defines a unit of vote for vote split. + +Since: cosmos-sdk 0.43 +*/ +export interface CosmosGovV1Beta1WeightedVoteOption { + /** + * VoteOption enumerates the valid vote options for a given governance proposal. + * - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + * - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + * - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + * - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + * - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + */ + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string +} + +/** + * Params represents the parameters used for by the slashing module. + */ +export interface CosmosSlashingV1Beta1Params { + /** @format int64 */ + signed_blocks_window?: string + + /** @format byte */ + min_signed_per_window?: string + downtime_jail_duration?: string + + /** @format byte */ + slash_fraction_double_sign?: string + + /** @format byte */ + slash_fraction_downtime?: string +} + +export interface CosmosSlashingV1Beta1QueryParamsResponse { + /** Params represents the parameters used for by the slashing module. */ + params?: { + signed_blocks_window?: string + min_signed_per_window?: string + downtime_jail_duration?: string + slash_fraction_double_sign?: string + slash_fraction_downtime?: string + } +} + +export interface CosmosSlashingV1Beta1QuerySigningInfoResponse { + /** + * val_signing_info is the signing info of requested val cons address + * ValidatorSigningInfo defines a validator's signing info for monitoring their + * liveness activity. + */ + val_signing_info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + } +} + +export interface CosmosSlashingV1Beta1QuerySigningInfosResponse { + /** info is the signing info of all validators */ + info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + }[] + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: { next_key?: string; total?: string } +} + +/** +* ValidatorSigningInfo defines a validator's signing info for monitoring their +liveness activity. +*/ +export interface CosmosSlashingV1Beta1ValidatorSigningInfo { + address?: string + + /** + * Height at which validator was first a candidate OR was unjailed + * @format int64 + */ + start_height?: string + + /** + * 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`. + * @format int64 + */ + index_offset?: string + + /** + * Timestamp until which the validator is jailed due to liveness downtime. + * @format date-time + */ + jailed_until?: string + + /** + * 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`. + * @format int64 + */ + missed_blocks_counter?: string +} + +/** +* BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. +*/ +export enum CosmosStakingV1Beta1BondStatus { + BOND_STATUS_UNSPECIFIED = 'BOND_STATUS_UNSPECIFIED', + BOND_STATUS_UNBONDED = 'BOND_STATUS_UNBONDED', + BOND_STATUS_UNBONDING = 'BOND_STATUS_UNBONDING', + BOND_STATUS_BONDED = 'BOND_STATUS_BONDED', +} + +/** + * Commission defines commission parameters for a given validator. + */ +export interface CosmosStakingV1Beta1Commission { + /** commission_rates defines the initial commission rates to be used for creating a validator. */ + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + + /** + * update_time is the last time the commission rate was changed. + * @format date-time + */ + update_time?: string +} + +/** +* CommissionRates defines the initial commission rates to be used for creating +a validator. +*/ +export interface CosmosStakingV1Beta1CommissionRates { + /** 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. */ + max_rate?: string + + /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */ + max_change_rate?: string +} + +/** +* Delegation represents the bond with tokens held by an account. It is +owned by one delegator, and is associated with the voting power of one +validator. +*/ +export interface CosmosStakingV1Beta1Delegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_address is the bech32-encoded address of the validator. */ + validator_address?: string + + /** shares define the delegation shares received. */ + shares?: string +} + +/** +* DelegationResponse is equivalent to Delegation except that it contains a +balance in addition to shares which is more suitable for client responses. +*/ +export interface CosmosStakingV1Beta1DelegationResponse { + /** + * Delegation represents the bond with tokens held by an account. It is + * owned by one delegator, and is associated with the voting power of one + * validator. + */ + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + + /** + * Coin defines a token with a denomination and an amount. + * + * NOTE: The amount field is an Int which implements the custom method + * signatures required by gogoproto. + */ + balance?: { denom?: string; amount?: string } +} + +/** + * Description defines a validator description. + */ +export interface CosmosStakingV1Beta1Description { + /** 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. */ + security_contact?: string + + /** details define other optional details. */ + details?: string +} + +/** +* HistoricalInfo contains header and validator information for a given block. +It is stored as part of staking module's state, which persists the `n` most +recent HistoricalInfo +(`n` is set by the staking module's `historical_entries` parameter). +*/ +export interface CosmosStakingV1Beta1HistoricalInfo { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] +} + +/** + * Params defines the parameters for the staking module. + */ +export interface CosmosStakingV1Beta1Params { + /** unbonding_time is the time duration of unbonding. */ + unbonding_time?: string + + /** + * max_validators is the maximum number of validators. + * @format int64 + */ + max_validators?: number + + /** + * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). + * @format int64 + */ + max_entries?: number + + /** + * historical_entries is the number of historical entries to persist. + * @format int64 + */ + historical_entries?: number + + /** bond_denom defines the bondable coin denomination. */ + bond_denom?: string +} + +/** +* Pool is used for tracking bonded and not-bonded token supply of the bond +denomination. +*/ +export interface CosmosStakingV1Beta1Pool { + not_bonded_tokens?: string + bonded_tokens?: string +} + +/** + * QueryDelegationResponse is response type for the Query/Delegation RPC method. + */ +export interface CosmosStakingV1Beta1QueryDelegationResponse { + /** delegation_responses defines the delegation info of a delegation. */ + delegation_response?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + } +} + +/** +* QueryDelegatorDelegationsResponse is response type for the +Query/DelegatorDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorDelegationsResponse { + /** delegation_responses defines all the delegations' info of a delegator. */ + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryUnbondingDelegatorDelegationsResponse is response type for the +Query/UnbondingDelegatorDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorUnbondingDelegationsResponse { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryDelegatorValidatorResponse response type for the +Query/DelegatorValidator RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorValidatorResponse { + /** validator defines the the validator info. */ + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } +} + +/** +* QueryDelegatorValidatorsResponse is response type for the +Query/DelegatorValidators RPC method. +*/ +export interface CosmosStakingV1Beta1QueryDelegatorValidatorsResponse { + /** validators defines the the validators' info of a delegator. */ + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +method. +*/ +export interface CosmosStakingV1Beta1QueryHistoricalInfoResponse { + /** hist defines the historical info at the given height. */ + hist?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + } +} + +/** + * QueryParamsResponse is response type for the Query/Params RPC method. + */ +export interface CosmosStakingV1Beta1QueryParamsResponse { + /** params holds all the parameters of this module. */ + params?: { + unbonding_time?: string + max_validators?: number + max_entries?: number + historical_entries?: number + bond_denom?: string + } +} + +/** + * QueryPoolResponse is response type for the Query/Pool RPC method. + */ +export interface CosmosStakingV1Beta1QueryPoolResponse { + /** pool defines the pool info. */ + pool?: { not_bonded_tokens?: string; bonded_tokens?: string } +} + +/** +* QueryRedelegationsResponse is response type for the Query/Redelegations RPC +method. +*/ +export interface CosmosStakingV1Beta1QueryRedelegationsResponse { + redelegation_responses?: { + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* QueryDelegationResponse is response type for the Query/UnbondingDelegation +RPC method. +*/ +export interface CosmosStakingV1Beta1QueryUnbondingDelegationResponse { + /** unbond defines the unbonding information of a delegation. */ + unbond?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + } +} + +export interface CosmosStakingV1Beta1QueryValidatorDelegationsResponse { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosStakingV1Beta1QueryValidatorResponse { + /** validator defines the the validator info. */ + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } +} + +/** +* QueryValidatorUnbondingDelegationsResponse is response type for the +Query/ValidatorUnbondingDelegations RPC method. +*/ +export interface CosmosStakingV1Beta1QueryValidatorUnbondingDelegationsResponse { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosStakingV1Beta1QueryValidatorsResponse { + /** validators contains all the queried validators. */ + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + + /** pagination defines the pagination in the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** +* Redelegation contains the list of a particular delegator's redelegating bonds +from a particular source validator to a particular destination validator. +*/ +export interface CosmosStakingV1Beta1Redelegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_src_address is the validator redelegation source operator address. */ + validator_src_address?: string + + /** validator_dst_address is the validator redelegation destination operator address. */ + validator_dst_address?: string + + /** entries are the redelegation entries. */ + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] +} + +/** + * RedelegationEntry defines a redelegation object with relevant metadata. + */ +export interface CosmosStakingV1Beta1RedelegationEntry { + /** + * creation_height defines the height which the redelegation took place. + * @format int64 + */ + creation_height?: string + + /** + * completion_time defines the unix time for redelegation completion. + * @format date-time + */ + completion_time?: string + + /** initial_balance defines the initial balance when redelegation started. */ + initial_balance?: string + + /** shares_dst is the amount of destination-validator shares created by redelegation. */ + shares_dst?: string +} + +/** +* RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +contains a balance in addition to shares which is more suitable for client +responses. +*/ +export interface CosmosStakingV1Beta1RedelegationEntryResponse { + /** RedelegationEntry defines a redelegation object with relevant metadata. */ + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + 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 CosmosStakingV1Beta1RedelegationResponse { + /** + * Redelegation contains the list of a particular delegator's redelegating bonds + * from a particular source validator to a particular destination validator. + */ + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] +} + +/** +* UnbondingDelegation stores all of a single delegator's unbonding bonds +for a single validator in an time-ordered list. +*/ +export interface CosmosStakingV1Beta1UnbondingDelegation { + /** delegator_address is the bech32-encoded address of the delegator. */ + delegator_address?: string + + /** validator_address is the bech32-encoded address of the validator. */ + validator_address?: string + + /** entries are the unbonding delegation entries. */ + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] +} + +/** + * UnbondingDelegationEntry defines an unbonding object with relevant metadata. + */ +export interface CosmosStakingV1Beta1UnbondingDelegationEntry { + /** + * creation_height is the height which the unbonding took place. + * @format int64 + */ + creation_height?: string + + /** + * completion_time is the unix time for unbonding completion. + * @format date-time + */ + completion_time?: string + + /** initial_balance defines the tokens initially scheduled to receive at completion. */ + initial_balance?: string + + /** balance defines the tokens to receive at completion. */ + balance?: string +} + +/** +* Validator defines a validator, together with the total amount of the +Validator's bond shares and their exchange rate to coins. Slashing results in +a decrease in the exchange rate, allowing correct calculation of future +undelegations without iterating over delegators. When coins are delegated to +this validator, the validator is credited with a delegation whose number of +bond shares is based on the amount of coins delegated divided by the current +exchange rate. Voting power can be calculated as total bonded shares +multiplied by exchange rate. +*/ +export interface CosmosStakingV1Beta1Validator { + /** operator_address defines the address of the validator's operator; bech encoded in JSON. */ + operator_address?: string + + /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */ + consensus_pubkey?: { type_url?: string; value?: string } + + /** jailed defined whether the validator has been jailed from bonded status or not. */ + jailed?: boolean + + /** status is the validator status (bonded/unbonding/unbonded). */ + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + + /** tokens define the delegated tokens (incl. self-delegation). */ + tokens?: string + + /** delegator_shares defines total shares issued to a validator's delegators. */ + delegator_shares?: string + + /** description defines the description terms for the validator. */ + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + + /** + * unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. + * @format int64 + */ + unbonding_height?: string + + /** + * unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. + * @format date-time + */ + unbonding_time?: string + + /** commission defines the commission parameters. */ + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + + /** min_self_delegation is the validator's self declared minimum self delegation. */ + min_self_delegation?: string +} + +export interface TendermintTypesBlockID { + /** @format byte */ + hash?: string + + /** PartsetHeader */ + part_set_header?: { total?: number; hash?: string } +} + +/** + * Header defines the structure of a Tendermint block header. + */ +export interface TendermintTypesHeader { + /** + * basic block info + * Consensus captures the consensus rules for processing a block in the + * blockchain, including all blockchain data structures and the rules of the + * application's state transition machine. + */ + version?: { block?: string; app?: string } + chain_id?: string + + /** @format int64 */ + height?: string + + /** @format date-time */ + time?: string + + /** prev block info */ + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + + /** + * hashes of block data + * @format byte + */ + last_commit_hash?: string + + /** @format byte */ + data_hash?: string + + /** + * hashes from the app output from the prev block + * @format byte + */ + validators_hash?: string + + /** @format byte */ + next_validators_hash?: string + + /** @format byte */ + consensus_hash?: string + + /** @format byte */ + app_hash?: string + + /** @format byte */ + last_results_hash?: string + + /** + * consensus info + * @format byte + */ + evidence_hash?: string + + /** @format byte */ + proposer_address?: string +} + +export interface TendermintTypesPartSetHeader { + /** @format int64 */ + total?: number + + /** @format byte */ + hash?: 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 TendermintVersionConsensus { + /** @format uint64 */ + block?: string + + /** @format uint64 */ + app?: string +} + +/** + * ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + */ +export interface CosmosBaseAbciV1Beta1ABCIMessageLog { + /** @format int64 */ + msg_index?: number + log?: string + + /** + * Events contains a slice of Event objects that were emitted during some + * execution. + */ + events?: { type?: string; attributes?: { key?: string; value?: string }[] }[] +} + +/** +* Attribute defines an attribute wrapper where the key and value are +strings instead of raw bytes. +*/ +export interface CosmosBaseAbciV1Beta1Attribute { + key?: string + value?: string +} + +/** + * GasInfo defines tx execution gas context. + */ +export interface CosmosBaseAbciV1Beta1GasInfo { + /** + * GasWanted is the maximum units of work we allow this tx to perform. + * @format uint64 + */ + gas_wanted?: string + + /** + * GasUsed is the amount of gas actually consumed. + * @format uint64 + */ + gas_used?: string +} + +/** + * Result is the union of ResponseFormat and ResponseCheckTx. + */ +export interface CosmosBaseAbciV1Beta1Result { + /** + * Data is any data returned from message or handler execution. It MUST be + * length prefixed in order to separate data from multiple message executions. + * @format byte + */ + data?: string + + /** 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?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] +} + +/** +* StringEvent defines en Event object wrapper where all the attributes +contain key/value pairs that are strings instead of raw bytes. +*/ +export interface CosmosBaseAbciV1Beta1StringEvent { + type?: string + attributes?: { key?: string; value?: string }[] +} + +/** +* TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. +*/ +export interface CosmosBaseAbciV1Beta1TxResponse { + /** + * The block height + * @format int64 + */ + height?: string + + /** The transaction hash. */ + txhash?: string + + /** Namespace for the Code */ + codespace?: string + + /** + * Response code. + * @format int64 + */ + code?: number + + /** Result bytes, if any. */ + data?: string + + /** + * The output of the application's logger (raw string). May be + * non-deterministic. + */ + raw_log?: string + + /** The output of the application's logger (typed). May be non-deterministic. */ + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + + /** Additional information. May be non-deterministic. */ + info?: string + + /** + * Amount of gas requested for transaction. + * @format int64 + */ + gas_wanted?: string + + /** + * Amount of gas consumed by transaction. + * @format int64 + */ + gas_used?: string + + /** The request transaction bytes. */ + tx?: { type_url?: string; value?: string } + + /** + * 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, + * these events include those emitted by processing all the messages and those + * emitted from the ante handler. Whereas Logs contains the events, with + * additional metadata, emitted only by processing the messages. + * + * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + */ + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] +} + +/** +* 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 CosmosCryptoMultisigV1Beta1CompactBitArray { + /** @format int64 */ + extra_bits_stored?: number + + /** @format byte */ + elems?: string +} + +/** +* SignMode represents a signing mode with its own security guarantees. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be +rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is +verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some +human-readable textual representation on top of the binary representation +from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses +Amino JSON and will be removed in the future + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos +SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + +Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, +but is not implemented on the SDK by default. To enable EIP-191, you need +to pass a custom `TxConfig` that has an implementation of +`SignModeHandler` for EIP-191. The SDK may decide to fully support +EIP-191 in the future. + +Since: cosmos-sdk 0.45.2 +*/ +export enum CosmosTxSigningV1Beta1SignMode { + SIGN_MODE_UNSPECIFIED = 'SIGN_MODE_UNSPECIFIED', + SIGN_MODE_DIRECT = 'SIGN_MODE_DIRECT', + SIGN_MODE_TEXTUAL = 'SIGN_MODE_TEXTUAL', + SIGN_MODE_LEGACY_AMINO_JSON = 'SIGN_MODE_LEGACY_AMINO_JSON', + SIGNMODEEIP191 = 'SIGN_MODE_EIP_191', +} + +/** +* AuthInfo describes the fee and signer modes that are used to sign a +transaction. +*/ +export interface CosmosTxV1Beta1AuthInfo { + /** + * signer_infos defines the signing modes for the required signers. The number + * and order of elements must match the required signers from TxBody's + * messages. The first element is the primary signer and the one which pays + * the fee. + */ + signer_infos?: CosmosTxV1Beta1SignerInfo[] + + /** + * Fee is the fee and gas limit for the transaction. The first signer is the + * primary signer and the one which pays the fee. The fee can be calculated + * based on the cost of evaluating the body and doing signature verification + * of the signers. This can be estimated via simulation. + */ + fee?: { + amount?: { denom?: string; amount?: string }[] + gas_limit?: string + payer?: string + granter?: string + } +} + +/** +* BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for +the tx to be committed in a block. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for +a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns +immediately. +*/ +export enum CosmosTxV1Beta1BroadcastMode { + BROADCAST_MODE_UNSPECIFIED = 'BROADCAST_MODE_UNSPECIFIED', + BROADCAST_MODE_BLOCK = 'BROADCAST_MODE_BLOCK', + BROADCAST_MODE_SYNC = 'BROADCAST_MODE_SYNC', + BROADCAST_MODE_ASYNC = 'BROADCAST_MODE_ASYNC', +} + +/** +* BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +RPC method. +*/ +export interface CosmosTxV1Beta1BroadcastTxRequest { + /** + * tx_bytes is the raw transaction. + * @format byte + */ + tx_bytes?: string + + /** + * BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. + * - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + * - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + * the tx to be committed in a block. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + * a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + * immediately. + */ + mode?: + | 'BROADCAST_MODE_UNSPECIFIED' + | 'BROADCAST_MODE_BLOCK' + | 'BROADCAST_MODE_SYNC' + | 'BROADCAST_MODE_ASYNC' +} + +/** +* BroadcastTxResponse is the response type for the +Service.BroadcastTx method. +*/ +export interface CosmosTxV1Beta1BroadcastTxResponse { + /** tx_response is the queried TxResponses. */ + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** +* 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 CosmosTxV1Beta1Fee { + /** amount is the amount of coins to be paid as a fee */ + amount?: { denom?: string; amount?: string }[] + + /** + * gas_limit is the maximum gas that can be used in transaction processing + * before an out of gas error occurs + * @format uint64 + */ + gas_limit?: string + + /** + * 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 +} + +/** +* GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. + +Since: cosmos-sdk 0.45.2 +*/ +export interface CosmosTxV1Beta1GetBlockWithTxsResponse { + /** txs are the transactions in the block. */ + txs?: CosmosTxV1Beta1Tx[] + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + + /** pagination defines a pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * GetTxResponse is the response type for the Service.GetTx method. + */ +export interface CosmosTxV1Beta1GetTxResponse { + /** tx is the queried transaction. */ + tx?: CosmosTxV1Beta1Tx + + /** tx_response is the queried TxResponses. */ + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** +* GetTxsEventResponse is the response type for the Service.TxsByEvents +RPC method. +*/ +export interface CosmosTxV1Beta1GetTxsEventResponse { + /** txs is the list of queried transactions. */ + txs?: CosmosTxV1Beta1Tx[] + + /** tx_responses is the list of queried TxResponses. */ + tx_responses?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + }[] + + /** pagination defines a pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * ModeInfo describes the signing mode of a single or nested multisig signer. + */ +export interface CosmosTxV1Beta1ModeInfo { + /** single represents a single signer */ + single?: { + mode?: + | 'SIGN_MODE_UNSPECIFIED' + | 'SIGN_MODE_DIRECT' + | 'SIGN_MODE_TEXTUAL' + | 'SIGN_MODE_LEGACY_AMINO_JSON' + | 'SIGN_MODE_EIP_191' + } + + /** multi represents a nested multisig signer */ + multi?: CosmosTxV1Beta1ModeInfoMulti +} + +export interface CosmosTxV1Beta1ModeInfoMulti { + /** + * bitarray specifies which keys within the multisig are signing + * 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. + */ + bitarray?: { extra_bits_stored?: number; elems?: string } + + /** + * mode_infos is the corresponding modes of the signers of the multisig + * which could include nested multisig public keys + */ + mode_infos?: CosmosTxV1Beta1ModeInfo[] +} + +export interface CosmosTxV1Beta1ModeInfoSingle { + /** + * mode is the signing mode of the single signer + * SignMode represents a signing mode with its own security guarantees. + * - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + * rejected - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + * verified with raw bytes from Tx - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + * human-readable textual representation on top of the binary representation + * from SIGN_MODE_DIRECT - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + * Amino JSON and will be removed in the future - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + * + * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + * but is not implemented on the SDK by default. To enable EIP-191, you need + * to pass a custom `TxConfig` that has an implementation of + * `SignModeHandler` for EIP-191. The SDK may decide to fully support + * EIP-191 in the future. + * Since: cosmos-sdk 0.45.2 + */ + mode?: + | 'SIGN_MODE_UNSPECIFIED' + | 'SIGN_MODE_DIRECT' + | 'SIGN_MODE_TEXTUAL' + | 'SIGN_MODE_LEGACY_AMINO_JSON' + | 'SIGN_MODE_EIP_191' +} + +/** +* - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order +*/ +export enum CosmosTxV1Beta1OrderBy { + ORDER_BY_UNSPECIFIED = 'ORDER_BY_UNSPECIFIED', + ORDER_BY_ASC = 'ORDER_BY_ASC', + ORDER_BY_DESC = 'ORDER_BY_DESC', +} + +/** +* SignerInfo describes the public key and signing mode of a single top-level +signer. +*/ +export interface CosmosTxV1Beta1SignerInfo { + /** + * 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. + */ + public_key?: { type_url?: string; value?: string } + + /** + * mode_info describes the signing mode of the signer and is a nested + * structure to support nested multisig pubkey's + * ModeInfo describes the signing mode of a single or nested multisig signer. + */ + mode_info?: CosmosTxV1Beta1ModeInfo + + /** + * 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. + * @format uint64 + */ + sequence?: string +} + +/** +* SimulateRequest is the request type for the Service.Simulate +RPC method. +*/ +export interface CosmosTxV1Beta1SimulateRequest { + /** + * tx is the transaction to simulate. + * Deprecated. Send raw tx bytes instead. + */ + tx?: CosmosTxV1Beta1Tx + + /** + * tx_bytes is the raw transaction. + * + * Since: cosmos-sdk 0.43 + * @format byte + */ + tx_bytes?: string +} + +/** +* SimulateResponse is the response type for the +Service.SimulateRPC method. +*/ +export interface CosmosTxV1Beta1SimulateResponse { + /** gas_info is the information about gas used in the simulation. */ + gas_info?: { gas_wanted?: string; gas_used?: string } + + /** result is the result of the simulation. */ + result?: { + data?: string + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } +} + +/** + * Tx is the standard type used for broadcasting transactions. + */ +export interface CosmosTxV1Beta1Tx { + /** + * body is the processable content of the transaction + * TxBody is the body of a transaction that all signers sign over. + */ + body?: { + messages?: { type_url?: string; value?: string }[] + memo?: string + timeout_height?: string + extension_options?: { type_url?: string; value?: string }[] + non_critical_extension_options?: { type_url?: string; value?: string }[] + } + + /** + * auth_info is the authorization related content of the transaction, + * specifically signers, signer modes and fee + * AuthInfo describes the fee and signer modes that are used to sign a + * transaction. + */ + auth_info?: CosmosTxV1Beta1AuthInfo + + /** + * 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?: string[] +} + +/** + * TxBody is the body of a transaction that all signers sign over. + */ +export interface CosmosTxV1Beta1TxBody { + /** + * messages is a list of messages to be executed. The required signers of + * those messages define the number and order of elements in AuthInfo's + * signer_infos and Tx's signatures. Each required signer address is added to + * the list only the first time it occurs. + * By convention, the first required signer (usually from the first message) + * is referred to as the primary signer and pays the fee for the whole + * transaction. + */ + messages?: { type_url?: string; value?: string }[] + + /** + * memo is any arbitrary note/comment to be added to the transaction. + * WARNING: in clients, any publicly exposed text should not be called memo, + * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). + */ + memo?: string + + /** + * timeout is the block height after which this transaction will not + * be processed by the chain + * @format uint64 + */ + timeout_height?: string + + /** + * 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 + */ + extension_options?: { type_url?: string; value?: string }[] + + /** + * 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 + */ + non_critical_extension_options?: { type_url?: string; value?: string }[] +} + +/** +* Event allows application developers to attach additional information to +ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +Later, transactions may be queried using these events. +*/ +export interface TendermintAbciEvent { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] +} + +/** + * EventAttribute is a single key-value pair, associated with an event. + */ +export interface TendermintAbciEventAttribute { + /** @format byte */ + key?: string + + /** @format byte */ + value?: string + index?: boolean +} + +export interface TendermintCryptoPublicKey { + /** @format byte */ + ed25519?: string + + /** @format byte */ + secp256k1?: string +} + +export interface TendermintTypesBlock { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + + /** Data contains the set of transactions included in the block */ + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + + /** + * Commit contains the evidence that a block was committed by a set of + * validators. + */ + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } +} + +export enum TendermintTypesBlockIDFlag { + BLOCK_ID_FLAG_UNKNOWN = 'BLOCK_ID_FLAG_UNKNOWN', + BLOCK_ID_FLAG_ABSENT = 'BLOCK_ID_FLAG_ABSENT', + BLOCK_ID_FLAG_COMMIT = 'BLOCK_ID_FLAG_COMMIT', + BLOCK_ID_FLAG_NIL = 'BLOCK_ID_FLAG_NIL', +} + +/** +* Commit contains the evidence that a block was committed by a set of +validators. +*/ +export interface TendermintTypesCommit { + /** @format int64 */ + height?: string + + /** @format int32 */ + round?: number + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] +} + +/** + * CommitSig is a part of the Vote included in a Commit. + */ +export interface TendermintTypesCommitSig { + /** BlockIdFlag indicates which BlcokID the signature is for */ + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + + /** @format byte */ + validator_address?: string + + /** @format date-time */ + timestamp?: string + + /** @format byte */ + signature?: string +} + +export interface TendermintTypesData { + /** + * Txs that will be applied by state @ block.Height+1. + * NOTE: not all txs here are valid. We're just agreeing on the order first. + * This means that block.AppHash does not include these txs. + */ + txs?: string[] +} + +/** +* DuplicateVoteEvidence contains evidence of a validator signed two conflicting +votes. +*/ +export interface TendermintTypesDuplicateVoteEvidence { + /** + * Vote represents a prevote, precommit, or commit vote from validators for + * consensus. + */ + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + + /** + * Vote represents a prevote, precommit, or commit vote from validators for + * consensus. + */ + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + + /** @format int64 */ + total_voting_power?: string + + /** @format int64 */ + validator_power?: string + + /** @format date-time */ + timestamp?: string +} + +export interface TendermintTypesEvidence { + /** + * DuplicateVoteEvidence contains evidence of a validator signed two conflicting + * votes. + */ + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + + /** + * LightClientAttackEvidence contains evidence of a set of validators attempting + * to mislead a light client. + */ + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } +} + +export interface TendermintTypesEvidenceList { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] +} + +export interface TendermintTypesLightBlock { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } +} + +/** +* LightClientAttackEvidence contains evidence of a set of validators attempting +to mislead a light client. +*/ +export interface TendermintTypesLightClientAttackEvidence { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + + /** @format int64 */ + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** @format int64 */ + total_voting_power?: string + + /** @format date-time */ + timestamp?: string +} + +export interface TendermintTypesSignedHeader { + /** Header defines the structure of a Tendermint block header. */ + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + + /** + * Commit contains the evidence that a block was committed by a set of + * validators. + */ + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } +} + +/** +* SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals +*/ +export enum TendermintTypesSignedMsgType { + SIGNED_MSG_TYPE_UNKNOWN = 'SIGNED_MSG_TYPE_UNKNOWN', + SIGNED_MSG_TYPE_PREVOTE = 'SIGNED_MSG_TYPE_PREVOTE', + SIGNED_MSG_TYPE_PRECOMMIT = 'SIGNED_MSG_TYPE_PRECOMMIT', + SIGNED_MSG_TYPE_PROPOSAL = 'SIGNED_MSG_TYPE_PROPOSAL', +} + +export interface TendermintTypesValidator { + /** @format byte */ + address?: string + + /** PublicKey defines the keys available for use with Tendermint Validators */ + pub_key?: { ed25519?: string; secp256k1?: string } + + /** @format int64 */ + voting_power?: string + + /** @format int64 */ + proposer_priority?: string +} + +export interface TendermintTypesValidatorSet { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + + /** @format int64 */ + total_voting_power?: string +} + +/** +* Vote represents a prevote, precommit, or commit vote from validators for +consensus. +*/ +export interface TendermintTypesVote { + /** + * SignedMsgType is a type of signed message in the consensus. + * + * - SIGNED_MSG_TYPE_PREVOTE: Votes + * - SIGNED_MSG_TYPE_PROPOSAL: Proposals + */ + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + + /** @format int64 */ + height?: string + + /** @format int32 */ + round?: number + + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + + /** @format date-time */ + timestamp?: string + + /** @format byte */ + validator_address?: string + + /** @format int32 */ + validator_index?: number + + /** @format byte */ + signature?: string +} + +/** + * GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetBlockByHeightResponse { + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } +} + +/** + * GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetLatestBlockResponse { + /** BlockID */ + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } +} + +/** + * GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetLatestValidatorSetResponse { + /** @format int64 */ + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +/** + * GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetNodeInfoResponse { + default_node_info?: { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } + } + + /** VersionInfo is the type for the GetNodeInfoResponse message. */ + application_version?: { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + cosmos_sdk_version?: string + } +} + +/** + * GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetSyncingResponse { + syncing?: boolean +} + +/** + * GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + */ +export interface CosmosBaseTendermintV1Beta1GetValidatorSetByHeightResponse { + /** @format int64 */ + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + + /** pagination defines an pagination for the response. */ + pagination?: { next_key?: string; total?: string } +} + +export interface CosmosBaseTendermintV1Beta1Module { + /** module path */ + path?: string + + /** module version */ + version?: string + + /** checksum */ + sum?: string +} + +/** + * Validator is the type for the validator-set. + */ +export interface CosmosBaseTendermintV1Beta1Validator { + address?: string + + /** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * Example 1: Pack and unpack a message in C++. + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * Example 2: Pack and unpack a message in Java. + * Any any = Any.pack(foo); + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * Example 3: Pack and unpack a message in Python. + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * Example 4: Pack and unpack a message in Go + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + */ + pub_key?: { type_url?: string; value?: string } + + /** @format int64 */ + voting_power?: string + + /** @format int64 */ + proposer_priority?: string +} + +/** + * VersionInfo is the type for the GetNodeInfoResponse message. + */ +export interface CosmosBaseTendermintV1Beta1VersionInfo { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + + /** Since: cosmos-sdk 0.43 */ + cosmos_sdk_version?: string +} + +export interface TendermintP2PDefaultNodeInfo { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + + /** @format byte */ + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } +} + +export interface TendermintP2PDefaultNodeInfoOther { + tx_index?: string + rpc_address?: string +} + +export interface TendermintP2PProtocolVersion { + /** @format uint64 */ + p2p?: string + + /** @format uint64 */ + block?: string + + /** @format uint64 */ + app?: string +} + +export type QueryParamsType = Record +export type ResponseFormat = keyof Omit + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean + /** request path */ + path: string + /** content type of request body */ + type?: ContentType + /** query params */ + query?: QueryParamsType + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseFormat + /** request body */ + body?: unknown + /** base url */ + baseUrl?: string + /** request cancellation token */ + cancelToken?: CancelToken +} + +export type RequestParams = Omit< + FullRequestParams, + 'body' | 'method' | 'query' | 'path' +> + +export interface ApiConfig { + baseUrl?: string + baseApiParams?: Omit + securityWorker?: ( + securityData: SecurityDataType | null, + ) => Promise | RequestParams | void + customFetch?: typeof fetch +} + +export interface HttpResponse + extends Response { + data: D + error: E +} + +type CancelToken = Symbol | string | number + +export enum ContentType { + Json = 'application/json', + FormData = 'multipart/form-data', + UrlEncoded = 'application/x-www-form-urlencoded', +} + +export class HttpClient { + public baseUrl: string = 'http://www.google.be' + private securityData: SecurityDataType | null = null + private securityWorker?: ApiConfig['securityWorker'] + private abortControllers = new Map() + private customFetch = (...fetchParams: Parameters) => + fetch(...fetchParams) + + private baseApiParams: RequestParams = { + credentials: 'same-origin', + headers: {}, + redirect: 'follow', + referrerPolicy: 'no-referrer', + } + + constructor(apiConfig: ApiConfig = {}) { + Object.assign(this, apiConfig) + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data + } + + private encodeQueryParam(key: string, value: any) { + const encodedKey = encodeURIComponent(key) + return `${encodedKey}=${encodeURIComponent( + typeof value === 'number' ? value : `${value}`, + )}` + } + + private addQueryParam(query: QueryParamsType, key: string) { + return this.encodeQueryParam(key, query[key]) + } + + private addArrayQueryParam(query: QueryParamsType, key: string) { + const value = query[key] + return value.map((v: any) => this.encodeQueryParam(key, v)).join('&') + } + + protected toQueryString(rawQuery?: QueryParamsType): string { + const query = rawQuery || {} + const keys = Object.keys(query).filter( + (key) => 'undefined' !== typeof query[key], + ) + return keys + .map((key) => + Array.isArray(query[key]) + ? this.addArrayQueryParam(query, key) + : this.addQueryParam(query, key), + ) + .join('&') + } + + protected addQueryParams(rawQuery?: QueryParamsType): string { + const queryString = this.toQueryString(rawQuery) + return queryString ? `?${queryString}` : '' + } + + private contentFormatters: Record any> = { + [ContentType.Json]: (input: any) => + input !== null && (typeof input === 'object' || typeof input === 'string') + ? JSON.stringify(input) + : input, + [ContentType.FormData]: (input: any) => + Object.keys(input || {}).reduce((formData, key) => { + const property = input[key] + formData.append( + key, + property instanceof Blob + ? property + : typeof property === 'object' && property !== null + ? JSON.stringify(property) + : `${property}`, + ) + return formData + }, new FormData()), + [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), + } + + private mergeRequestParams( + params1: RequestParams, + params2?: RequestParams, + ): RequestParams { + return { + ...this.baseApiParams, + ...params1, + ...(params2 || {}), + headers: { + ...(this.baseApiParams.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + } + } + + private createAbortSignal = ( + cancelToken: CancelToken, + ): AbortSignal | undefined => { + if (this.abortControllers.has(cancelToken)) { + const abortController = this.abortControllers.get(cancelToken) + if (abortController) { + return abortController.signal + } + return void 0 + } + + const abortController = new AbortController() + this.abortControllers.set(cancelToken, abortController) + return abortController.signal + } + + public abortRequest = (cancelToken: CancelToken) => { + const abortController = this.abortControllers.get(cancelToken) + + if (abortController) { + abortController.abort() + this.abortControllers.delete(cancelToken) + } + } + + public request = async ({ + body, + secure, + path, + type, + query, + format, + baseUrl, + cancelToken, + ...params + }: FullRequestParams): Promise> => { + const secureParams = + ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) && + this.securityWorker && + (await this.securityWorker(this.securityData))) || + {} + const requestParams = this.mergeRequestParams(params, secureParams) + const queryString = query && this.toQueryString(query) + const payloadFormatter = this.contentFormatters[type || ContentType.Json] + const responseFormat = format || requestParams.format + + return this.customFetch( + `${baseUrl || this.baseUrl || ''}${path}${ + queryString ? `?${queryString}` : '' + }`, + { + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData + ? { 'Content-Type': type } + : {}), + ...(requestParams.headers || {}), + }, + signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, + body: + typeof body === 'undefined' || body === null + ? null + : payloadFormatter(body), + }, + ).then(async (response) => { + const r = response as HttpResponse + r.data = null as unknown as T + r.error = null as unknown as E + + const data = !responseFormat + ? r + : await response[responseFormat]() + .then((data) => { + if (r.ok) { + r.data = data + } else { + r.error = data + } + return r + }) + .catch((e) => { + r.error = e + return r + }) + + if (cancelToken) { + this.abortControllers.delete(cancelToken) + } + + if (!response.ok) throw data + return data + }) + } +} + +/** + * @title Evmos Chain - gRPC Gateway docs + * @version 1.0.0 + * @baseUrl http://www.google.be + * + * A REST interface for state queries and transactions + */ +export class Api< + SecurityDataType extends unknown, +> extends HttpClient { + evmos = { + /** + * No description + * + * @tags Query + * @name ClaimsRecords + * @summary ClaimsRecords returns all claims records + * @request GET:/evmos/claims/v1/claims_records + */ + claimsRecords: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + claims?: { + address?: string + initial_claimable_amount?: string + actions_completed?: boolean[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClaimsRecord + * @summary ClaimsRecord returns the claims record for a given address + * @request GET:/evmos/claims/v1/claims_records/{address} + */ + claimsRecord: (address: string, params: RequestParams = {}) => + this.request< + { + initial_claimable_amount?: string + claims?: { + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + completed?: boolean + claimable_amount?: string + }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClaimsParams + * @summary Params returns the claims module parameters + * @request GET:/evmos/claims/v1/params + */ + claimsParams: (params: RequestParams = {}) => + this.request< + { + params?: { + enable_claims?: boolean + airdrop_start_time?: string + duration_until_decay?: string + duration_of_decay?: string + claims_denom?: string + authorized_channels?: string[] + evm_channels?: string[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TotalUnclaimed + * @summary TotalUnclaimed queries the total unclaimed tokens from the airdrop + * @request GET:/evmos/claims/v1/total_unclaimed + */ + totalUnclaimed: (params: RequestParams = {}) => + this.request< + { coins?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/total_unclaimed`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name CurrentEpoch + * @summary CurrentEpoch provide current epoch of specified identifier + * @request GET:/evmos/epochs/v1/current_epoch + */ + currentEpoch: ( + query?: { identifier?: string }, + params: RequestParams = {}, + ) => + this.request< + { current_epoch?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/current_epoch`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name EpochInfos + * @summary EpochInfos provide running epochInfos + * @request GET:/evmos/epochs/v1/epochs + */ + epochInfos: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + epochs?: { + identifier?: string + start_time?: string + duration?: string + current_epoch?: string + current_epoch_start_time?: string + epoch_counting_started?: boolean + current_epoch_start_height?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/epochs`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Erc20Params + * @summary Params retrieves the erc20 module params + * @request GET:/evmos/erc20/v1/params + */ + erc20Params: (params: RequestParams = {}) => + this.request< + { params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TokenPairs + * @summary TokenPairs retrieves registered token pairs + * @request GET:/evmos/erc20/v1/token_pairs + */ + tokenPairs: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + token_pairs?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TokenPair + * @summary TokenPair retrieves a registered token pair + * @request GET:/evmos/erc20/v1/token_pairs/{token} + */ + tokenPair: (token: string, params: RequestParams = {}) => + this.request< + { + token_pair?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs/${token}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AllocationMeters + * @summary AllocationMeters retrieves active allocation meters for a given +denomination + * @request GET:/evmos/incentives/v1/allocation_meters + */ + allocationMeters: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + allocation_meters?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AllocationMeter + * @summary AllocationMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/allocation_meters/{denom} + */ + allocationMeter: (denom: string, params: RequestParams = {}) => + this.request< + { allocation_meter?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters/${denom}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name GasMeters + * @summary GasMeters retrieves active gas meters for a given contract + * @request GET:/evmos/incentives/v1/gas_meters/{contract} + */ + gasMeters: ( + contract: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + gas_meters?: { + contract?: string + participant?: string + cumulative_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name GasMeter + * @summary GasMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/gas_meters/{contract}/{participant} + */ + gasMeter: ( + contract: string, + participant: string, + params: RequestParams = {}, + ) => + this.request< + { gas_meter?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}/${participant}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Incentives + * @summary Incentives retrieves registered incentives + * @request GET:/evmos/incentives/v1/incentives + */ + incentives: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + incentives?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Incentive + * @summary Incentive retrieves a registered incentive + * @request GET:/evmos/incentives/v1/incentives/{contract} + */ + incentive: (contract: string, params: RequestParams = {}) => + this.request< + { + incentive?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives/${contract}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name IncentivesParams + * @summary Params retrieves the incentives module params + * @request GET:/evmos/incentives/v1/params + */ + incentivesParams: (params: RequestParams = {}) => + this.request< + { + params?: { + enable_incentives?: boolean + allocation_limit?: string + incentives_epoch_identifier?: string + reward_scaler?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name CirculatingSupply + * @summary CirculatingSupply retrieves the total number of tokens that are in +circulation (i.e. excluding unvested tokens). + * @request GET:/evmos/inflation/v1/circulating_supply + */ + circulatingSupply: (params: RequestParams = {}) => + this.request< + { circulating_supply?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/circulating_supply`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name EpochMintProvision + * @summary EpochMintProvision retrieves current minting epoch provision value. + * @request GET:/evmos/inflation/v1/epoch_mint_provision + */ + epochMintProvision: (params: RequestParams = {}) => + this.request< + { epoch_mint_provision?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/epoch_mint_provision`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name InflationRate + * @summary InflationRate retrieves the inflation rate of the current period. + * @request GET:/evmos/inflation/v1/inflation_rate + */ + inflationRate: (params: RequestParams = {}) => + this.request< + { inflation_rate?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/inflation_rate`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name InflationParams + * @summary Params retrieves the total set of minting parameters. + * @request GET:/evmos/inflation/v1/params + */ + inflationParams: (params: RequestParams = {}) => + this.request< + { + params?: { + mint_denom?: string + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + enable_inflation?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Period + * @summary Period retrieves current period. + * @request GET:/evmos/inflation/v1/period + */ + period: (params: RequestParams = {}) => + this.request< + { period?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/period`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SkippedEpochs + * @summary SkippedEpochs retrieves the total number of skipped epochs. + * @request GET:/evmos/inflation/v1/skipped_epochs + */ + skippedEpochs: (params: RequestParams = {}) => + this.request< + { skipped_epochs?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/skipped_epochs`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Balances + * @summary Retrieves the unvested, vested and locked tokens for a vesting account + * @request GET:/evmos/vesting/v1/balances/{address} + */ + balances: (address: string, params: RequestParams = {}) => + this.request< + { + locked?: { denom?: string; amount?: string }[] + unvested?: { denom?: string; amount?: string }[] + vested?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/vesting/v1/balances/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name RecoveryParams + * @summary Params retrieves the total set of recovery parameters. + * @request GET:/evmos/recovery/v1/params + */ + recoveryParams: (params: RequestParams = {}) => + this.request< + { + params?: { + enable_recovery?: boolean + packet_timeout_duration?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/recovery/v1/params`, + method: 'GET', + ...params, + }), + } + ethermint = { + /** + * No description + * + * @tags Query + * @name Account + * @summary Account queries an Ethereum account. + * @request GET:/ethermint/evm/v1/account/{address} + */ + account: (address: string, params: RequestParams = {}) => + this.request< + { balance?: string; code_hash?: string; nonce?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/account/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Balance + * @summary Balance queries the balance of a the EVM denomination for a single +EthAccount. + * @request GET:/ethermint/evm/v1/balances/{address} + */ + balance: (address: string, params: RequestParams = {}) => + this.request< + { balance?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/balances/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name BaseFee + * @summary BaseFee queries the base fee of the parent block of the current block, +it's similar to feemarket module's method, but also checks london hardfork status. + * @request GET:/ethermint/evm/v1/base_fee + */ + baseFee: (params: RequestParams = {}) => + this.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/base_fee`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Code + * @summary Code queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/codes/{address} + */ + code: (address: string, params: RequestParams = {}) => + this.request< + { code?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/codes/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name CosmosAccount + * @summary CosmosAccount queries an Ethereum account's Cosmos Address. + * @request GET:/ethermint/evm/v1/cosmos_account/{address} + */ + cosmosAccount: (address: string, params: RequestParams = {}) => + this.request< + { cosmos_address?: string; sequence?: string; account_number?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/cosmos_account/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name EstimateGas + * @summary EstimateGas implements the `eth_estimateGas` rpc api + * @request GET:/ethermint/evm/v1/estimate_gas + */ + estimateGas: ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/estimate_gas`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name EthCall + * @summary EthCall implements the `eth_call` rpc api + * @request GET:/ethermint/evm/v1/eth_call + */ + ethCall: ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.request< + { + hash?: string + logs?: { + address?: string + topics?: string[] + data?: string + block_number?: string + tx_hash?: string + tx_index?: string + block_hash?: string + index?: string + removed?: boolean + }[] + ret?: string + vm_error?: string + gas_used?: string + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/eth_call`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name EvmParams + * @summary Params queries the parameters of x/evm module. + * @request GET:/ethermint/evm/v1/params + */ + evmParams: (params: RequestParams = {}) => + this.request< + { + params?: { + evm_denom?: string + enable_create?: boolean + enable_call?: boolean + extra_eips?: string[] + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + allow_unprotected_txs?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Storage + * @summary Storage queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/storage/{address}/{key} + */ + storage: (address: string, key: string, params: RequestParams = {}) => + this.request< + { value?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/storage/${address}/${key}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TraceBlock + * @summary TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + * @request GET:/ethermint/evm/v1/trace_block + */ + traceBlock: ( + query?: { + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_block`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TraceTx + * @summary TraceTx implements the `debug_traceTransaction` rpc api + * @request GET:/ethermint/evm/v1/trace_tx + */ + traceTx: ( + query?: { + 'msg.data.type_url'?: string + 'msg.data.value'?: string + 'msg.size'?: number + 'msg.hash'?: string + 'msg.from'?: string + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_tx`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorAccount + * @summary ValidatorAccount queries an Ethereum account's from a validator consensus +Address. + * @request GET:/ethermint/evm/v1/validator_account/{cons_address} + */ + validatorAccount: (consAddress: string, params: RequestParams = {}) => + this.request< + { + account_address?: string + sequence?: string + account_number?: string + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/validator_account/${consAddress}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name FeeMarketBaseFee + * @summary BaseFee queries the base fee of the parent block of the current block. + * @request GET:/ethermint/feemarket/v1/base_fee + */ + feeMarketBaseFee: (params: RequestParams = {}) => + this.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/base_fee`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name BlockGas + * @summary BlockGas queries the gas used at a given block height + * @request GET:/ethermint/feemarket/v1/block_gas + */ + blockGas: (params: RequestParams = {}) => + this.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/block_gas`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name FeeMarketParams + * @summary Params queries the parameters of x/feemarket module. + * @request GET:/ethermint/feemarket/v1/params + */ + feeMarketParams: (params: RequestParams = {}) => + this.request< + { + params?: { + no_base_fee?: boolean + base_fee_change_denominator?: number + elasticity_multiplier?: number + enable_height?: string + base_fee?: string + min_gas_price?: string + min_gas_multiplier?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/params`, + method: 'GET', + ...params, + }), + } + ibc = { + /** + * No description + * + * @tags Query + * @name DenomHash + * @summary DenomHash queries a denomination hash information. + * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} + */ + denomHash: (trace: string, params: RequestParams = {}) => + this.request< + { hash?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DenomTraces + * @summary DenomTraces queries all denomination traces. + * @request GET:/ibc/apps/transfer/v1/denom_traces + */ + denomTraces: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + denom_traces?: { path?: string; base_denom?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DenomTrace + * @summary DenomTrace queries a denomination trace information. + * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} + */ + denomTrace: (hash: string, params: RequestParams = {}) => + this.request< + { denom_trace?: { path?: string; base_denom?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TransferParams + * @summary Params queries all parameters of the ibc-transfer module. + * @request GET:/ibc/apps/transfer/v1/params + */ + transferParams: (params: RequestParams = {}) => + this.request< + { params?: { send_enabled?: boolean; receive_enabled?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClientParams + * @summary ClientParams queries all parameters of the ibc client. + * @request GET:/ibc/client/v1/params + */ + clientParams: (params: RequestParams = {}) => + this.request< + { params?: { allowed_clients?: string[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/client/v1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClientStates + * @summary ClientStates queries all the IBC light clients of a chain. + * @request GET:/ibc/core/client/v1/client_states + */ + clientStates: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + client_states?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClientState + * @summary ClientState queries an IBC light client. + * @request GET:/ibc/core/client/v1/client_states/{client_id} + */ + clientState: (clientId: string, params: RequestParams = {}) => + this.request< + { + client_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states/${clientId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClientStatus + * @summary Status queries the status of an IBC client. + * @request GET:/ibc/core/client/v1/client_status/{client_id} + */ + clientStatus: (clientId: string, params: RequestParams = {}) => + this.request< + { status?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_status/${clientId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ConsensusStates + * @summary ConsensusStates queries all the consensus state associated with a given +client. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id} + */ + consensusStates: ( + clientId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + consensus_states?: { + height?: { revision_number?: string; revision_height?: string } + consensus_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ConsensusState + * @summary ConsensusState queries a consensus state associated with a client state at +a given height. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height} + */ + consensusState: ( + clientId: string, + revisionNumber: string, + revisionHeight: string, + query?: { latest_height?: boolean }, + params: RequestParams = {}, + ) => + this.request< + { + consensus_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name UpgradedClientState + * @summary UpgradedClientState queries an Upgraded IBC light client. + * @request GET:/ibc/core/client/v1/upgraded_client_states + */ + upgradedClientState: (params: RequestParams = {}) => + this.request< + { upgraded_client_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_client_states`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name UpgradedConsensusState + * @summary UpgradedConsensusState queries an Upgraded IBC consensus state. + * @request GET:/ibc/core/client/v1/upgraded_consensus_states + */ + upgradedConsensusState: (params: RequestParams = {}) => + this.request< + { upgraded_consensus_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_consensus_states`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ClientConnections + * @summary ClientConnections queries the connection paths associated with a client +state. + * @request GET:/ibc/core/connection/v1/client_connections/{client_id} + */ + clientConnections: (clientId: string, params: RequestParams = {}) => + this.request< + { + connection_paths?: string[] + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/client_connections/${clientId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Connections + * @summary Connections queries all the IBC connections of a chain. + * @request GET:/ibc/core/connection/v1/connections + */ + connections: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + connections?: { + id?: string + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Connection + * @summary Connection queries an IBC connection end. + * @request GET:/ibc/core/connection/v1/connections/{connection_id} + */ + connection: (connectionId: string, params: RequestParams = {}) => + this.request< + { + connection?: { + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ConnectionClientState + * @summary ConnectionClientState queries the client state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/client_state + */ + connectionClientState: (connectionId: string, params: RequestParams = {}) => + this.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/client_state`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ConnectionConsensusState + * @summary ConnectionConsensusState queries the consensus state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + connectionConsensusState: ( + connectionId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Channels + * @summary Channels queries all the IBC channels of a chain. + * @request GET:/ibc/core/channel/v1/channels + */ + channels: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Channel + * @summary Channel queries an IBC Channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id} + */ + channel: (channelId: string, portId: string, params: RequestParams = {}) => + this.request< + { + channel?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ChannelClientState + * @summary ChannelClientState queries for the client state for the channel associated +with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state + */ + channelClientState: ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ChannelConsensusState + * @summary ChannelConsensusState queries for the consensus state for the channel +associated with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + channelConsensusState: ( + channelId: string, + portId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name NextSequenceReceive + * @summary NextSequenceReceive returns the next receive sequence for a given channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence + */ + nextSequenceReceive: ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.request< + { + next_sequence_receive?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/next_sequence`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name PacketAcknowledgements + * @summary PacketAcknowledgements returns all the packet acknowledgements associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements + */ + packetAcknowledgements: ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + packet_commitment_sequences?: string[] + }, + params: RequestParams = {}, + ) => + this.request< + { + acknowledgements?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name PacketAcknowledgement + * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence} + */ + packetAcknowledgement: ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.request< + { + acknowledgement?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name PacketCommitments + * @summary PacketCommitments returns all the packet commitments hashes associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments + */ + packetCommitments: ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + commitments?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name UnreceivedAcks + * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated +with a channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks + */ + unreceivedAcks: ( + channelId: string, + portId: string, + packetAckSequences: string[], + params: RequestParams = {}, + ) => + this.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name UnreceivedPackets + * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a +channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets + */ + unreceivedPackets: ( + channelId: string, + portId: string, + packetCommitmentSequences: string[], + params: RequestParams = {}, + ) => + this.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name PacketCommitment + * @summary PacketCommitment queries a stored packet commitment hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence} + */ + packetCommitment: ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.request< + { + commitment?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name PacketReceipt + * @summary PacketReceipt queries if a given packet sequence has been received on the +queried chain + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence} + */ + packetReceipt: ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.request< + { + received?: boolean + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ConnectionChannels + * @summary ConnectionChannels queries all the channels associated with a connection +end. + * @request GET:/ibc/core/channel/v1/connections/{connection}/channels + */ + connectionChannels: ( + connection: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/connections/${connection}/channels`, + method: 'GET', + query: query, + ...params, + }), + } + cosmos = { + /** + * @description Since: cosmos-sdk 0.43 + * + * @tags Query + * @name Accounts + * @summary Accounts returns all the existing accounts + * @request GET:/cosmos/auth/v1beta1/accounts + */ + accounts: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + accounts?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AuthAccount + * @summary Account returns account details based on address. + * @request GET:/cosmos/auth/v1beta1/accounts/{address} + */ + authAccount: (address: string, params: RequestParams = {}) => + this.request< + { account?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts/${address}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AuthParams + * @summary Params queries all parameters. + * @request GET:/cosmos/auth/v1beta1/params + */ + authParams: (params: RequestParams = {}) => + this.request< + { + params?: { + max_memo_characters?: string + tx_sig_limit?: string + tx_size_cost_per_byte?: string + sig_verify_cost_ed25519?: string + sig_verify_cost_secp256k1?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Grants + * @summary Returns list of `Authorization`, granted to the grantee by the granter. + * @request GET:/cosmos/authz/v1beta1/grants + */ + grants: ( + query?: { + granter?: string + grantee?: string + msg_type_url?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + grants?: { + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants`, + method: 'GET', + query: query, + ...params, + }), + + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranteeGrants + * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. + * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} + */ + granteeGrants: ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranterGrants + * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. + * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} + */ + granterGrants: ( + granter: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AllBalances + * @summary AllBalances queries the balance of all coins for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address} + */ + allBalances: ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name BankBalance + * @summary Balance queries the balance of a single coin for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom + */ + bankBalance: ( + address: string, + query?: { denom?: string }, + params: RequestParams = {}, + ) => + this.request< + { balance?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DenomsMetadata + * @summary DenomsMetadata queries the client metadata for all registered coin denominations. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata + */ + denomsMetadata: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + metadatas?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DenomMetadata + * @summary DenomsMetadata queries the client metadata of a given coin denomination. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} + */ + denomMetadata: (denom: string, params: RequestParams = {}) => + this.request< + { + metadata?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name BankParams + * @summary Params queries the parameters of x/bank module. + * @request GET:/cosmos/bank/v1beta1/params + */ + bankParams: (params: RequestParams = {}) => + this.request< + { + params?: { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SpendableBalances + * @summary SpendableBalances queries the spenable balance of all coins for a single +account. + * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} + */ + spendableBalances: ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TotalSupply + * @summary TotalSupply queries the total supply of all coins. + * @request GET:/cosmos/bank/v1beta1/supply + */ + totalSupply: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + supply?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SupplyOf + * @summary SupplyOf queries the supply of a single coin. + * @request GET:/cosmos/bank/v1beta1/supply/{denom} + */ + supplyOf: (denom: string, params: RequestParams = {}) => + this.request< + { amount?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply/${denom}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name CommunityPool + * @summary CommunityPool queries the community pool coins. + * @request GET:/cosmos/distribution/v1beta1/community_pool + */ + communityPool: (params: RequestParams = {}) => + this.request< + { pool?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/community_pool`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegationTotalRewards + * @summary DelegationTotalRewards queries the total rewards accrued by a each +validator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards + */ + delegationTotalRewards: ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { + rewards?: { + validator_address?: string + reward?: { denom?: string; amount?: string }[] + }[] + total?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegationRewards + * @summary DelegationRewards queries the total rewards accrued by a delegation. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} + */ + delegationRewards: ( + delegatorAddress: string, + validatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { rewards?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DistDelegatorValidators + * @summary DelegatorValidators queries the validators of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators + */ + distDelegatorValidators: ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { validators?: string[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegatorWithdrawAddress + * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address + */ + delegatorWithdrawAddress: ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { withdraw_address?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DistributionParams + * @summary Params queries params of the distribution module. + * @request GET:/cosmos/distribution/v1beta1/params + */ + distributionParams: (params: RequestParams = {}) => + this.request< + { + params?: { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorCommission + * @summary ValidatorCommission queries accumulated commission for a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/commission + */ + validatorCommission: ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { commission?: { commission?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorOutstandingRewards + * @summary ValidatorOutstandingRewards queries rewards of a validator address. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards + */ + validatorOutstandingRewards: ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.request< + { rewards?: { rewards?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorSlashes + * @summary ValidatorSlashes queries slash events of a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/slashes + */ + validatorSlashes: ( + validatorAddress: string, + query?: { + starting_height?: string + ending_height?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + slashes?: { validator_period?: string; fraction?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Allowance + * @summary Allowance returns fee granted to the grantee by the granter. + * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} + */ + allowance: (granter: string, grantee: string, params: RequestParams = {}) => + this.request< + { + allowance?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Allowances + * @summary Allowances returns all the grants for address. + * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} + */ + allowances: ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + allowances?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name AllEvidence + * @summary AllEvidence queries all evidence. + * @request GET:/cosmos/evidence/v1beta1/evidence + */ + allEvidence: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + evidence?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Evidence + * @summary Evidence queries evidence based on evidence hash. + * @request GET:/cosmos/evidence/v1beta1/evidence/{evidence_hash} + */ + evidence: (evidenceHash: string, params: RequestParams = {}) => + this.request< + { evidence?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name GovParams + * @summary Params queries all parameters of the gov module. + * @request GET:/cosmos/gov/v1beta1/params/{params_type} + */ + govParams: (paramsType: string, params: RequestParams = {}) => + this.request< + { + voting_params?: { voting_period?: string } + deposit_params?: { + min_deposit?: { denom?: string; amount?: string }[] + max_deposit_period?: string + } + tally_params?: { + quorum?: string + threshold?: string + veto_threshold?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/params/${paramsType}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Proposals + * @summary Proposals queries all proposals based on given status. + * @request GET:/cosmos/gov/v1beta1/proposals + */ + proposals: ( + query?: { + proposal_status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + voter?: string + depositor?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + proposals?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Proposal + * @summary Proposal queries proposal details based on ProposalID. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id} + */ + proposal: (proposalId: string, params: RequestParams = {}) => + this.request< + { + proposal?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Deposits + * @summary Deposits queries all deposits of a single proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits + */ + deposits: ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + deposits?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Deposit + * @summary Deposit queries single deposit information based proposalID, depositAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} + */ + deposit: ( + proposalId: string, + depositor: string, + params: RequestParams = {}, + ) => + this.request< + { + deposit?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name TallyResult + * @summary TallyResult queries the tally of a proposal vote. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/tally + */ + tallyResult: (proposalId: string, params: RequestParams = {}) => + this.request< + { + tally?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Votes + * @summary Votes queries votes of a given proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes + */ + votes: ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + votes?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Vote + * @summary Vote queries voted information based on proposalID, voterAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} + */ + vote: (proposalId: string, voter: string, params: RequestParams = {}) => + this.request< + { + vote?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SlashingParams + * @summary Params queries the parameters of slashing module + * @request GET:/cosmos/slashing/v1beta1/params + */ + slashingParams: (params: RequestParams = {}) => + this.request< + { + params?: { + signed_blocks_window?: string + min_signed_per_window?: string + downtime_jail_duration?: string + slash_fraction_double_sign?: string + slash_fraction_downtime?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SigningInfos + * @summary SigningInfos queries signing info of all validators + * @request GET:/cosmos/slashing/v1beta1/signing_infos + */ + signingInfos: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name SigningInfo + * @summary SigningInfo queries the signing info of given cons address + * @request GET:/cosmos/slashing/v1beta1/signing_infos/{cons_address} + */ + signingInfo: (consAddress: string, params: RequestParams = {}) => + this.request< + { + val_signing_info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegatorDelegations + * @summary DelegatorDelegations queries all delegations of a given delegator address. + * @request GET:/cosmos/staking/v1beta1/delegations/{delegator_addr} + */ + delegatorDelegations: ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Redelegations + * @summary Redelegations queries redelegations of given address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations + */ + redelegations: ( + delegatorAddr: string, + query?: { + src_validator_addr?: string + dst_validator_addr?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + redelegation_responses?: { + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegatorUnbondingDelegations + * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given +delegator address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations + */ + delegatorUnbondingDelegations: ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegatorValidators + * @summary DelegatorValidators queries all validators info for given delegator +address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators + */ + delegatorValidators: ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name DelegatorValidator + * @summary DelegatorValidator queries validator info for given delegator validator +pair. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} + */ + delegatorValidator: ( + delegatorAddr: string, + validatorAddr: string, + params: RequestParams = {}, + ) => + this.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name HistoricalInfo + * @summary HistoricalInfo queries the historical info for given height. + * @request GET:/cosmos/staking/v1beta1/historical_info/{height} + */ + historicalInfo: (height: string, params: RequestParams = {}) => + this.request< + { + hist?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/historical_info/${height}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name StakingParams + * @summary Parameters queries the staking parameters. + * @request GET:/cosmos/staking/v1beta1/params + */ + stakingParams: (params: RequestParams = {}) => + this.request< + { + params?: { + unbonding_time?: string + max_validators?: number + max_entries?: number + historical_entries?: number + bond_denom?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/params`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Pool + * @summary Pool queries the pool info. + * @request GET:/cosmos/staking/v1beta1/pool + */ + pool: (params: RequestParams = {}) => + this.request< + { pool?: { not_bonded_tokens?: string; bonded_tokens?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/pool`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Validators + * @summary Validators queries all validators that match the given status. + * @request GET:/cosmos/staking/v1beta1/validators + */ + validators: ( + query?: { + status?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Validator + * @summary Validator queries validator info for given validator address. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr} + */ + validator: (validatorAddr: string, params: RequestParams = {}) => + this.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorDelegations + * @summary ValidatorDelegations queries delegate info for given validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations + */ + validatorDelegations: ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Query + * @name Delegation + * @summary Delegation queries delegate info for given validator delegator pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} + */ + delegation: ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.request< + { + delegation_response?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name UnbondingDelegation + * @summary UnbondingDelegation queries unbonding info for given validator delegator +pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation + */ + unbondingDelegation: ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.request< + { + unbond?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Query + * @name ValidatorUnbondingDelegations + * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations + */ + validatorUnbondingDelegations: ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Service + * @name Simulate + * @summary Simulate simulates executing a transaction for estimating gas usage. + * @request POST:/cosmos/tx/v1beta1/simulate + */ + simulate: ( + body: CosmosTxV1Beta1SimulateRequest, + params: RequestParams = {}, + ) => + this.request< + { + gas_info?: { gas_wanted?: string; gas_used?: string } + result?: { + data?: string + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/simulate`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetTxsEvent + * @summary GetTxsEvent fetches txs by event. + * @request GET:/cosmos/tx/v1beta1/txs + */ + getTxsEvent: ( + query?: { + events?: string[] + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + order_by?: 'ORDER_BY_UNSPECIFIED' | 'ORDER_BY_ASC' | 'ORDER_BY_DESC' + }, + params: RequestParams = {}, + ) => + this.request< + CosmosTxV1Beta1GetTxsEventResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Service + * @name BroadcastTx + * @summary BroadcastTx broadcast transaction. + * @request POST:/cosmos/tx/v1beta1/txs + */ + broadcastTx: ( + body: { + tx_bytes?: string + mode?: + | 'BROADCAST_MODE_UNSPECIFIED' + | 'BROADCAST_MODE_BLOCK' + | 'BROADCAST_MODE_SYNC' + | 'BROADCAST_MODE_ASYNC' + }, + params: RequestParams = {}, + ) => + this.request< + { + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }), + + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Service + * @name GetBlockWithTxs + * @summary GetBlockWithTxs fetches a block with decoded txs. + * @request GET:/cosmos/tx/v1beta1/txs/block/{height} + */ + getBlockWithTxs: ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + CosmosTxV1Beta1GetBlockWithTxsResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/block/${height}`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetTx + * @summary GetTx fetches a tx by hash. + * @request GET:/cosmos/tx/v1beta1/txs/{hash} + */ + getTx: (hash: string, params: RequestParams = {}) => + this.request< + CosmosTxV1Beta1GetTxResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/${hash}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetLatestBlock + * @summary GetLatestBlock returns the latest block. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/latest + */ + getLatestBlock: (params: RequestParams = {}) => + this.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetBlockByHeight + * @summary GetBlockByHeight queries block for given height. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/{height} + */ + getBlockByHeight: (height: string, params: RequestParams = {}) => + this.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetNodeInfo + * @summary GetNodeInfo queries the current node info. + * @request GET:/cosmos/base/tendermint/v1beta1/node_info + */ + getNodeInfo: (params: RequestParams = {}) => + this.request< + { + default_node_info?: { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } + } + application_version?: { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + cosmos_sdk_version?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/node_info`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetSyncing + * @summary GetSyncing queries node syncing. + * @request GET:/cosmos/base/tendermint/v1beta1/syncing + */ + getSyncing: (params: RequestParams = {}) => + this.request< + { syncing?: boolean }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/syncing`, + method: 'GET', + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetLatestValidatorSet + * @summary GetLatestValidatorSet queries latest validator-set. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/latest + */ + getLatestValidatorSet: ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, + method: 'GET', + query: query, + ...params, + }), + + /** + * No description + * + * @tags Service + * @name GetValidatorSetByHeight + * @summary GetValidatorSetByHeight queries validator-set at a given height. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/{height} + */ + getValidatorSetByHeight: ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, + method: 'GET', + query: query, + ...params, + }), + } +} From d2dd973c1a93ac08fd5291e3df053a281a8cac2a Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 13:04:46 +0300 Subject: [PATCH 04/11] refactor: change generator config --- packages/provider/package.json | 10 +- packages/provider/src/generated/Cosmos.ts | 2676 +++++++++ packages/provider/src/generated/Ethermint.ts | 482 ++ packages/provider/src/generated/Evmos.ts | 736 +++ packages/provider/src/generated/Ibc.ts | 1005 ++++ .../data-contracts.ts} | 5228 ----------------- .../provider/src/generated/http-client.ts | 158 + yarn.lock | 256 +- 8 files changed, 5316 insertions(+), 5235 deletions(-) create mode 100644 packages/provider/src/generated/Cosmos.ts create mode 100644 packages/provider/src/generated/Ethermint.ts create mode 100644 packages/provider/src/generated/Evmos.ts create mode 100644 packages/provider/src/generated/Ibc.ts rename packages/provider/src/{restApiExample.ts => generated/data-contracts.ts} (58%) create mode 100644 packages/provider/src/generated/http-client.ts diff --git a/packages/provider/package.json b/packages/provider/package.json index ef33587e..2b14f791 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -15,8 +15,8 @@ "postinstall": "shx mkdir -p dist && link-module-alias", "build": "tsc --build tsconfig.build.json && npm build:api && link-module-alias && autorest", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", - "build:api": "npx swagger-typescript-api -p https://api.evmos.org/openapi.json -o ./src -n restApiExample.ts", - "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", + "build:api": "npx swagger-typescript-api --axios --single-http-client --modular -p https://api.evmos.org/openapi.json -o ./src/generated", + "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", "test": "jest", "test:unit": "jest test/unit", "test:integration": "jest test/unit", @@ -28,8 +28,12 @@ }, "dependencies": { "@types/node": "^17.0.21", + "axios": "^0.27.2", "link-module-alias": "^1.2.0", "shx": "^0.3.4" }, - "gitHead": "fc2045b9357bde146e3374429453eb5d4a48a2ca" + "gitHead": "fc2045b9357bde146e3374429453eb5d4a48a2ca", + "devDependencies": { + "swagger-typescript-api": "^9.3.1" + } } diff --git a/packages/provider/src/generated/Cosmos.ts b/packages/provider/src/generated/Cosmos.ts new file mode 100644 index 00000000..5bc52a18 --- /dev/null +++ b/packages/provider/src/generated/Cosmos.ts @@ -0,0 +1,2676 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + CosmosTxV1Beta1GetBlockWithTxsResponse, + CosmosTxV1Beta1GetTxResponse, + CosmosTxV1Beta1GetTxsEventResponse, + CosmosTxV1Beta1SimulateRequest, +} from './data-contracts' +import { ContentType, HttpClient, RequestParams } from './http-client' + +export class Cosmos { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * @description Since: cosmos-sdk 0.43 + * + * @tags Query + * @name Accounts + * @summary Accounts returns all the existing accounts + * @request GET:/cosmos/auth/v1beta1/accounts + */ + accounts = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + accounts?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AuthAccount + * @summary Account returns account details based on address. + * @request GET:/cosmos/auth/v1beta1/accounts/{address} + */ + authAccount = (address: string, params: RequestParams = {}) => + this.http.request< + { account?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/accounts/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name AuthParams + * @summary Params queries all parameters. + * @request GET:/cosmos/auth/v1beta1/params + */ + authParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + max_memo_characters?: string + tx_sig_limit?: string + tx_size_cost_per_byte?: string + sig_verify_cost_ed25519?: string + sig_verify_cost_secp256k1?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/auth/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Grants + * @summary Returns list of `Authorization`, granted to the grantee by the granter. + * @request GET:/cosmos/authz/v1beta1/grants + */ + grants = ( + query?: { + granter?: string + grantee?: string + msg_type_url?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants`, + method: 'GET', + query: query, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranteeGrants + * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. + * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} + */ + granteeGrants = ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, + method: 'GET', + query: query, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Query + * @name GranterGrants + * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. + * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} + */ + granterGrants = ( + granter: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + grants?: { + granter?: string + grantee?: string + authorization?: { type_url?: string; value?: string } + expiration?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllBalances + * @summary AllBalances queries the balance of all coins for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address} + */ + allBalances = ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name BankBalance + * @summary Balance queries the balance of a single coin for a single account. + * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom + */ + bankBalance = ( + address: string, + query?: { denom?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { balance?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomsMetadata + * @summary DenomsMetadata queries the client metadata for all registered coin denominations. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata + */ + denomsMetadata = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + metadatas?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomMetadata + * @summary DenomsMetadata queries the client metadata of a given coin denomination. + * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} + */ + denomMetadata = (denom: string, params: RequestParams = {}) => + this.http.request< + { + metadata?: { + description?: string + denom_units?: { + denom?: string + exponent?: number + aliases?: string[] + }[] + base?: string + display?: string + name?: string + symbol?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name BankParams + * @summary Params queries the parameters of x/bank module. + * @request GET:/cosmos/bank/v1beta1/params + */ + bankParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + send_enabled?: { denom?: string; enabled?: boolean }[] + default_send_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/params`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name SpendableBalances + * @summary SpendableBalances queries the spenable balance of all coins for a single +account. + * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} + */ + spendableBalances = ( + address: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + balances?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TotalSupply + * @summary TotalSupply queries the total supply of all coins. + * @request GET:/cosmos/bank/v1beta1/supply + */ + totalSupply = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + supply?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name SupplyOf + * @summary SupplyOf queries the supply of a single coin. + * @request GET:/cosmos/bank/v1beta1/supply/{denom} + */ + supplyOf = (denom: string, params: RequestParams = {}) => + this.http.request< + { amount?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/bank/v1beta1/supply/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CommunityPool + * @summary CommunityPool queries the community pool coins. + * @request GET:/cosmos/distribution/v1beta1/community_pool + */ + communityPool = (params: RequestParams = {}) => + this.http.request< + { pool?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/community_pool`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegationTotalRewards + * @summary DelegationTotalRewards queries the total rewards accrued by a each +validator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards + */ + delegationTotalRewards = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { + rewards?: { + validator_address?: string + reward?: { denom?: string; amount?: string }[] + }[] + total?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegationRewards + * @summary DelegationRewards queries the total rewards accrued by a delegation. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} + */ + delegationRewards = ( + delegatorAddress: string, + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { rewards?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DistDelegatorValidators + * @summary DelegatorValidators queries the validators of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators + */ + distDelegatorValidators = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { validators?: string[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegatorWithdrawAddress + * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. + * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address + */ + delegatorWithdrawAddress = ( + delegatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { withdraw_address?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DistributionParams + * @summary Params queries params of the distribution module. + * @request GET:/cosmos/distribution/v1beta1/params + */ + distributionParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + community_tax?: string + base_proposer_reward?: string + bonus_proposer_reward?: string + withdraw_addr_enabled?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorCommission + * @summary ValidatorCommission queries accumulated commission for a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/commission + */ + validatorCommission = ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { commission?: { commission?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorOutstandingRewards + * @summary ValidatorOutstandingRewards queries rewards of a validator address. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards + */ + validatorOutstandingRewards = ( + validatorAddress: string, + params: RequestParams = {}, + ) => + this.http.request< + { rewards?: { rewards?: { denom?: string; amount?: string }[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorSlashes + * @summary ValidatorSlashes queries slash events of a validator. + * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/slashes + */ + validatorSlashes = ( + validatorAddress: string, + query?: { + starting_height?: string + ending_height?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + slashes?: { validator_period?: string; fraction?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Allowance + * @summary Allowance returns fee granted to the grantee by the granter. + * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} + */ + allowance = (granter: string, grantee: string, params: RequestParams = {}) => + this.http.request< + { + allowance?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Allowances + * @summary Allowances returns all the grants for address. + * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} + */ + allowances = ( + grantee: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + allowances?: { + granter?: string + grantee?: string + allowance?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllEvidence + * @summary AllEvidence queries all evidence. + * @request GET:/cosmos/evidence/v1beta1/evidence + */ + allEvidence = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + evidence?: { type_url?: string; value?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Evidence + * @summary Evidence queries evidence based on evidence hash. + * @request GET:/cosmos/evidence/v1beta1/evidence/{evidence_hash} + */ + evidence = (evidenceHash: string, params: RequestParams = {}) => + this.http.request< + { evidence?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name GovParams + * @summary Params queries all parameters of the gov module. + * @request GET:/cosmos/gov/v1beta1/params/{params_type} + */ + govParams = (paramsType: string, params: RequestParams = {}) => + this.http.request< + { + voting_params?: { voting_period?: string } + deposit_params?: { + min_deposit?: { denom?: string; amount?: string }[] + max_deposit_period?: string + } + tally_params?: { + quorum?: string + threshold?: string + veto_threshold?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/params/${paramsType}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Proposals + * @summary Proposals queries all proposals based on given status. + * @request GET:/cosmos/gov/v1beta1/proposals + */ + proposals = ( + query?: { + proposal_status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + voter?: string + depositor?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + proposals?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Proposal + * @summary Proposal queries proposal details based on ProposalID. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id} + */ + proposal = (proposalId: string, params: RequestParams = {}) => + this.http.request< + { + proposal?: { + proposal_id?: string + content?: { type_url?: string; value?: string } + status?: + | 'PROPOSAL_STATUS_UNSPECIFIED' + | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' + | 'PROPOSAL_STATUS_VOTING_PERIOD' + | 'PROPOSAL_STATUS_PASSED' + | 'PROPOSAL_STATUS_REJECTED' + | 'PROPOSAL_STATUS_FAILED' + final_tally_result?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + submit_time?: string + deposit_end_time?: string + total_deposit?: { denom?: string; amount?: string }[] + voting_start_time?: string + voting_end_time?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Deposits + * @summary Deposits queries all deposits of a single proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits + */ + deposits = ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + deposits?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Deposit + * @summary Deposit queries single deposit information based proposalID, depositAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} + */ + deposit = ( + proposalId: string, + depositor: string, + params: RequestParams = {}, + ) => + this.http.request< + { + deposit?: { + proposal_id?: string + depositor?: string + amount?: { denom?: string; amount?: string }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TallyResult + * @summary TallyResult queries the tally of a proposal vote. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/tally + */ + tallyResult = (proposalId: string, params: RequestParams = {}) => + this.http.request< + { + tally?: { + yes?: string + abstain?: string + no?: string + no_with_veto?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Votes + * @summary Votes queries votes of a given proposal. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes + */ + votes = ( + proposalId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + votes?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Vote + * @summary Vote queries voted information based on proposalID, voterAddr. + * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} + */ + vote = (proposalId: string, voter: string, params: RequestParams = {}) => + this.http.request< + { + vote?: { + proposal_id?: string + voter?: string + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + options?: { + option?: + | 'VOTE_OPTION_UNSPECIFIED' + | 'VOTE_OPTION_YES' + | 'VOTE_OPTION_ABSTAIN' + | 'VOTE_OPTION_NO' + | 'VOTE_OPTION_NO_WITH_VETO' + weight?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SlashingParams + * @summary Params queries the parameters of slashing module + * @request GET:/cosmos/slashing/v1beta1/params + */ + slashingParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + signed_blocks_window?: string + min_signed_per_window?: string + downtime_jail_duration?: string + slash_fraction_double_sign?: string + slash_fraction_downtime?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SigningInfos + * @summary SigningInfos queries signing info of all validators + * @request GET:/cosmos/slashing/v1beta1/signing_infos + */ + signingInfos = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name SigningInfo + * @summary SigningInfo queries the signing info of given cons address + * @request GET:/cosmos/slashing/v1beta1/signing_infos/{cons_address} + */ + signingInfo = (consAddress: string, params: RequestParams = {}) => + this.http.request< + { + val_signing_info?: { + address?: string + start_height?: string + index_offset?: string + jailed_until?: string + tombstoned?: boolean + missed_blocks_counter?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DelegatorDelegations + * @summary DelegatorDelegations queries all delegations of a given delegator address. + * @request GET:/cosmos/staking/v1beta1/delegations/{delegator_addr} + */ + delegatorDelegations = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Redelegations + * @summary Redelegations queries redelegations of given address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations + */ + redelegations = ( + delegatorAddr: string, + query?: { + src_validator_addr?: string + dst_validator_addr?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + redelegation_responses?: { + redelegation?: { + delegator_address?: string + validator_src_address?: string + validator_dst_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + }[] + } + entries?: { + redelegation_entry?: { + creation_height?: string + completion_time?: string + initial_balance?: string + shares_dst?: string + } + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorUnbondingDelegations + * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given +delegator address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations + */ + delegatorUnbondingDelegations = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorValidators + * @summary DelegatorValidators queries all validators info for given delegator +address. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators + */ + delegatorValidators = ( + delegatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name DelegatorValidator + * @summary DelegatorValidator queries validator info for given delegator validator +pair. + * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} + */ + delegatorValidator = ( + delegatorAddr: string, + validatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name HistoricalInfo + * @summary HistoricalInfo queries the historical info for given height. + * @request GET:/cosmos/staking/v1beta1/historical_info/{height} + */ + historicalInfo = (height: string, params: RequestParams = {}) => + this.http.request< + { + hist?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + valset?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/historical_info/${height}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name StakingParams + * @summary Parameters queries the staking parameters. + * @request GET:/cosmos/staking/v1beta1/params + */ + stakingParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + unbonding_time?: string + max_validators?: number + max_entries?: number + historical_entries?: number + bond_denom?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Pool + * @summary Pool queries the pool info. + * @request GET:/cosmos/staking/v1beta1/pool + */ + pool = (params: RequestParams = {}) => + this.http.request< + { pool?: { not_bonded_tokens?: string; bonded_tokens?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/pool`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Validators + * @summary Validators queries all validators that match the given status. + * @request GET:/cosmos/staking/v1beta1/validators + */ + validators = ( + query?: { + status?: string + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + validators?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Validator + * @summary Validator queries validator info for given validator address. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr} + */ + validator = (validatorAddr: string, params: RequestParams = {}) => + this.http.request< + { + validator?: { + operator_address?: string + consensus_pubkey?: { type_url?: string; value?: string } + jailed?: boolean + status?: + | 'BOND_STATUS_UNSPECIFIED' + | 'BOND_STATUS_UNBONDED' + | 'BOND_STATUS_UNBONDING' + | 'BOND_STATUS_BONDED' + tokens?: string + delegator_shares?: string + description?: { + moniker?: string + identity?: string + website?: string + security_contact?: string + details?: string + } + unbonding_height?: string + unbonding_time?: string + commission?: { + commission_rates?: { + rate?: string + max_rate?: string + max_change_rate?: string + } + update_time?: string + } + min_self_delegation?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorDelegations + * @summary ValidatorDelegations queries delegate info for given validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations + */ + validatorDelegations = ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_responses?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Delegation + * @summary Delegation queries delegate info for given validator delegator pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} + */ + delegation = ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + delegation_response?: { + delegation?: { + delegator_address?: string + validator_address?: string + shares?: string + } + balance?: { denom?: string; amount?: string } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name UnbondingDelegation + * @summary UnbondingDelegation queries unbonding info for given validator delegator +pair. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation + */ + unbondingDelegation = ( + validatorAddr: string, + delegatorAddr: string, + params: RequestParams = {}, + ) => + this.http.request< + { + unbond?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ValidatorUnbondingDelegations + * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. + * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations + */ + validatorUnbondingDelegations = ( + validatorAddr: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + unbonding_responses?: { + delegator_address?: string + validator_address?: string + entries?: { + creation_height?: string + completion_time?: string + initial_balance?: string + balance?: string + }[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name Simulate + * @summary Simulate simulates executing a transaction for estimating gas usage. + * @request POST:/cosmos/tx/v1beta1/simulate + */ + simulate = ( + body: CosmosTxV1Beta1SimulateRequest, + params: RequestParams = {}, + ) => + this.http.request< + { + gas_info?: { gas_wanted?: string; gas_used?: string } + result?: { + data?: string + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/simulate`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetTxsEvent + * @summary GetTxsEvent fetches txs by event. + * @request GET:/cosmos/tx/v1beta1/txs + */ + getTxsEvent = ( + query?: { + events?: string[] + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + order_by?: 'ORDER_BY_UNSPECIFIED' | 'ORDER_BY_ASC' | 'ORDER_BY_DESC' + }, + params: RequestParams = {}, + ) => + this.http.request< + CosmosTxV1Beta1GetTxsEventResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name BroadcastTx + * @summary BroadcastTx broadcast transaction. + * @request POST:/cosmos/tx/v1beta1/txs + */ + broadcastTx = ( + body: { + tx_bytes?: string + mode?: + | 'BROADCAST_MODE_UNSPECIFIED' + | 'BROADCAST_MODE_BLOCK' + | 'BROADCAST_MODE_SYNC' + | 'BROADCAST_MODE_ASYNC' + }, + params: RequestParams = {}, + ) => + this.http.request< + { + tx_response?: { + height?: string + txhash?: string + codespace?: string + code?: number + data?: string + raw_log?: string + logs?: { + msg_index?: number + log?: string + events?: { + type?: string + attributes?: { key?: string; value?: string }[] + }[] + }[] + info?: string + gas_wanted?: string + gas_used?: string + tx?: { type_url?: string; value?: string } + timestamp?: string + events?: { + type?: string + attributes?: { key?: string; value?: string; index?: boolean }[] + }[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs`, + method: 'POST', + body: body, + type: ContentType.Json, + ...params, + }) + /** + * @description Since: cosmos-sdk 0.45.2 + * + * @tags Service + * @name GetBlockWithTxs + * @summary GetBlockWithTxs fetches a block with decoded txs. + * @request GET:/cosmos/tx/v1beta1/txs/block/{height} + */ + getBlockWithTxs = ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + CosmosTxV1Beta1GetBlockWithTxsResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/block/${height}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetTx + * @summary GetTx fetches a tx by hash. + * @request GET:/cosmos/tx/v1beta1/txs/{hash} + */ + getTx = (hash: string, params: RequestParams = {}) => + this.http.request< + CosmosTxV1Beta1GetTxResponse, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/tx/v1beta1/txs/${hash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetLatestBlock + * @summary GetLatestBlock returns the latest block. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/latest + */ + getLatestBlock = (params: RequestParams = {}) => + this.http.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetBlockByHeight + * @summary GetBlockByHeight queries block for given height. + * @request GET:/cosmos/base/tendermint/v1beta1/blocks/{height} + */ + getBlockByHeight = (height: string, params: RequestParams = {}) => + this.http.request< + { + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + block?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + data?: { txs?: string[] } + evidence?: { + evidence?: { + duplicate_vote_evidence?: { + vote_a?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + vote_b?: { + type?: + | 'SIGNED_MSG_TYPE_UNKNOWN' + | 'SIGNED_MSG_TYPE_PREVOTE' + | 'SIGNED_MSG_TYPE_PRECOMMIT' + | 'SIGNED_MSG_TYPE_PROPOSAL' + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + timestamp?: string + validator_address?: string + validator_index?: number + signature?: string + } + total_voting_power?: string + validator_power?: string + timestamp?: string + } + light_client_attack_evidence?: { + conflicting_block?: { + signed_header?: { + header?: { + version?: { block?: string; app?: string } + chain_id?: string + height?: string + time?: string + last_block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + last_commit_hash?: string + data_hash?: string + validators_hash?: string + next_validators_hash?: string + consensus_hash?: string + app_hash?: string + last_results_hash?: string + evidence_hash?: string + proposer_address?: string + } + commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + validator_set?: { + validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + proposer?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + } + total_voting_power?: string + } + } + common_height?: string + byzantine_validators?: { + address?: string + pub_key?: { ed25519?: string; secp256k1?: string } + voting_power?: string + proposer_priority?: string + }[] + total_voting_power?: string + timestamp?: string + } + }[] + } + last_commit?: { + height?: string + round?: number + block_id?: { + hash?: string + part_set_header?: { total?: number; hash?: string } + } + signatures?: { + block_id_flag?: + | 'BLOCK_ID_FLAG_UNKNOWN' + | 'BLOCK_ID_FLAG_ABSENT' + | 'BLOCK_ID_FLAG_COMMIT' + | 'BLOCK_ID_FLAG_NIL' + validator_address?: string + timestamp?: string + signature?: string + }[] + } + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetNodeInfo + * @summary GetNodeInfo queries the current node info. + * @request GET:/cosmos/base/tendermint/v1beta1/node_info + */ + getNodeInfo = (params: RequestParams = {}) => + this.http.request< + { + default_node_info?: { + protocol_version?: { p2p?: string; block?: string; app?: string } + default_node_id?: string + listen_addr?: string + network?: string + version?: string + channels?: string + moniker?: string + other?: { tx_index?: string; rpc_address?: string } + } + application_version?: { + name?: string + app_name?: string + version?: string + git_commit?: string + build_tags?: string + go_version?: string + build_deps?: { path?: string; version?: string; sum?: string }[] + cosmos_sdk_version?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/node_info`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetSyncing + * @summary GetSyncing queries node syncing. + * @request GET:/cosmos/base/tendermint/v1beta1/syncing + */ + getSyncing = (params: RequestParams = {}) => + this.http.request< + { syncing?: boolean }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/syncing`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetLatestValidatorSet + * @summary GetLatestValidatorSet queries latest validator-set. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/latest + */ + getLatestValidatorSet = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Service + * @name GetValidatorSetByHeight + * @summary GetValidatorSetByHeight queries validator-set at a given height. + * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/{height} + */ + getValidatorSetByHeight = ( + height: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + block_height?: string + validators?: { + address?: string + pub_key?: { type_url?: string; value?: string } + voting_power?: string + proposer_priority?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, + method: 'GET', + query: query, + ...params, + }) +} diff --git a/packages/provider/src/generated/Ethermint.ts b/packages/provider/src/generated/Ethermint.ts new file mode 100644 index 00000000..d514ed5d --- /dev/null +++ b/packages/provider/src/generated/Ethermint.ts @@ -0,0 +1,482 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Ethermint { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name Account + * @summary Account queries an Ethereum account. + * @request GET:/ethermint/evm/v1/account/{address} + */ + account = (address: string, params: RequestParams = {}) => + this.http.request< + { balance?: string; code_hash?: string; nonce?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/account/${address}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name Balance + * @summary Balance queries the balance of a the EVM denomination for a single +EthAccount. + * @request GET:/ethermint/evm/v1/balances/{address} + */ + balance = (address: string, params: RequestParams = {}) => + this.http.request< + { balance?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/balances/${address}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name BaseFee + * @summary BaseFee queries the base fee of the parent block of the current block, +it's similar to feemarket module's method, but also checks london hardfork status. + * @request GET:/ethermint/evm/v1/base_fee + */ + baseFee = (params: RequestParams = {}) => + this.http.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/base_fee`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Code + * @summary Code queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/codes/{address} + */ + code = (address: string, params: RequestParams = {}) => + this.http.request< + { code?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/codes/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CosmosAccount + * @summary CosmosAccount queries an Ethereum account's Cosmos Address. + * @request GET:/ethermint/evm/v1/cosmos_account/{address} + */ + cosmosAccount = (address: string, params: RequestParams = {}) => + this.http.request< + { cosmos_address?: string; sequence?: string; account_number?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/cosmos_account/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name EstimateGas + * @summary EstimateGas implements the `eth_estimateGas` rpc api + * @request GET:/ethermint/evm/v1/estimate_gas + */ + estimateGas = ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/estimate_gas`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EthCall + * @summary EthCall implements the `eth_call` rpc api + * @request GET:/ethermint/evm/v1/eth_call + */ + ethCall = ( + query?: { args?: string; gas_cap?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { + hash?: string + logs?: { + address?: string + topics?: string[] + data?: string + block_number?: string + tx_hash?: string + tx_index?: string + block_hash?: string + index?: string + removed?: boolean + }[] + ret?: string + vm_error?: string + gas_used?: string + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/eth_call`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EvmParams + * @summary Params queries the parameters of x/evm module. + * @request GET:/ethermint/evm/v1/params + */ + evmParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + evm_denom?: string + enable_create?: boolean + enable_call?: boolean + extra_eips?: string[] + chain_config?: { + homestead_block?: string + dao_fork_block?: string + dao_fork_support?: boolean + eip150_block?: string + eip150_hash?: string + eip155_block?: string + eip158_block?: string + byzantium_block?: string + constantinople_block?: string + petersburg_block?: string + istanbul_block?: string + muir_glacier_block?: string + berlin_block?: string + london_block?: string + arrow_glacier_block?: string + merge_fork_block?: string + } + allow_unprotected_txs?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Storage + * @summary Storage queries the balance of all coins for a single account. + * @request GET:/ethermint/evm/v1/storage/{address}/{key} + */ + storage = (address: string, key: string, params: RequestParams = {}) => + this.http.request< + { value?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/storage/${address}/${key}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TraceBlock + * @summary TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + * @request GET:/ethermint/evm/v1/trace_block + */ + traceBlock = ( + query?: { + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.http.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_block`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TraceTx + * @summary TraceTx implements the `debug_traceTransaction` rpc api + * @request GET:/ethermint/evm/v1/trace_tx + */ + traceTx = ( + query?: { + 'msg.data.type_url'?: string + 'msg.data.value'?: string + 'msg.size'?: number + 'msg.hash'?: string + 'msg.from'?: string + 'trace_config.tracer'?: string + 'trace_config.timeout'?: string + 'trace_config.reexec'?: string + 'trace_config.disable_stack'?: boolean + 'trace_config.disable_storage'?: boolean + 'trace_config.debug'?: boolean + 'trace_config.limit'?: number + 'trace_config.overrides.homestead_block'?: string + 'trace_config.overrides.dao_fork_block'?: string + 'trace_config.overrides.dao_fork_support'?: boolean + 'trace_config.overrides.eip150_block'?: string + 'trace_config.overrides.eip150_hash'?: string + 'trace_config.overrides.eip155_block'?: string + 'trace_config.overrides.eip158_block'?: string + 'trace_config.overrides.byzantium_block'?: string + 'trace_config.overrides.constantinople_block'?: string + 'trace_config.overrides.petersburg_block'?: string + 'trace_config.overrides.istanbul_block'?: string + 'trace_config.overrides.muir_glacier_block'?: string + 'trace_config.overrides.berlin_block'?: string + 'trace_config.overrides.london_block'?: string + 'trace_config.overrides.arrow_glacier_block'?: string + 'trace_config.overrides.merge_fork_block'?: string + 'trace_config.enable_memory'?: boolean + 'trace_config.enable_return_data'?: boolean + block_number?: string + block_hash?: string + block_time?: string + }, + params: RequestParams = {}, + ) => + this.http.request< + { data?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/trace_tx`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name ValidatorAccount + * @summary ValidatorAccount queries an Ethereum account's from a validator consensus +Address. + * @request GET:/ethermint/evm/v1/validator_account/{cons_address} + */ + validatorAccount = (consAddress: string, params: RequestParams = {}) => + this.http.request< + { account_address?: string; sequence?: string; account_number?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/evm/v1/validator_account/${consAddress}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name FeeMarketBaseFee + * @summary BaseFee queries the base fee of the parent block of the current block. + * @request GET:/ethermint/feemarket/v1/base_fee + */ + feeMarketBaseFee = (params: RequestParams = {}) => + this.http.request< + { base_fee?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/base_fee`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name BlockGas + * @summary BlockGas queries the gas used at a given block height + * @request GET:/ethermint/feemarket/v1/block_gas + */ + blockGas = (params: RequestParams = {}) => + this.http.request< + { gas?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/block_gas`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name FeeMarketParams + * @summary Params queries the parameters of x/feemarket module. + * @request GET:/ethermint/feemarket/v1/params + */ + feeMarketParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + no_base_fee?: boolean + base_fee_change_denominator?: number + elasticity_multiplier?: number + enable_height?: string + base_fee?: string + min_gas_price?: string + min_gas_multiplier?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ethermint/feemarket/v1/params`, + method: 'GET', + ...params, + }) +} diff --git a/packages/provider/src/generated/Evmos.ts b/packages/provider/src/generated/Evmos.ts new file mode 100644 index 00000000..55c15b7f --- /dev/null +++ b/packages/provider/src/generated/Evmos.ts @@ -0,0 +1,736 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Evmos { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name ClaimsRecords + * @summary ClaimsRecords returns all claims records + * @request GET:/evmos/claims/v1/claims_records + */ + claimsRecords = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + claims?: { + address?: string + initial_claimable_amount?: string + actions_completed?: boolean[] + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClaimsRecord + * @summary ClaimsRecord returns the claims record for a given address + * @request GET:/evmos/claims/v1/claims_records/{address} + */ + claimsRecord = (address: string, params: RequestParams = {}) => + this.http.request< + { + initial_claimable_amount?: string + claims?: { + action?: + | 'ACTION_UNSPECIFIED' + | 'ACTION_VOTE' + | 'ACTION_DELEGATE' + | 'ACTION_EVM' + | 'ACTION_IBC_TRANSFER' + completed?: boolean + claimable_amount?: string + }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/claims_records/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClaimsParams + * @summary Params returns the claims module parameters + * @request GET:/evmos/claims/v1/params + */ + claimsParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + enable_claims?: boolean + airdrop_start_time?: string + duration_until_decay?: string + duration_of_decay?: string + claims_denom?: string + authorized_channels?: string[] + evm_channels?: string[] + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TotalUnclaimed + * @summary TotalUnclaimed queries the total unclaimed tokens from the airdrop + * @request GET:/evmos/claims/v1/total_unclaimed + */ + totalUnclaimed = (params: RequestParams = {}) => + this.http.request< + { coins?: { denom?: string; amount?: string }[] }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/claims/v1/total_unclaimed`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name CurrentEpoch + * @summary CurrentEpoch provide current epoch of specified identifier + * @request GET:/evmos/epochs/v1/current_epoch + */ + currentEpoch = ( + query?: { identifier?: string }, + params: RequestParams = {}, + ) => + this.http.request< + { current_epoch?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/current_epoch`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name EpochInfos + * @summary EpochInfos provide running epochInfos + * @request GET:/evmos/epochs/v1/epochs + */ + epochInfos = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + epochs?: { + identifier?: string + start_time?: string + duration?: string + current_epoch?: string + current_epoch_start_time?: string + epoch_counting_started?: boolean + current_epoch_start_height?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/epochs/v1/epochs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Erc20Params + * @summary Params retrieves the erc20 module params + * @request GET:/evmos/erc20/v1/params + */ + erc20Params = (params: RequestParams = {}) => + this.http.request< + { params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TokenPairs + * @summary TokenPairs retrieves registered token pairs + * @request GET:/evmos/erc20/v1/token_pairs + */ + tokenPairs = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + token_pairs?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name TokenPair + * @summary TokenPair retrieves a registered token pair + * @request GET:/evmos/erc20/v1/token_pairs/{token} + */ + tokenPair = (token: string, params: RequestParams = {}) => + this.http.request< + { + token_pair?: { + erc20_address?: string + denom?: string + enabled?: boolean + contract_owner?: + | 'OWNER_UNSPECIFIED' + | 'OWNER_MODULE' + | 'OWNER_EXTERNAL' + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/erc20/v1/token_pairs/${token}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name AllocationMeters + * @summary AllocationMeters retrieves active allocation meters for a given +denomination + * @request GET:/evmos/incentives/v1/allocation_meters + */ + allocationMeters = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + allocation_meters?: { denom?: string; amount?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name AllocationMeter + * @summary AllocationMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/allocation_meters/{denom} + */ + allocationMeter = (denom: string, params: RequestParams = {}) => + this.http.request< + { allocation_meter?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/allocation_meters/${denom}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name GasMeters + * @summary GasMeters retrieves active gas meters for a given contract + * @request GET:/evmos/incentives/v1/gas_meters/{contract} + */ + gasMeters = ( + contract: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + gas_meters?: { + contract?: string + participant?: string + cumulative_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name GasMeter + * @summary GasMeter Retrieves a active gas meter + * @request GET:/evmos/incentives/v1/gas_meters/{contract}/{participant} + */ + gasMeter = ( + contract: string, + participant: string, + params: RequestParams = {}, + ) => + this.http.request< + { gas_meter?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/gas_meters/${contract}/${participant}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Incentives + * @summary Incentives retrieves registered incentives + * @request GET:/evmos/incentives/v1/incentives + */ + incentives = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + incentives?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Incentive + * @summary Incentive retrieves a registered incentive + * @request GET:/evmos/incentives/v1/incentives/{contract} + */ + incentive = (contract: string, params: RequestParams = {}) => + this.http.request< + { + incentive?: { + contract?: string + allocations?: { denom?: string; amount?: string }[] + epochs?: number + start_time?: string + total_gas?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/incentives/${contract}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name IncentivesParams + * @summary Params retrieves the incentives module params + * @request GET:/evmos/incentives/v1/params + */ + incentivesParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + enable_incentives?: boolean + allocation_limit?: string + incentives_epoch_identifier?: string + reward_scaler?: string + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/incentives/v1/params`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name CirculatingSupply + * @summary CirculatingSupply retrieves the total number of tokens that are in +circulation (i.e. excluding unvested tokens). + * @request GET:/evmos/inflation/v1/circulating_supply + */ + circulatingSupply = (params: RequestParams = {}) => + this.http.request< + { circulating_supply?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/circulating_supply`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name EpochMintProvision + * @summary EpochMintProvision retrieves current minting epoch provision value. + * @request GET:/evmos/inflation/v1/epoch_mint_provision + */ + epochMintProvision = (params: RequestParams = {}) => + this.http.request< + { epoch_mint_provision?: { denom?: string; amount?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/epoch_mint_provision`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name InflationRate + * @summary InflationRate retrieves the inflation rate of the current period. + * @request GET:/evmos/inflation/v1/inflation_rate + */ + inflationRate = (params: RequestParams = {}) => + this.http.request< + { inflation_rate?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/inflation_rate`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name InflationParams + * @summary Params retrieves the total set of minting parameters. + * @request GET:/evmos/inflation/v1/params + */ + inflationParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { + mint_denom?: string + exponential_calculation?: { + a?: string + r?: string + c?: string + bonding_target?: string + max_variance?: string + } + inflation_distribution?: { + staking_rewards?: string + usage_incentives?: string + community_pool?: string + } + enable_inflation?: boolean + } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Period + * @summary Period retrieves current period. + * @request GET:/evmos/inflation/v1/period + */ + period = (params: RequestParams = {}) => + this.http.request< + { period?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/period`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name SkippedEpochs + * @summary SkippedEpochs retrieves the total number of skipped epochs. + * @request GET:/evmos/inflation/v1/skipped_epochs + */ + skippedEpochs = (params: RequestParams = {}) => + this.http.request< + { skipped_epochs?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/inflation/v1/skipped_epochs`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Balances + * @summary Retrieves the unvested, vested and locked tokens for a vesting account + * @request GET:/evmos/vesting/v1/balances/{address} + */ + balances = (address: string, params: RequestParams = {}) => + this.http.request< + { + locked?: { denom?: string; amount?: string }[] + unvested?: { denom?: string; amount?: string }[] + vested?: { denom?: string; amount?: string }[] + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/vesting/v1/balances/${address}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name RecoveryParams + * @summary Params retrieves the total set of recovery parameters. + * @request GET:/evmos/recovery/v1/params + */ + recoveryParams = (params: RequestParams = {}) => + this.http.request< + { + params?: { enable_recovery?: boolean; packet_timeout_duration?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/evmos/recovery/v1/params`, + method: 'GET', + ...params, + }) +} diff --git a/packages/provider/src/generated/Ibc.ts b/packages/provider/src/generated/Ibc.ts new file mode 100644 index 00000000..f78faaca --- /dev/null +++ b/packages/provider/src/generated/Ibc.ts @@ -0,0 +1,1005 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from './http-client' + +export class Ibc { + http: HttpClient + + constructor(http: HttpClient) { + this.http = http + } + + /** + * No description + * + * @tags Query + * @name DenomHash + * @summary DenomHash queries a denomination hash information. + * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} + */ + denomHash = (trace: string, params: RequestParams = {}) => + this.http.request< + { hash?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomTraces + * @summary DenomTraces queries all denomination traces. + * @request GET:/ibc/apps/transfer/v1/denom_traces + */ + denomTraces = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + denom_traces?: { path?: string; base_denom?: string }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name DenomTrace + * @summary DenomTrace queries a denomination trace information. + * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} + */ + denomTrace = (hash: string, params: RequestParams = {}) => + this.http.request< + { denom_trace?: { path?: string; base_denom?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name TransferParams + * @summary Params queries all parameters of the ibc-transfer module. + * @request GET:/ibc/apps/transfer/v1/params + */ + transferParams = (params: RequestParams = {}) => + this.http.request< + { params?: { send_enabled?: boolean; receive_enabled?: boolean } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/apps/transfer/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientParams + * @summary ClientParams queries all parameters of the ibc client. + * @request GET:/ibc/client/v1/params + */ + clientParams = (params: RequestParams = {}) => + this.http.request< + { params?: { allowed_clients?: string[] } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/client/v1/params`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientStates + * @summary ClientStates queries all the IBC light clients of a chain. + * @request GET:/ibc/core/client/v1/client_states + */ + clientStates = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + client_states?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientState + * @summary ClientState queries an IBC light client. + * @request GET:/ibc/core/client/v1/client_states/{client_id} + */ + clientState = (clientId: string, params: RequestParams = {}) => + this.http.request< + { + client_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_states/${clientId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name ClientStatus + * @summary Status queries the status of an IBC client. + * @request GET:/ibc/core/client/v1/client_status/{client_id} + */ + clientStatus = (clientId: string, params: RequestParams = {}) => + this.http.request< + { status?: string }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/client_status/${clientId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConsensusStates + * @summary ConsensusStates queries all the consensus state associated with a given +client. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id} + */ + consensusStates = ( + clientId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_states?: { + height?: { revision_number?: string; revision_height?: string } + consensus_state?: { type_url?: string; value?: string } + }[] + pagination?: { next_key?: string; total?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name ConsensusState + * @summary ConsensusState queries a consensus state associated with a client state at +a given height. + * @request GET:/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height} + */ + consensusState = ( + clientId: string, + revisionNumber: string, + revisionHeight: string, + query?: { latest_height?: boolean }, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name UpgradedClientState + * @summary UpgradedClientState queries an Upgraded IBC light client. + * @request GET:/ibc/core/client/v1/upgraded_client_states + */ + upgradedClientState = (params: RequestParams = {}) => + this.http.request< + { upgraded_client_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_client_states`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name UpgradedConsensusState + * @summary UpgradedConsensusState queries an Upgraded IBC consensus state. + * @request GET:/ibc/core/client/v1/upgraded_consensus_states + */ + upgradedConsensusState = (params: RequestParams = {}) => + this.http.request< + { upgraded_consensus_state?: { type_url?: string; value?: string } }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/client/v1/upgraded_consensus_states`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ClientConnections + * @summary ClientConnections queries the connection paths associated with a client +state. + * @request GET:/ibc/core/connection/v1/client_connections/{client_id} + */ + clientConnections = (clientId: string, params: RequestParams = {}) => + this.http.request< + { + connection_paths?: string[] + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/client_connections/${clientId}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Connections + * @summary Connections queries all the IBC connections of a chain. + * @request GET:/ibc/core/connection/v1/connections + */ + connections = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + connections?: { + id?: string + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Connection + * @summary Connection queries an IBC connection end. + * @request GET:/ibc/core/connection/v1/connections/{connection_id} + */ + connection = (connectionId: string, params: RequestParams = {}) => + this.http.request< + { + connection?: { + client_id?: string + versions?: { identifier?: string; features?: string[] }[] + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + counterparty?: { + client_id?: string + connection_id?: string + prefix?: { key_prefix?: string } + } + delay_period?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionClientState + * @summary ConnectionClientState queries the client state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/client_state + */ + connectionClientState = (connectionId: string, params: RequestParams = {}) => + this.http.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/client_state`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionConsensusState + * @summary ConnectionConsensusState queries the consensus state associated with the +connection. + * @request GET:/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + connectionConsensusState = ( + connectionId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/connection/v1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name Channels + * @summary Channels queries all the IBC channels of a chain. + * @request GET:/ibc/core/channel/v1/channels + */ + channels = ( + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name Channel + * @summary Channel queries an IBC Channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id} + */ + channel = (channelId: string, portId: string, params: RequestParams = {}) => + this.http.request< + { + channel?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ChannelClientState + * @summary ChannelClientState queries for the client state for the channel associated +with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state + */ + channelClientState = ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.http.request< + { + identified_client_state?: { + client_id?: string + client_state?: { type_url?: string; value?: string } + } + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ChannelConsensusState + * @summary ChannelConsensusState queries for the consensus state for the channel +associated with the provided channel identifiers. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height} + */ + channelConsensusState = ( + channelId: string, + portId: string, + revisionNumber: string, + revisionHeight: string, + params: RequestParams = {}, + ) => + this.http.request< + { + consensus_state?: { type_url?: string; value?: string } + client_id?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name NextSequenceReceive + * @summary NextSequenceReceive returns the next receive sequence for a given channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence + */ + nextSequenceReceive = ( + channelId: string, + portId: string, + params: RequestParams = {}, + ) => + this.http.request< + { + next_sequence_receive?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/next_sequence`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketAcknowledgements + * @summary PacketAcknowledgements returns all the packet acknowledgements associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements + */ + packetAcknowledgements = ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + packet_commitment_sequences?: string[] + }, + params: RequestParams = {}, + ) => + this.http.request< + { + acknowledgements?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, + method: 'GET', + query: query, + ...params, + }) + /** + * No description + * + * @tags Query + * @name PacketAcknowledgement + * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence} + */ + packetAcknowledgement = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + acknowledgement?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketCommitments + * @summary PacketCommitments returns all the packet commitments hashes associated +with a channel. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments + */ + packetCommitments = ( + channelId: string, + portId: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + commitments?: { + port_id?: string + channel_id?: string + sequence?: string + data?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments`, + method: 'GET', + query: query, + ...params, + }) /** + * No description + * + * @tags Query + * @name UnreceivedAcks + * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated +with a channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks + */ + unreceivedAcks = ( + channelId: string, + portId: string, + packetAckSequences: string[], + params: RequestParams = {}, + ) => + this.http.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name UnreceivedPackets + * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a +channel and sequences. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets + */ + unreceivedPackets = ( + channelId: string, + portId: string, + packetCommitmentSequences: string[], + params: RequestParams = {}, + ) => + this.http.request< + { + sequences?: string[] + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, + method: 'GET', + ...params, + }) + /** + * No description + * + * @tags Query + * @name PacketCommitment + * @summary PacketCommitment queries a stored packet commitment hash. + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence} + */ + packetCommitment = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + commitment?: string + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name PacketReceipt + * @summary PacketReceipt queries if a given packet sequence has been received on the +queried chain + * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence} + */ + packetReceipt = ( + channelId: string, + portId: string, + sequence: string, + params: RequestParams = {}, + ) => + this.http.request< + { + received?: boolean + proof?: string + proof_height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, + method: 'GET', + ...params, + }) /** + * No description + * + * @tags Query + * @name ConnectionChannels + * @summary ConnectionChannels queries all the channels associated with a connection +end. + * @request GET:/ibc/core/channel/v1/connections/{connection}/channels + */ + connectionChannels = ( + connection: string, + query?: { + 'pagination.key'?: string + 'pagination.offset'?: string + 'pagination.limit'?: string + 'pagination.count_total'?: boolean + 'pagination.reverse'?: boolean + }, + params: RequestParams = {}, + ) => + this.http.request< + { + channels?: { + state?: + | 'STATE_UNINITIALIZED_UNSPECIFIED' + | 'STATE_INIT' + | 'STATE_TRYOPEN' + | 'STATE_OPEN' + | 'STATE_CLOSED' + ordering?: + | 'ORDER_NONE_UNSPECIFIED' + | 'ORDER_UNORDERED' + | 'ORDER_ORDERED' + counterparty?: { port_id?: string; channel_id?: string } + connection_hops?: string[] + version?: string + port_id?: string + channel_id?: string + }[] + pagination?: { next_key?: string; total?: string } + height?: { revision_number?: string; revision_height?: string } + }, + { + error?: string + code?: number + message?: string + details?: { type_url?: string; value?: string }[] + } + >({ + path: `/ibc/core/channel/v1/connections/${connection}/channels`, + method: 'GET', + query: query, + ...params, + }) +} diff --git a/packages/provider/src/restApiExample.ts b/packages/provider/src/generated/data-contracts.ts similarity index 58% rename from packages/provider/src/restApiExample.ts rename to packages/provider/src/generated/data-contracts.ts index 1f6fe53e..10771de7 100644 --- a/packages/provider/src/restApiExample.ts +++ b/packages/provider/src/generated/data-contracts.ts @@ -7123,5231 +7123,3 @@ export interface TendermintP2PProtocolVersion { /** @format uint64 */ app?: string } - -export type QueryParamsType = Record -export type ResponseFormat = keyof Omit - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean - /** request path */ - path: string - /** content type of request body */ - type?: ContentType - /** query params */ - query?: QueryParamsType - /** format of response (i.e. response.json() -> format: "json") */ - format?: ResponseFormat - /** request body */ - body?: unknown - /** base url */ - baseUrl?: string - /** request cancellation token */ - cancelToken?: CancelToken -} - -export type RequestParams = Omit< - FullRequestParams, - 'body' | 'method' | 'query' | 'path' -> - -export interface ApiConfig { - baseUrl?: string - baseApiParams?: Omit - securityWorker?: ( - securityData: SecurityDataType | null, - ) => Promise | RequestParams | void - customFetch?: typeof fetch -} - -export interface HttpResponse - extends Response { - data: D - error: E -} - -type CancelToken = Symbol | string | number - -export enum ContentType { - Json = 'application/json', - FormData = 'multipart/form-data', - UrlEncoded = 'application/x-www-form-urlencoded', -} - -export class HttpClient { - public baseUrl: string = 'http://www.google.be' - private securityData: SecurityDataType | null = null - private securityWorker?: ApiConfig['securityWorker'] - private abortControllers = new Map() - private customFetch = (...fetchParams: Parameters) => - fetch(...fetchParams) - - private baseApiParams: RequestParams = { - credentials: 'same-origin', - headers: {}, - redirect: 'follow', - referrerPolicy: 'no-referrer', - } - - constructor(apiConfig: ApiConfig = {}) { - Object.assign(this, apiConfig) - } - - public setSecurityData = (data: SecurityDataType | null) => { - this.securityData = data - } - - private encodeQueryParam(key: string, value: any) { - const encodedKey = encodeURIComponent(key) - return `${encodedKey}=${encodeURIComponent( - typeof value === 'number' ? value : `${value}`, - )}` - } - - private addQueryParam(query: QueryParamsType, key: string) { - return this.encodeQueryParam(key, query[key]) - } - - private addArrayQueryParam(query: QueryParamsType, key: string) { - const value = query[key] - return value.map((v: any) => this.encodeQueryParam(key, v)).join('&') - } - - protected toQueryString(rawQuery?: QueryParamsType): string { - const query = rawQuery || {} - const keys = Object.keys(query).filter( - (key) => 'undefined' !== typeof query[key], - ) - return keys - .map((key) => - Array.isArray(query[key]) - ? this.addArrayQueryParam(query, key) - : this.addQueryParam(query, key), - ) - .join('&') - } - - protected addQueryParams(rawQuery?: QueryParamsType): string { - const queryString = this.toQueryString(rawQuery) - return queryString ? `?${queryString}` : '' - } - - private contentFormatters: Record any> = { - [ContentType.Json]: (input: any) => - input !== null && (typeof input === 'object' || typeof input === 'string') - ? JSON.stringify(input) - : input, - [ContentType.FormData]: (input: any) => - Object.keys(input || {}).reduce((formData, key) => { - const property = input[key] - formData.append( - key, - property instanceof Blob - ? property - : typeof property === 'object' && property !== null - ? JSON.stringify(property) - : `${property}`, - ) - return formData - }, new FormData()), - [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), - } - - private mergeRequestParams( - params1: RequestParams, - params2?: RequestParams, - ): RequestParams { - return { - ...this.baseApiParams, - ...params1, - ...(params2 || {}), - headers: { - ...(this.baseApiParams.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - } - } - - private createAbortSignal = ( - cancelToken: CancelToken, - ): AbortSignal | undefined => { - if (this.abortControllers.has(cancelToken)) { - const abortController = this.abortControllers.get(cancelToken) - if (abortController) { - return abortController.signal - } - return void 0 - } - - const abortController = new AbortController() - this.abortControllers.set(cancelToken, abortController) - return abortController.signal - } - - public abortRequest = (cancelToken: CancelToken) => { - const abortController = this.abortControllers.get(cancelToken) - - if (abortController) { - abortController.abort() - this.abortControllers.delete(cancelToken) - } - } - - public request = async ({ - body, - secure, - path, - type, - query, - format, - baseUrl, - cancelToken, - ...params - }: FullRequestParams): Promise> => { - const secureParams = - ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) && - this.securityWorker && - (await this.securityWorker(this.securityData))) || - {} - const requestParams = this.mergeRequestParams(params, secureParams) - const queryString = query && this.toQueryString(query) - const payloadFormatter = this.contentFormatters[type || ContentType.Json] - const responseFormat = format || requestParams.format - - return this.customFetch( - `${baseUrl || this.baseUrl || ''}${path}${ - queryString ? `?${queryString}` : '' - }`, - { - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData - ? { 'Content-Type': type } - : {}), - ...(requestParams.headers || {}), - }, - signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, - body: - typeof body === 'undefined' || body === null - ? null - : payloadFormatter(body), - }, - ).then(async (response) => { - const r = response as HttpResponse - r.data = null as unknown as T - r.error = null as unknown as E - - const data = !responseFormat - ? r - : await response[responseFormat]() - .then((data) => { - if (r.ok) { - r.data = data - } else { - r.error = data - } - return r - }) - .catch((e) => { - r.error = e - return r - }) - - if (cancelToken) { - this.abortControllers.delete(cancelToken) - } - - if (!response.ok) throw data - return data - }) - } -} - -/** - * @title Evmos Chain - gRPC Gateway docs - * @version 1.0.0 - * @baseUrl http://www.google.be - * - * A REST interface for state queries and transactions - */ -export class Api< - SecurityDataType extends unknown, -> extends HttpClient { - evmos = { - /** - * No description - * - * @tags Query - * @name ClaimsRecords - * @summary ClaimsRecords returns all claims records - * @request GET:/evmos/claims/v1/claims_records - */ - claimsRecords: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - claims?: { - address?: string - initial_claimable_amount?: string - actions_completed?: boolean[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/claims/v1/claims_records`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClaimsRecord - * @summary ClaimsRecord returns the claims record for a given address - * @request GET:/evmos/claims/v1/claims_records/{address} - */ - claimsRecord: (address: string, params: RequestParams = {}) => - this.request< - { - initial_claimable_amount?: string - claims?: { - action?: - | 'ACTION_UNSPECIFIED' - | 'ACTION_VOTE' - | 'ACTION_DELEGATE' - | 'ACTION_EVM' - | 'ACTION_IBC_TRANSFER' - completed?: boolean - claimable_amount?: string - }[] - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/claims/v1/claims_records/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClaimsParams - * @summary Params returns the claims module parameters - * @request GET:/evmos/claims/v1/params - */ - claimsParams: (params: RequestParams = {}) => - this.request< - { - params?: { - enable_claims?: boolean - airdrop_start_time?: string - duration_until_decay?: string - duration_of_decay?: string - claims_denom?: string - authorized_channels?: string[] - evm_channels?: string[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/claims/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TotalUnclaimed - * @summary TotalUnclaimed queries the total unclaimed tokens from the airdrop - * @request GET:/evmos/claims/v1/total_unclaimed - */ - totalUnclaimed: (params: RequestParams = {}) => - this.request< - { coins?: { denom?: string; amount?: string }[] }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/claims/v1/total_unclaimed`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name CurrentEpoch - * @summary CurrentEpoch provide current epoch of specified identifier - * @request GET:/evmos/epochs/v1/current_epoch - */ - currentEpoch: ( - query?: { identifier?: string }, - params: RequestParams = {}, - ) => - this.request< - { current_epoch?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/epochs/v1/current_epoch`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name EpochInfos - * @summary EpochInfos provide running epochInfos - * @request GET:/evmos/epochs/v1/epochs - */ - epochInfos: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - epochs?: { - identifier?: string - start_time?: string - duration?: string - current_epoch?: string - current_epoch_start_time?: string - epoch_counting_started?: boolean - current_epoch_start_height?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/epochs/v1/epochs`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Erc20Params - * @summary Params retrieves the erc20 module params - * @request GET:/evmos/erc20/v1/params - */ - erc20Params: (params: RequestParams = {}) => - this.request< - { params?: { enable_erc20?: boolean; enable_evm_hook?: boolean } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/erc20/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TokenPairs - * @summary TokenPairs retrieves registered token pairs - * @request GET:/evmos/erc20/v1/token_pairs - */ - tokenPairs: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - token_pairs?: { - erc20_address?: string - denom?: string - enabled?: boolean - contract_owner?: - | 'OWNER_UNSPECIFIED' - | 'OWNER_MODULE' - | 'OWNER_EXTERNAL' - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/erc20/v1/token_pairs`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TokenPair - * @summary TokenPair retrieves a registered token pair - * @request GET:/evmos/erc20/v1/token_pairs/{token} - */ - tokenPair: (token: string, params: RequestParams = {}) => - this.request< - { - token_pair?: { - erc20_address?: string - denom?: string - enabled?: boolean - contract_owner?: - | 'OWNER_UNSPECIFIED' - | 'OWNER_MODULE' - | 'OWNER_EXTERNAL' - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/erc20/v1/token_pairs/${token}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AllocationMeters - * @summary AllocationMeters retrieves active allocation meters for a given -denomination - * @request GET:/evmos/incentives/v1/allocation_meters - */ - allocationMeters: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - allocation_meters?: { denom?: string; amount?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/allocation_meters`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AllocationMeter - * @summary AllocationMeter Retrieves a active gas meter - * @request GET:/evmos/incentives/v1/allocation_meters/{denom} - */ - allocationMeter: (denom: string, params: RequestParams = {}) => - this.request< - { allocation_meter?: { denom?: string; amount?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/allocation_meters/${denom}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name GasMeters - * @summary GasMeters retrieves active gas meters for a given contract - * @request GET:/evmos/incentives/v1/gas_meters/{contract} - */ - gasMeters: ( - contract: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - gas_meters?: { - contract?: string - participant?: string - cumulative_gas?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/gas_meters/${contract}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name GasMeter - * @summary GasMeter Retrieves a active gas meter - * @request GET:/evmos/incentives/v1/gas_meters/{contract}/{participant} - */ - gasMeter: ( - contract: string, - participant: string, - params: RequestParams = {}, - ) => - this.request< - { gas_meter?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/gas_meters/${contract}/${participant}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Incentives - * @summary Incentives retrieves registered incentives - * @request GET:/evmos/incentives/v1/incentives - */ - incentives: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - incentives?: { - contract?: string - allocations?: { denom?: string; amount?: string }[] - epochs?: number - start_time?: string - total_gas?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/incentives`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Incentive - * @summary Incentive retrieves a registered incentive - * @request GET:/evmos/incentives/v1/incentives/{contract} - */ - incentive: (contract: string, params: RequestParams = {}) => - this.request< - { - incentive?: { - contract?: string - allocations?: { denom?: string; amount?: string }[] - epochs?: number - start_time?: string - total_gas?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/incentives/${contract}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name IncentivesParams - * @summary Params retrieves the incentives module params - * @request GET:/evmos/incentives/v1/params - */ - incentivesParams: (params: RequestParams = {}) => - this.request< - { - params?: { - enable_incentives?: boolean - allocation_limit?: string - incentives_epoch_identifier?: string - reward_scaler?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/incentives/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name CirculatingSupply - * @summary CirculatingSupply retrieves the total number of tokens that are in -circulation (i.e. excluding unvested tokens). - * @request GET:/evmos/inflation/v1/circulating_supply - */ - circulatingSupply: (params: RequestParams = {}) => - this.request< - { circulating_supply?: { denom?: string; amount?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/circulating_supply`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name EpochMintProvision - * @summary EpochMintProvision retrieves current minting epoch provision value. - * @request GET:/evmos/inflation/v1/epoch_mint_provision - */ - epochMintProvision: (params: RequestParams = {}) => - this.request< - { epoch_mint_provision?: { denom?: string; amount?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/epoch_mint_provision`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name InflationRate - * @summary InflationRate retrieves the inflation rate of the current period. - * @request GET:/evmos/inflation/v1/inflation_rate - */ - inflationRate: (params: RequestParams = {}) => - this.request< - { inflation_rate?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/inflation_rate`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name InflationParams - * @summary Params retrieves the total set of minting parameters. - * @request GET:/evmos/inflation/v1/params - */ - inflationParams: (params: RequestParams = {}) => - this.request< - { - params?: { - mint_denom?: string - exponential_calculation?: { - a?: string - r?: string - c?: string - bonding_target?: string - max_variance?: string - } - inflation_distribution?: { - staking_rewards?: string - usage_incentives?: string - community_pool?: string - } - enable_inflation?: boolean - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Period - * @summary Period retrieves current period. - * @request GET:/evmos/inflation/v1/period - */ - period: (params: RequestParams = {}) => - this.request< - { period?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/period`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SkippedEpochs - * @summary SkippedEpochs retrieves the total number of skipped epochs. - * @request GET:/evmos/inflation/v1/skipped_epochs - */ - skippedEpochs: (params: RequestParams = {}) => - this.request< - { skipped_epochs?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/inflation/v1/skipped_epochs`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Balances - * @summary Retrieves the unvested, vested and locked tokens for a vesting account - * @request GET:/evmos/vesting/v1/balances/{address} - */ - balances: (address: string, params: RequestParams = {}) => - this.request< - { - locked?: { denom?: string; amount?: string }[] - unvested?: { denom?: string; amount?: string }[] - vested?: { denom?: string; amount?: string }[] - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/vesting/v1/balances/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name RecoveryParams - * @summary Params retrieves the total set of recovery parameters. - * @request GET:/evmos/recovery/v1/params - */ - recoveryParams: (params: RequestParams = {}) => - this.request< - { - params?: { - enable_recovery?: boolean - packet_timeout_duration?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/evmos/recovery/v1/params`, - method: 'GET', - ...params, - }), - } - ethermint = { - /** - * No description - * - * @tags Query - * @name Account - * @summary Account queries an Ethereum account. - * @request GET:/ethermint/evm/v1/account/{address} - */ - account: (address: string, params: RequestParams = {}) => - this.request< - { balance?: string; code_hash?: string; nonce?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/account/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Balance - * @summary Balance queries the balance of a the EVM denomination for a single -EthAccount. - * @request GET:/ethermint/evm/v1/balances/{address} - */ - balance: (address: string, params: RequestParams = {}) => - this.request< - { balance?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/balances/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name BaseFee - * @summary BaseFee queries the base fee of the parent block of the current block, -it's similar to feemarket module's method, but also checks london hardfork status. - * @request GET:/ethermint/evm/v1/base_fee - */ - baseFee: (params: RequestParams = {}) => - this.request< - { base_fee?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/base_fee`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Code - * @summary Code queries the balance of all coins for a single account. - * @request GET:/ethermint/evm/v1/codes/{address} - */ - code: (address: string, params: RequestParams = {}) => - this.request< - { code?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/codes/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name CosmosAccount - * @summary CosmosAccount queries an Ethereum account's Cosmos Address. - * @request GET:/ethermint/evm/v1/cosmos_account/{address} - */ - cosmosAccount: (address: string, params: RequestParams = {}) => - this.request< - { cosmos_address?: string; sequence?: string; account_number?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/cosmos_account/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name EstimateGas - * @summary EstimateGas implements the `eth_estimateGas` rpc api - * @request GET:/ethermint/evm/v1/estimate_gas - */ - estimateGas: ( - query?: { args?: string; gas_cap?: string }, - params: RequestParams = {}, - ) => - this.request< - { gas?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/estimate_gas`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name EthCall - * @summary EthCall implements the `eth_call` rpc api - * @request GET:/ethermint/evm/v1/eth_call - */ - ethCall: ( - query?: { args?: string; gas_cap?: string }, - params: RequestParams = {}, - ) => - this.request< - { - hash?: string - logs?: { - address?: string - topics?: string[] - data?: string - block_number?: string - tx_hash?: string - tx_index?: string - block_hash?: string - index?: string - removed?: boolean - }[] - ret?: string - vm_error?: string - gas_used?: string - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/eth_call`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name EvmParams - * @summary Params queries the parameters of x/evm module. - * @request GET:/ethermint/evm/v1/params - */ - evmParams: (params: RequestParams = {}) => - this.request< - { - params?: { - evm_denom?: string - enable_create?: boolean - enable_call?: boolean - extra_eips?: string[] - chain_config?: { - homestead_block?: string - dao_fork_block?: string - dao_fork_support?: boolean - eip150_block?: string - eip150_hash?: string - eip155_block?: string - eip158_block?: string - byzantium_block?: string - constantinople_block?: string - petersburg_block?: string - istanbul_block?: string - muir_glacier_block?: string - berlin_block?: string - london_block?: string - arrow_glacier_block?: string - merge_fork_block?: string - } - allow_unprotected_txs?: boolean - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Storage - * @summary Storage queries the balance of all coins for a single account. - * @request GET:/ethermint/evm/v1/storage/{address}/{key} - */ - storage: (address: string, key: string, params: RequestParams = {}) => - this.request< - { value?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/storage/${address}/${key}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TraceBlock - * @summary TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api - * @request GET:/ethermint/evm/v1/trace_block - */ - traceBlock: ( - query?: { - 'trace_config.tracer'?: string - 'trace_config.timeout'?: string - 'trace_config.reexec'?: string - 'trace_config.disable_stack'?: boolean - 'trace_config.disable_storage'?: boolean - 'trace_config.debug'?: boolean - 'trace_config.limit'?: number - 'trace_config.overrides.homestead_block'?: string - 'trace_config.overrides.dao_fork_block'?: string - 'trace_config.overrides.dao_fork_support'?: boolean - 'trace_config.overrides.eip150_block'?: string - 'trace_config.overrides.eip150_hash'?: string - 'trace_config.overrides.eip155_block'?: string - 'trace_config.overrides.eip158_block'?: string - 'trace_config.overrides.byzantium_block'?: string - 'trace_config.overrides.constantinople_block'?: string - 'trace_config.overrides.petersburg_block'?: string - 'trace_config.overrides.istanbul_block'?: string - 'trace_config.overrides.muir_glacier_block'?: string - 'trace_config.overrides.berlin_block'?: string - 'trace_config.overrides.london_block'?: string - 'trace_config.overrides.arrow_glacier_block'?: string - 'trace_config.overrides.merge_fork_block'?: string - 'trace_config.enable_memory'?: boolean - 'trace_config.enable_return_data'?: boolean - block_number?: string - block_hash?: string - block_time?: string - }, - params: RequestParams = {}, - ) => - this.request< - { data?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/trace_block`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TraceTx - * @summary TraceTx implements the `debug_traceTransaction` rpc api - * @request GET:/ethermint/evm/v1/trace_tx - */ - traceTx: ( - query?: { - 'msg.data.type_url'?: string - 'msg.data.value'?: string - 'msg.size'?: number - 'msg.hash'?: string - 'msg.from'?: string - 'trace_config.tracer'?: string - 'trace_config.timeout'?: string - 'trace_config.reexec'?: string - 'trace_config.disable_stack'?: boolean - 'trace_config.disable_storage'?: boolean - 'trace_config.debug'?: boolean - 'trace_config.limit'?: number - 'trace_config.overrides.homestead_block'?: string - 'trace_config.overrides.dao_fork_block'?: string - 'trace_config.overrides.dao_fork_support'?: boolean - 'trace_config.overrides.eip150_block'?: string - 'trace_config.overrides.eip150_hash'?: string - 'trace_config.overrides.eip155_block'?: string - 'trace_config.overrides.eip158_block'?: string - 'trace_config.overrides.byzantium_block'?: string - 'trace_config.overrides.constantinople_block'?: string - 'trace_config.overrides.petersburg_block'?: string - 'trace_config.overrides.istanbul_block'?: string - 'trace_config.overrides.muir_glacier_block'?: string - 'trace_config.overrides.berlin_block'?: string - 'trace_config.overrides.london_block'?: string - 'trace_config.overrides.arrow_glacier_block'?: string - 'trace_config.overrides.merge_fork_block'?: string - 'trace_config.enable_memory'?: boolean - 'trace_config.enable_return_data'?: boolean - block_number?: string - block_hash?: string - block_time?: string - }, - params: RequestParams = {}, - ) => - this.request< - { data?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/trace_tx`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorAccount - * @summary ValidatorAccount queries an Ethereum account's from a validator consensus -Address. - * @request GET:/ethermint/evm/v1/validator_account/{cons_address} - */ - validatorAccount: (consAddress: string, params: RequestParams = {}) => - this.request< - { - account_address?: string - sequence?: string - account_number?: string - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/evm/v1/validator_account/${consAddress}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name FeeMarketBaseFee - * @summary BaseFee queries the base fee of the parent block of the current block. - * @request GET:/ethermint/feemarket/v1/base_fee - */ - feeMarketBaseFee: (params: RequestParams = {}) => - this.request< - { base_fee?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/feemarket/v1/base_fee`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name BlockGas - * @summary BlockGas queries the gas used at a given block height - * @request GET:/ethermint/feemarket/v1/block_gas - */ - blockGas: (params: RequestParams = {}) => - this.request< - { gas?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/feemarket/v1/block_gas`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name FeeMarketParams - * @summary Params queries the parameters of x/feemarket module. - * @request GET:/ethermint/feemarket/v1/params - */ - feeMarketParams: (params: RequestParams = {}) => - this.request< - { - params?: { - no_base_fee?: boolean - base_fee_change_denominator?: number - elasticity_multiplier?: number - enable_height?: string - base_fee?: string - min_gas_price?: string - min_gas_multiplier?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ethermint/feemarket/v1/params`, - method: 'GET', - ...params, - }), - } - ibc = { - /** - * No description - * - * @tags Query - * @name DenomHash - * @summary DenomHash queries a denomination hash information. - * @request GET:/ibc/apps/transfer/v1/denom_hashes/{trace} - */ - denomHash: (trace: string, params: RequestParams = {}) => - this.request< - { hash?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/apps/transfer/v1/denom_hashes/${trace}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DenomTraces - * @summary DenomTraces queries all denomination traces. - * @request GET:/ibc/apps/transfer/v1/denom_traces - */ - denomTraces: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - denom_traces?: { path?: string; base_denom?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/apps/transfer/v1/denom_traces`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DenomTrace - * @summary DenomTrace queries a denomination trace information. - * @request GET:/ibc/apps/transfer/v1/denom_traces/{hash} - */ - denomTrace: (hash: string, params: RequestParams = {}) => - this.request< - { denom_trace?: { path?: string; base_denom?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/apps/transfer/v1/denom_traces/${hash}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TransferParams - * @summary Params queries all parameters of the ibc-transfer module. - * @request GET:/ibc/apps/transfer/v1/params - */ - transferParams: (params: RequestParams = {}) => - this.request< - { params?: { send_enabled?: boolean; receive_enabled?: boolean } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/apps/transfer/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClientParams - * @summary ClientParams queries all parameters of the ibc client. - * @request GET:/ibc/client/v1/params - */ - clientParams: (params: RequestParams = {}) => - this.request< - { params?: { allowed_clients?: string[] } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/client/v1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClientStates - * @summary ClientStates queries all the IBC light clients of a chain. - * @request GET:/ibc/core/client/v1/client_states - */ - clientStates: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - client_states?: { - client_id?: string - client_state?: { type_url?: string; value?: string } - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/client_states`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClientState - * @summary ClientState queries an IBC light client. - * @request GET:/ibc/core/client/v1/client_states/{client_id} - */ - clientState: (clientId: string, params: RequestParams = {}) => - this.request< - { - client_state?: { type_url?: string; value?: string } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/client_states/${clientId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClientStatus - * @summary Status queries the status of an IBC client. - * @request GET:/ibc/core/client/v1/client_status/{client_id} - */ - clientStatus: (clientId: string, params: RequestParams = {}) => - this.request< - { status?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/client_status/${clientId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ConsensusStates - * @summary ConsensusStates queries all the consensus state associated with a given -client. - * @request GET:/ibc/core/client/v1/consensus_states/{client_id} - */ - consensusStates: ( - clientId: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - consensus_states?: { - height?: { revision_number?: string; revision_height?: string } - consensus_state?: { type_url?: string; value?: string } - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/consensus_states/${clientId}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ConsensusState - * @summary ConsensusState queries a consensus state associated with a client state at -a given height. - * @request GET:/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height} - */ - consensusState: ( - clientId: string, - revisionNumber: string, - revisionHeight: string, - query?: { latest_height?: boolean }, - params: RequestParams = {}, - ) => - this.request< - { - consensus_state?: { type_url?: string; value?: string } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/consensus_states/${clientId}/revision/${revisionNumber}/height/${revisionHeight}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name UpgradedClientState - * @summary UpgradedClientState queries an Upgraded IBC light client. - * @request GET:/ibc/core/client/v1/upgraded_client_states - */ - upgradedClientState: (params: RequestParams = {}) => - this.request< - { upgraded_client_state?: { type_url?: string; value?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/upgraded_client_states`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name UpgradedConsensusState - * @summary UpgradedConsensusState queries an Upgraded IBC consensus state. - * @request GET:/ibc/core/client/v1/upgraded_consensus_states - */ - upgradedConsensusState: (params: RequestParams = {}) => - this.request< - { upgraded_consensus_state?: { type_url?: string; value?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/client/v1/upgraded_consensus_states`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ClientConnections - * @summary ClientConnections queries the connection paths associated with a client -state. - * @request GET:/ibc/core/connection/v1/client_connections/{client_id} - */ - clientConnections: (clientId: string, params: RequestParams = {}) => - this.request< - { - connection_paths?: string[] - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/connection/v1/client_connections/${clientId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Connections - * @summary Connections queries all the IBC connections of a chain. - * @request GET:/ibc/core/connection/v1/connections - */ - connections: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - connections?: { - id?: string - client_id?: string - versions?: { identifier?: string; features?: string[] }[] - state?: - | 'STATE_UNINITIALIZED_UNSPECIFIED' - | 'STATE_INIT' - | 'STATE_TRYOPEN' - | 'STATE_OPEN' - counterparty?: { - client_id?: string - connection_id?: string - prefix?: { key_prefix?: string } - } - delay_period?: string - }[] - pagination?: { next_key?: string; total?: string } - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/connection/v1/connections`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Connection - * @summary Connection queries an IBC connection end. - * @request GET:/ibc/core/connection/v1/connections/{connection_id} - */ - connection: (connectionId: string, params: RequestParams = {}) => - this.request< - { - connection?: { - client_id?: string - versions?: { identifier?: string; features?: string[] }[] - state?: - | 'STATE_UNINITIALIZED_UNSPECIFIED' - | 'STATE_INIT' - | 'STATE_TRYOPEN' - | 'STATE_OPEN' - counterparty?: { - client_id?: string - connection_id?: string - prefix?: { key_prefix?: string } - } - delay_period?: string - } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/connection/v1/connections/${connectionId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ConnectionClientState - * @summary ConnectionClientState queries the client state associated with the -connection. - * @request GET:/ibc/core/connection/v1/connections/{connection_id}/client_state - */ - connectionClientState: (connectionId: string, params: RequestParams = {}) => - this.request< - { - identified_client_state?: { - client_id?: string - client_state?: { type_url?: string; value?: string } - } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/connection/v1/connections/${connectionId}/client_state`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ConnectionConsensusState - * @summary ConnectionConsensusState queries the consensus state associated with the -connection. - * @request GET:/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height} - */ - connectionConsensusState: ( - connectionId: string, - revisionNumber: string, - revisionHeight: string, - params: RequestParams = {}, - ) => - this.request< - { - consensus_state?: { type_url?: string; value?: string } - client_id?: string - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/connection/v1/connections/${connectionId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Channels - * @summary Channels queries all the IBC channels of a chain. - * @request GET:/ibc/core/channel/v1/channels - */ - channels: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - channels?: { - state?: - | 'STATE_UNINITIALIZED_UNSPECIFIED' - | 'STATE_INIT' - | 'STATE_TRYOPEN' - | 'STATE_OPEN' - | 'STATE_CLOSED' - ordering?: - | 'ORDER_NONE_UNSPECIFIED' - | 'ORDER_UNORDERED' - | 'ORDER_ORDERED' - counterparty?: { port_id?: string; channel_id?: string } - connection_hops?: string[] - version?: string - port_id?: string - channel_id?: string - }[] - pagination?: { next_key?: string; total?: string } - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Channel - * @summary Channel queries an IBC Channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id} - */ - channel: (channelId: string, portId: string, params: RequestParams = {}) => - this.request< - { - channel?: { - state?: - | 'STATE_UNINITIALIZED_UNSPECIFIED' - | 'STATE_INIT' - | 'STATE_TRYOPEN' - | 'STATE_OPEN' - | 'STATE_CLOSED' - ordering?: - | 'ORDER_NONE_UNSPECIFIED' - | 'ORDER_UNORDERED' - | 'ORDER_ORDERED' - counterparty?: { port_id?: string; channel_id?: string } - connection_hops?: string[] - version?: string - } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ChannelClientState - * @summary ChannelClientState queries for the client state for the channel associated -with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state - */ - channelClientState: ( - channelId: string, - portId: string, - params: RequestParams = {}, - ) => - this.request< - { - identified_client_state?: { - client_id?: string - client_state?: { type_url?: string; value?: string } - } - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ChannelConsensusState - * @summary ChannelConsensusState queries for the consensus state for the channel -associated with the provided channel identifiers. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height} - */ - channelConsensusState: ( - channelId: string, - portId: string, - revisionNumber: string, - revisionHeight: string, - params: RequestParams = {}, - ) => - this.request< - { - consensus_state?: { type_url?: string; value?: string } - client_id?: string - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/consensus_state/revision/${revisionNumber}/height/${revisionHeight}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name NextSequenceReceive - * @summary NextSequenceReceive returns the next receive sequence for a given channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence - */ - nextSequenceReceive: ( - channelId: string, - portId: string, - params: RequestParams = {}, - ) => - this.request< - { - next_sequence_receive?: string - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/next_sequence`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name PacketAcknowledgements - * @summary PacketAcknowledgements returns all the packet acknowledgements associated -with a channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements - */ - packetAcknowledgements: ( - channelId: string, - portId: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - packet_commitment_sequences?: string[] - }, - params: RequestParams = {}, - ) => - this.request< - { - acknowledgements?: { - port_id?: string - channel_id?: string - sequence?: string - data?: string - }[] - pagination?: { next_key?: string; total?: string } - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acknowledgements`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name PacketAcknowledgement - * @summary PacketAcknowledgement queries a stored packet acknowledgement hash. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence} - */ - packetAcknowledgement: ( - channelId: string, - portId: string, - sequence: string, - params: RequestParams = {}, - ) => - this.request< - { - acknowledgement?: string - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_acks/${sequence}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name PacketCommitments - * @summary PacketCommitments returns all the packet commitments hashes associated -with a channel. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments - */ - packetCommitments: ( - channelId: string, - portId: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - commitments?: { - port_id?: string - channel_id?: string - sequence?: string - data?: string - }[] - pagination?: { next_key?: string; total?: string } - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name UnreceivedAcks - * @summary UnreceivedAcks returns all the unreceived IBC acknowledgements associated -with a channel and sequences. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks - */ - unreceivedAcks: ( - channelId: string, - portId: string, - packetAckSequences: string[], - params: RequestParams = {}, - ) => - this.request< - { - sequences?: string[] - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetAckSequences}/unreceived_acks`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name UnreceivedPackets - * @summary UnreceivedPackets returns all the unreceived IBC packets associated with a -channel and sequences. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets - */ - unreceivedPackets: ( - channelId: string, - portId: string, - packetCommitmentSequences: string[], - params: RequestParams = {}, - ) => - this.request< - { - sequences?: string[] - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${packetCommitmentSequences}/unreceived_packets`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name PacketCommitment - * @summary PacketCommitment queries a stored packet commitment hash. - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence} - */ - packetCommitment: ( - channelId: string, - portId: string, - sequence: string, - params: RequestParams = {}, - ) => - this.request< - { - commitment?: string - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_commitments/${sequence}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name PacketReceipt - * @summary PacketReceipt queries if a given packet sequence has been received on the -queried chain - * @request GET:/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence} - */ - packetReceipt: ( - channelId: string, - portId: string, - sequence: string, - params: RequestParams = {}, - ) => - this.request< - { - received?: boolean - proof?: string - proof_height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/packet_receipts/${sequence}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ConnectionChannels - * @summary ConnectionChannels queries all the channels associated with a connection -end. - * @request GET:/ibc/core/channel/v1/connections/{connection}/channels - */ - connectionChannels: ( - connection: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - channels?: { - state?: - | 'STATE_UNINITIALIZED_UNSPECIFIED' - | 'STATE_INIT' - | 'STATE_TRYOPEN' - | 'STATE_OPEN' - | 'STATE_CLOSED' - ordering?: - | 'ORDER_NONE_UNSPECIFIED' - | 'ORDER_UNORDERED' - | 'ORDER_ORDERED' - counterparty?: { port_id?: string; channel_id?: string } - connection_hops?: string[] - version?: string - port_id?: string - channel_id?: string - }[] - pagination?: { next_key?: string; total?: string } - height?: { revision_number?: string; revision_height?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/ibc/core/channel/v1/connections/${connection}/channels`, - method: 'GET', - query: query, - ...params, - }), - } - cosmos = { - /** - * @description Since: cosmos-sdk 0.43 - * - * @tags Query - * @name Accounts - * @summary Accounts returns all the existing accounts - * @request GET:/cosmos/auth/v1beta1/accounts - */ - accounts: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - accounts?: { type_url?: string; value?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/auth/v1beta1/accounts`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AuthAccount - * @summary Account returns account details based on address. - * @request GET:/cosmos/auth/v1beta1/accounts/{address} - */ - authAccount: (address: string, params: RequestParams = {}) => - this.request< - { account?: { type_url?: string; value?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/auth/v1beta1/accounts/${address}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AuthParams - * @summary Params queries all parameters. - * @request GET:/cosmos/auth/v1beta1/params - */ - authParams: (params: RequestParams = {}) => - this.request< - { - params?: { - max_memo_characters?: string - tx_sig_limit?: string - tx_size_cost_per_byte?: string - sig_verify_cost_ed25519?: string - sig_verify_cost_secp256k1?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/auth/v1beta1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Grants - * @summary Returns list of `Authorization`, granted to the grantee by the granter. - * @request GET:/cosmos/authz/v1beta1/grants - */ - grants: ( - query?: { - granter?: string - grantee?: string - msg_type_url?: string - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - grants?: { - authorization?: { type_url?: string; value?: string } - expiration?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/authz/v1beta1/grants`, - method: 'GET', - query: query, - ...params, - }), - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name GranteeGrants - * @summary GranteeGrants returns a list of `GrantAuthorization` by grantee. - * @request GET:/cosmos/authz/v1beta1/grants/grantee/{grantee} - */ - granteeGrants: ( - grantee: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - grants?: { - granter?: string - grantee?: string - authorization?: { type_url?: string; value?: string } - expiration?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/authz/v1beta1/grants/grantee/${grantee}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Query - * @name GranterGrants - * @summary GranterGrants returns list of `GrantAuthorization`, granted by granter. - * @request GET:/cosmos/authz/v1beta1/grants/granter/{granter} - */ - granterGrants: ( - granter: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - grants?: { - granter?: string - grantee?: string - authorization?: { type_url?: string; value?: string } - expiration?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/authz/v1beta1/grants/granter/${granter}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AllBalances - * @summary AllBalances queries the balance of all coins for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address} - */ - allBalances: ( - address: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - balances?: { denom?: string; amount?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/balances/${address}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name BankBalance - * @summary Balance queries the balance of a single coin for a single account. - * @request GET:/cosmos/bank/v1beta1/balances/{address}/by_denom - */ - bankBalance: ( - address: string, - query?: { denom?: string }, - params: RequestParams = {}, - ) => - this.request< - { balance?: { denom?: string; amount?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/balances/${address}/by_denom`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DenomsMetadata - * @summary DenomsMetadata queries the client metadata for all registered coin denominations. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata - */ - denomsMetadata: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - metadatas?: { - description?: string - denom_units?: { - denom?: string - exponent?: number - aliases?: string[] - }[] - base?: string - display?: string - name?: string - symbol?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/denoms_metadata`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DenomMetadata - * @summary DenomsMetadata queries the client metadata of a given coin denomination. - * @request GET:/cosmos/bank/v1beta1/denoms_metadata/{denom} - */ - denomMetadata: (denom: string, params: RequestParams = {}) => - this.request< - { - metadata?: { - description?: string - denom_units?: { - denom?: string - exponent?: number - aliases?: string[] - }[] - base?: string - display?: string - name?: string - symbol?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/denoms_metadata/${denom}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name BankParams - * @summary Params queries the parameters of x/bank module. - * @request GET:/cosmos/bank/v1beta1/params - */ - bankParams: (params: RequestParams = {}) => - this.request< - { - params?: { - send_enabled?: { denom?: string; enabled?: boolean }[] - default_send_enabled?: boolean - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SpendableBalances - * @summary SpendableBalances queries the spenable balance of all coins for a single -account. - * @request GET:/cosmos/bank/v1beta1/spendable_balances/{address} - */ - spendableBalances: ( - address: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - balances?: { denom?: string; amount?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/spendable_balances/${address}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TotalSupply - * @summary TotalSupply queries the total supply of all coins. - * @request GET:/cosmos/bank/v1beta1/supply - */ - totalSupply: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - supply?: { denom?: string; amount?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/supply`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SupplyOf - * @summary SupplyOf queries the supply of a single coin. - * @request GET:/cosmos/bank/v1beta1/supply/{denom} - */ - supplyOf: (denom: string, params: RequestParams = {}) => - this.request< - { amount?: { denom?: string; amount?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/bank/v1beta1/supply/${denom}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name CommunityPool - * @summary CommunityPool queries the community pool coins. - * @request GET:/cosmos/distribution/v1beta1/community_pool - */ - communityPool: (params: RequestParams = {}) => - this.request< - { pool?: { denom?: string; amount?: string }[] }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/community_pool`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegationTotalRewards - * @summary DelegationTotalRewards queries the total rewards accrued by a each -validator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards - */ - delegationTotalRewards: ( - delegatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { - rewards?: { - validator_address?: string - reward?: { denom?: string; amount?: string }[] - }[] - total?: { denom?: string; amount?: string }[] - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegationRewards - * @summary DelegationRewards queries the total rewards accrued by a delegation. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} - */ - delegationRewards: ( - delegatorAddress: string, - validatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { rewards?: { denom?: string; amount?: string }[] }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/rewards/${validatorAddress}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DistDelegatorValidators - * @summary DelegatorValidators queries the validators of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators - */ - distDelegatorValidators: ( - delegatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { validators?: string[] }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/validators`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegatorWithdrawAddress - * @summary DelegatorWithdrawAddress queries withdraw address of a delegator. - * @request GET:/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address - */ - delegatorWithdrawAddress: ( - delegatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { withdraw_address?: string }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/delegators/${delegatorAddress}/withdraw_address`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DistributionParams - * @summary Params queries params of the distribution module. - * @request GET:/cosmos/distribution/v1beta1/params - */ - distributionParams: (params: RequestParams = {}) => - this.request< - { - params?: { - community_tax?: string - base_proposer_reward?: string - bonus_proposer_reward?: string - withdraw_addr_enabled?: boolean - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorCommission - * @summary ValidatorCommission queries accumulated commission for a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/commission - */ - validatorCommission: ( - validatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { commission?: { commission?: { denom?: string; amount?: string }[] } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/commission`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorOutstandingRewards - * @summary ValidatorOutstandingRewards queries rewards of a validator address. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards - */ - validatorOutstandingRewards: ( - validatorAddress: string, - params: RequestParams = {}, - ) => - this.request< - { rewards?: { rewards?: { denom?: string; amount?: string }[] } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/outstanding_rewards`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorSlashes - * @summary ValidatorSlashes queries slash events of a validator. - * @request GET:/cosmos/distribution/v1beta1/validators/{validator_address}/slashes - */ - validatorSlashes: ( - validatorAddress: string, - query?: { - starting_height?: string - ending_height?: string - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - slashes?: { validator_period?: string; fraction?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/distribution/v1beta1/validators/${validatorAddress}/slashes`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Allowance - * @summary Allowance returns fee granted to the grantee by the granter. - * @request GET:/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} - */ - allowance: (granter: string, grantee: string, params: RequestParams = {}) => - this.request< - { - allowance?: { - granter?: string - grantee?: string - allowance?: { type_url?: string; value?: string } - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Allowances - * @summary Allowances returns all the grants for address. - * @request GET:/cosmos/feegrant/v1beta1/allowances/{grantee} - */ - allowances: ( - grantee: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - allowances?: { - granter?: string - grantee?: string - allowance?: { type_url?: string; value?: string } - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/feegrant/v1beta1/allowances/${grantee}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name AllEvidence - * @summary AllEvidence queries all evidence. - * @request GET:/cosmos/evidence/v1beta1/evidence - */ - allEvidence: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - evidence?: { type_url?: string; value?: string }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/evidence/v1beta1/evidence`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Evidence - * @summary Evidence queries evidence based on evidence hash. - * @request GET:/cosmos/evidence/v1beta1/evidence/{evidence_hash} - */ - evidence: (evidenceHash: string, params: RequestParams = {}) => - this.request< - { evidence?: { type_url?: string; value?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/evidence/v1beta1/evidence/${evidenceHash}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name GovParams - * @summary Params queries all parameters of the gov module. - * @request GET:/cosmos/gov/v1beta1/params/{params_type} - */ - govParams: (paramsType: string, params: RequestParams = {}) => - this.request< - { - voting_params?: { voting_period?: string } - deposit_params?: { - min_deposit?: { denom?: string; amount?: string }[] - max_deposit_period?: string - } - tally_params?: { - quorum?: string - threshold?: string - veto_threshold?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/params/${paramsType}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Proposals - * @summary Proposals queries all proposals based on given status. - * @request GET:/cosmos/gov/v1beta1/proposals - */ - proposals: ( - query?: { - proposal_status?: - | 'PROPOSAL_STATUS_UNSPECIFIED' - | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' - | 'PROPOSAL_STATUS_VOTING_PERIOD' - | 'PROPOSAL_STATUS_PASSED' - | 'PROPOSAL_STATUS_REJECTED' - | 'PROPOSAL_STATUS_FAILED' - voter?: string - depositor?: string - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - proposals?: { - proposal_id?: string - content?: { type_url?: string; value?: string } - status?: - | 'PROPOSAL_STATUS_UNSPECIFIED' - | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' - | 'PROPOSAL_STATUS_VOTING_PERIOD' - | 'PROPOSAL_STATUS_PASSED' - | 'PROPOSAL_STATUS_REJECTED' - | 'PROPOSAL_STATUS_FAILED' - final_tally_result?: { - yes?: string - abstain?: string - no?: string - no_with_veto?: string - } - submit_time?: string - deposit_end_time?: string - total_deposit?: { denom?: string; amount?: string }[] - voting_start_time?: string - voting_end_time?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Proposal - * @summary Proposal queries proposal details based on ProposalID. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id} - */ - proposal: (proposalId: string, params: RequestParams = {}) => - this.request< - { - proposal?: { - proposal_id?: string - content?: { type_url?: string; value?: string } - status?: - | 'PROPOSAL_STATUS_UNSPECIFIED' - | 'PROPOSAL_STATUS_DEPOSIT_PERIOD' - | 'PROPOSAL_STATUS_VOTING_PERIOD' - | 'PROPOSAL_STATUS_PASSED' - | 'PROPOSAL_STATUS_REJECTED' - | 'PROPOSAL_STATUS_FAILED' - final_tally_result?: { - yes?: string - abstain?: string - no?: string - no_with_veto?: string - } - submit_time?: string - deposit_end_time?: string - total_deposit?: { denom?: string; amount?: string }[] - voting_start_time?: string - voting_end_time?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Deposits - * @summary Deposits queries all deposits of a single proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits - */ - deposits: ( - proposalId: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - deposits?: { - proposal_id?: string - depositor?: string - amount?: { denom?: string; amount?: string }[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Deposit - * @summary Deposit queries single deposit information based proposalID, depositAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} - */ - deposit: ( - proposalId: string, - depositor: string, - params: RequestParams = {}, - ) => - this.request< - { - deposit?: { - proposal_id?: string - depositor?: string - amount?: { denom?: string; amount?: string }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/deposits/${depositor}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name TallyResult - * @summary TallyResult queries the tally of a proposal vote. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/tally - */ - tallyResult: (proposalId: string, params: RequestParams = {}) => - this.request< - { - tally?: { - yes?: string - abstain?: string - no?: string - no_with_veto?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/tally`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Votes - * @summary Votes queries votes of a given proposal. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes - */ - votes: ( - proposalId: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - votes?: { - proposal_id?: string - voter?: string - option?: - | 'VOTE_OPTION_UNSPECIFIED' - | 'VOTE_OPTION_YES' - | 'VOTE_OPTION_ABSTAIN' - | 'VOTE_OPTION_NO' - | 'VOTE_OPTION_NO_WITH_VETO' - options?: { - option?: - | 'VOTE_OPTION_UNSPECIFIED' - | 'VOTE_OPTION_YES' - | 'VOTE_OPTION_ABSTAIN' - | 'VOTE_OPTION_NO' - | 'VOTE_OPTION_NO_WITH_VETO' - weight?: string - }[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Vote - * @summary Vote queries voted information based on proposalID, voterAddr. - * @request GET:/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} - */ - vote: (proposalId: string, voter: string, params: RequestParams = {}) => - this.request< - { - vote?: { - proposal_id?: string - voter?: string - option?: - | 'VOTE_OPTION_UNSPECIFIED' - | 'VOTE_OPTION_YES' - | 'VOTE_OPTION_ABSTAIN' - | 'VOTE_OPTION_NO' - | 'VOTE_OPTION_NO_WITH_VETO' - options?: { - option?: - | 'VOTE_OPTION_UNSPECIFIED' - | 'VOTE_OPTION_YES' - | 'VOTE_OPTION_ABSTAIN' - | 'VOTE_OPTION_NO' - | 'VOTE_OPTION_NO_WITH_VETO' - weight?: string - }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/gov/v1beta1/proposals/${proposalId}/votes/${voter}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SlashingParams - * @summary Params queries the parameters of slashing module - * @request GET:/cosmos/slashing/v1beta1/params - */ - slashingParams: (params: RequestParams = {}) => - this.request< - { - params?: { - signed_blocks_window?: string - min_signed_per_window?: string - downtime_jail_duration?: string - slash_fraction_double_sign?: string - slash_fraction_downtime?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/slashing/v1beta1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SigningInfos - * @summary SigningInfos queries signing info of all validators - * @request GET:/cosmos/slashing/v1beta1/signing_infos - */ - signingInfos: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - info?: { - address?: string - start_height?: string - index_offset?: string - jailed_until?: string - tombstoned?: boolean - missed_blocks_counter?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/slashing/v1beta1/signing_infos`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name SigningInfo - * @summary SigningInfo queries the signing info of given cons address - * @request GET:/cosmos/slashing/v1beta1/signing_infos/{cons_address} - */ - signingInfo: (consAddress: string, params: RequestParams = {}) => - this.request< - { - val_signing_info?: { - address?: string - start_height?: string - index_offset?: string - jailed_until?: string - tombstoned?: boolean - missed_blocks_counter?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/slashing/v1beta1/signing_infos/${consAddress}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegatorDelegations - * @summary DelegatorDelegations queries all delegations of a given delegator address. - * @request GET:/cosmos/staking/v1beta1/delegations/{delegator_addr} - */ - delegatorDelegations: ( - delegatorAddr: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - delegation_responses?: { - delegation?: { - delegator_address?: string - validator_address?: string - shares?: string - } - balance?: { denom?: string; amount?: string } - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/delegations/${delegatorAddr}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Redelegations - * @summary Redelegations queries redelegations of given address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations - */ - redelegations: ( - delegatorAddr: string, - query?: { - src_validator_addr?: string - dst_validator_addr?: string - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - redelegation_responses?: { - redelegation?: { - delegator_address?: string - validator_src_address?: string - validator_dst_address?: string - entries?: { - creation_height?: string - completion_time?: string - initial_balance?: string - shares_dst?: string - }[] - } - entries?: { - redelegation_entry?: { - creation_height?: string - completion_time?: string - initial_balance?: string - shares_dst?: string - } - balance?: string - }[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/redelegations`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegatorUnbondingDelegations - * @summary DelegatorUnbondingDelegations queries all unbonding delegations of a given -delegator address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations - */ - delegatorUnbondingDelegations: ( - delegatorAddr: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - unbonding_responses?: { - delegator_address?: string - validator_address?: string - entries?: { - creation_height?: string - completion_time?: string - initial_balance?: string - balance?: string - }[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/unbonding_delegations`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegatorValidators - * @summary DelegatorValidators queries all validators info for given delegator -address. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators - */ - delegatorValidators: ( - delegatorAddr: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - validators?: { - operator_address?: string - consensus_pubkey?: { type_url?: string; value?: string } - jailed?: boolean - status?: - | 'BOND_STATUS_UNSPECIFIED' - | 'BOND_STATUS_UNBONDED' - | 'BOND_STATUS_UNBONDING' - | 'BOND_STATUS_BONDED' - tokens?: string - delegator_shares?: string - description?: { - moniker?: string - identity?: string - website?: string - security_contact?: string - details?: string - } - unbonding_height?: string - unbonding_time?: string - commission?: { - commission_rates?: { - rate?: string - max_rate?: string - max_change_rate?: string - } - update_time?: string - } - min_self_delegation?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name DelegatorValidator - * @summary DelegatorValidator queries validator info for given delegator validator -pair. - * @request GET:/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} - */ - delegatorValidator: ( - delegatorAddr: string, - validatorAddr: string, - params: RequestParams = {}, - ) => - this.request< - { - validator?: { - operator_address?: string - consensus_pubkey?: { type_url?: string; value?: string } - jailed?: boolean - status?: - | 'BOND_STATUS_UNSPECIFIED' - | 'BOND_STATUS_UNBONDED' - | 'BOND_STATUS_UNBONDING' - | 'BOND_STATUS_BONDED' - tokens?: string - delegator_shares?: string - description?: { - moniker?: string - identity?: string - website?: string - security_contact?: string - details?: string - } - unbonding_height?: string - unbonding_time?: string - commission?: { - commission_rates?: { - rate?: string - max_rate?: string - max_change_rate?: string - } - update_time?: string - } - min_self_delegation?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/delegators/${delegatorAddr}/validators/${validatorAddr}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name HistoricalInfo - * @summary HistoricalInfo queries the historical info for given height. - * @request GET:/cosmos/staking/v1beta1/historical_info/{height} - */ - historicalInfo: (height: string, params: RequestParams = {}) => - this.request< - { - hist?: { - header?: { - version?: { block?: string; app?: string } - chain_id?: string - height?: string - time?: string - last_block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - last_commit_hash?: string - data_hash?: string - validators_hash?: string - next_validators_hash?: string - consensus_hash?: string - app_hash?: string - last_results_hash?: string - evidence_hash?: string - proposer_address?: string - } - valset?: { - operator_address?: string - consensus_pubkey?: { type_url?: string; value?: string } - jailed?: boolean - status?: - | 'BOND_STATUS_UNSPECIFIED' - | 'BOND_STATUS_UNBONDED' - | 'BOND_STATUS_UNBONDING' - | 'BOND_STATUS_BONDED' - tokens?: string - delegator_shares?: string - description?: { - moniker?: string - identity?: string - website?: string - security_contact?: string - details?: string - } - unbonding_height?: string - unbonding_time?: string - commission?: { - commission_rates?: { - rate?: string - max_rate?: string - max_change_rate?: string - } - update_time?: string - } - min_self_delegation?: string - }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/historical_info/${height}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name StakingParams - * @summary Parameters queries the staking parameters. - * @request GET:/cosmos/staking/v1beta1/params - */ - stakingParams: (params: RequestParams = {}) => - this.request< - { - params?: { - unbonding_time?: string - max_validators?: number - max_entries?: number - historical_entries?: number - bond_denom?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/params`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Pool - * @summary Pool queries the pool info. - * @request GET:/cosmos/staking/v1beta1/pool - */ - pool: (params: RequestParams = {}) => - this.request< - { pool?: { not_bonded_tokens?: string; bonded_tokens?: string } }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/pool`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Validators - * @summary Validators queries all validators that match the given status. - * @request GET:/cosmos/staking/v1beta1/validators - */ - validators: ( - query?: { - status?: string - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - validators?: { - operator_address?: string - consensus_pubkey?: { type_url?: string; value?: string } - jailed?: boolean - status?: - | 'BOND_STATUS_UNSPECIFIED' - | 'BOND_STATUS_UNBONDED' - | 'BOND_STATUS_UNBONDING' - | 'BOND_STATUS_BONDED' - tokens?: string - delegator_shares?: string - description?: { - moniker?: string - identity?: string - website?: string - security_contact?: string - details?: string - } - unbonding_height?: string - unbonding_time?: string - commission?: { - commission_rates?: { - rate?: string - max_rate?: string - max_change_rate?: string - } - update_time?: string - } - min_self_delegation?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Validator - * @summary Validator queries validator info for given validator address. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr} - */ - validator: (validatorAddr: string, params: RequestParams = {}) => - this.request< - { - validator?: { - operator_address?: string - consensus_pubkey?: { type_url?: string; value?: string } - jailed?: boolean - status?: - | 'BOND_STATUS_UNSPECIFIED' - | 'BOND_STATUS_UNBONDED' - | 'BOND_STATUS_UNBONDING' - | 'BOND_STATUS_BONDED' - tokens?: string - delegator_shares?: string - description?: { - moniker?: string - identity?: string - website?: string - security_contact?: string - details?: string - } - unbonding_height?: string - unbonding_time?: string - commission?: { - commission_rates?: { - rate?: string - max_rate?: string - max_change_rate?: string - } - update_time?: string - } - min_self_delegation?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorDelegations - * @summary ValidatorDelegations queries delegate info for given validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations - */ - validatorDelegations: ( - validatorAddr: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - delegation_responses?: { - delegation?: { - delegator_address?: string - validator_address?: string - shares?: string - } - balance?: { denom?: string; amount?: string } - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Query - * @name Delegation - * @summary Delegation queries delegate info for given validator delegator pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} - */ - delegation: ( - validatorAddr: string, - delegatorAddr: string, - params: RequestParams = {}, - ) => - this.request< - { - delegation_response?: { - delegation?: { - delegator_address?: string - validator_address?: string - shares?: string - } - balance?: { denom?: string; amount?: string } - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name UnbondingDelegation - * @summary UnbondingDelegation queries unbonding info for given validator delegator -pair. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation - */ - unbondingDelegation: ( - validatorAddr: string, - delegatorAddr: string, - params: RequestParams = {}, - ) => - this.request< - { - unbond?: { - delegator_address?: string - validator_address?: string - entries?: { - creation_height?: string - completion_time?: string - initial_balance?: string - balance?: string - }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/delegations/${delegatorAddr}/unbonding_delegation`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Query - * @name ValidatorUnbondingDelegations - * @summary ValidatorUnbondingDelegations queries unbonding delegations of a validator. - * @request GET:/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations - */ - validatorUnbondingDelegations: ( - validatorAddr: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - unbonding_responses?: { - delegator_address?: string - validator_address?: string - entries?: { - creation_height?: string - completion_time?: string - initial_balance?: string - balance?: string - }[] - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/staking/v1beta1/validators/${validatorAddr}/unbonding_delegations`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Service - * @name Simulate - * @summary Simulate simulates executing a transaction for estimating gas usage. - * @request POST:/cosmos/tx/v1beta1/simulate - */ - simulate: ( - body: CosmosTxV1Beta1SimulateRequest, - params: RequestParams = {}, - ) => - this.request< - { - gas_info?: { gas_wanted?: string; gas_used?: string } - result?: { - data?: string - log?: string - events?: { - type?: string - attributes?: { key?: string; value?: string; index?: boolean }[] - }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/tx/v1beta1/simulate`, - method: 'POST', - body: body, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetTxsEvent - * @summary GetTxsEvent fetches txs by event. - * @request GET:/cosmos/tx/v1beta1/txs - */ - getTxsEvent: ( - query?: { - events?: string[] - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - order_by?: 'ORDER_BY_UNSPECIFIED' | 'ORDER_BY_ASC' | 'ORDER_BY_DESC' - }, - params: RequestParams = {}, - ) => - this.request< - CosmosTxV1Beta1GetTxsEventResponse, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/tx/v1beta1/txs`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Service - * @name BroadcastTx - * @summary BroadcastTx broadcast transaction. - * @request POST:/cosmos/tx/v1beta1/txs - */ - broadcastTx: ( - body: { - tx_bytes?: string - mode?: - | 'BROADCAST_MODE_UNSPECIFIED' - | 'BROADCAST_MODE_BLOCK' - | 'BROADCAST_MODE_SYNC' - | 'BROADCAST_MODE_ASYNC' - }, - params: RequestParams = {}, - ) => - this.request< - { - tx_response?: { - height?: string - txhash?: string - codespace?: string - code?: number - data?: string - raw_log?: string - logs?: { - msg_index?: number - log?: string - events?: { - type?: string - attributes?: { key?: string; value?: string }[] - }[] - }[] - info?: string - gas_wanted?: string - gas_used?: string - tx?: { type_url?: string; value?: string } - timestamp?: string - events?: { - type?: string - attributes?: { key?: string; value?: string; index?: boolean }[] - }[] - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/tx/v1beta1/txs`, - method: 'POST', - body: body, - type: ContentType.Json, - ...params, - }), - - /** - * @description Since: cosmos-sdk 0.45.2 - * - * @tags Service - * @name GetBlockWithTxs - * @summary GetBlockWithTxs fetches a block with decoded txs. - * @request GET:/cosmos/tx/v1beta1/txs/block/{height} - */ - getBlockWithTxs: ( - height: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - CosmosTxV1Beta1GetBlockWithTxsResponse, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/tx/v1beta1/txs/block/${height}`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetTx - * @summary GetTx fetches a tx by hash. - * @request GET:/cosmos/tx/v1beta1/txs/{hash} - */ - getTx: (hash: string, params: RequestParams = {}) => - this.request< - CosmosTxV1Beta1GetTxResponse, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/tx/v1beta1/txs/${hash}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetLatestBlock - * @summary GetLatestBlock returns the latest block. - * @request GET:/cosmos/base/tendermint/v1beta1/blocks/latest - */ - getLatestBlock: (params: RequestParams = {}) => - this.request< - { - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - block?: { - header?: { - version?: { block?: string; app?: string } - chain_id?: string - height?: string - time?: string - last_block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - last_commit_hash?: string - data_hash?: string - validators_hash?: string - next_validators_hash?: string - consensus_hash?: string - app_hash?: string - last_results_hash?: string - evidence_hash?: string - proposer_address?: string - } - data?: { txs?: string[] } - evidence?: { - evidence?: { - duplicate_vote_evidence?: { - vote_a?: { - type?: - | 'SIGNED_MSG_TYPE_UNKNOWN' - | 'SIGNED_MSG_TYPE_PREVOTE' - | 'SIGNED_MSG_TYPE_PRECOMMIT' - | 'SIGNED_MSG_TYPE_PROPOSAL' - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - timestamp?: string - validator_address?: string - validator_index?: number - signature?: string - } - vote_b?: { - type?: - | 'SIGNED_MSG_TYPE_UNKNOWN' - | 'SIGNED_MSG_TYPE_PREVOTE' - | 'SIGNED_MSG_TYPE_PRECOMMIT' - | 'SIGNED_MSG_TYPE_PROPOSAL' - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - timestamp?: string - validator_address?: string - validator_index?: number - signature?: string - } - total_voting_power?: string - validator_power?: string - timestamp?: string - } - light_client_attack_evidence?: { - conflicting_block?: { - signed_header?: { - header?: { - version?: { block?: string; app?: string } - chain_id?: string - height?: string - time?: string - last_block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - last_commit_hash?: string - data_hash?: string - validators_hash?: string - next_validators_hash?: string - consensus_hash?: string - app_hash?: string - last_results_hash?: string - evidence_hash?: string - proposer_address?: string - } - commit?: { - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - signatures?: { - block_id_flag?: - | 'BLOCK_ID_FLAG_UNKNOWN' - | 'BLOCK_ID_FLAG_ABSENT' - | 'BLOCK_ID_FLAG_COMMIT' - | 'BLOCK_ID_FLAG_NIL' - validator_address?: string - timestamp?: string - signature?: string - }[] - } - } - validator_set?: { - validators?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - }[] - proposer?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - } - total_voting_power?: string - } - } - common_height?: string - byzantine_validators?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - }[] - total_voting_power?: string - timestamp?: string - } - }[] - } - last_commit?: { - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - signatures?: { - block_id_flag?: - | 'BLOCK_ID_FLAG_UNKNOWN' - | 'BLOCK_ID_FLAG_ABSENT' - | 'BLOCK_ID_FLAG_COMMIT' - | 'BLOCK_ID_FLAG_NIL' - validator_address?: string - timestamp?: string - signature?: string - }[] - } - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/blocks/latest`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetBlockByHeight - * @summary GetBlockByHeight queries block for given height. - * @request GET:/cosmos/base/tendermint/v1beta1/blocks/{height} - */ - getBlockByHeight: (height: string, params: RequestParams = {}) => - this.request< - { - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - block?: { - header?: { - version?: { block?: string; app?: string } - chain_id?: string - height?: string - time?: string - last_block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - last_commit_hash?: string - data_hash?: string - validators_hash?: string - next_validators_hash?: string - consensus_hash?: string - app_hash?: string - last_results_hash?: string - evidence_hash?: string - proposer_address?: string - } - data?: { txs?: string[] } - evidence?: { - evidence?: { - duplicate_vote_evidence?: { - vote_a?: { - type?: - | 'SIGNED_MSG_TYPE_UNKNOWN' - | 'SIGNED_MSG_TYPE_PREVOTE' - | 'SIGNED_MSG_TYPE_PRECOMMIT' - | 'SIGNED_MSG_TYPE_PROPOSAL' - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - timestamp?: string - validator_address?: string - validator_index?: number - signature?: string - } - vote_b?: { - type?: - | 'SIGNED_MSG_TYPE_UNKNOWN' - | 'SIGNED_MSG_TYPE_PREVOTE' - | 'SIGNED_MSG_TYPE_PRECOMMIT' - | 'SIGNED_MSG_TYPE_PROPOSAL' - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - timestamp?: string - validator_address?: string - validator_index?: number - signature?: string - } - total_voting_power?: string - validator_power?: string - timestamp?: string - } - light_client_attack_evidence?: { - conflicting_block?: { - signed_header?: { - header?: { - version?: { block?: string; app?: string } - chain_id?: string - height?: string - time?: string - last_block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - last_commit_hash?: string - data_hash?: string - validators_hash?: string - next_validators_hash?: string - consensus_hash?: string - app_hash?: string - last_results_hash?: string - evidence_hash?: string - proposer_address?: string - } - commit?: { - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - signatures?: { - block_id_flag?: - | 'BLOCK_ID_FLAG_UNKNOWN' - | 'BLOCK_ID_FLAG_ABSENT' - | 'BLOCK_ID_FLAG_COMMIT' - | 'BLOCK_ID_FLAG_NIL' - validator_address?: string - timestamp?: string - signature?: string - }[] - } - } - validator_set?: { - validators?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - }[] - proposer?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - } - total_voting_power?: string - } - } - common_height?: string - byzantine_validators?: { - address?: string - pub_key?: { ed25519?: string; secp256k1?: string } - voting_power?: string - proposer_priority?: string - }[] - total_voting_power?: string - timestamp?: string - } - }[] - } - last_commit?: { - height?: string - round?: number - block_id?: { - hash?: string - part_set_header?: { total?: number; hash?: string } - } - signatures?: { - block_id_flag?: - | 'BLOCK_ID_FLAG_UNKNOWN' - | 'BLOCK_ID_FLAG_ABSENT' - | 'BLOCK_ID_FLAG_COMMIT' - | 'BLOCK_ID_FLAG_NIL' - validator_address?: string - timestamp?: string - signature?: string - }[] - } - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/blocks/${height}`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetNodeInfo - * @summary GetNodeInfo queries the current node info. - * @request GET:/cosmos/base/tendermint/v1beta1/node_info - */ - getNodeInfo: (params: RequestParams = {}) => - this.request< - { - default_node_info?: { - protocol_version?: { p2p?: string; block?: string; app?: string } - default_node_id?: string - listen_addr?: string - network?: string - version?: string - channels?: string - moniker?: string - other?: { tx_index?: string; rpc_address?: string } - } - application_version?: { - name?: string - app_name?: string - version?: string - git_commit?: string - build_tags?: string - go_version?: string - build_deps?: { path?: string; version?: string; sum?: string }[] - cosmos_sdk_version?: string - } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/node_info`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetSyncing - * @summary GetSyncing queries node syncing. - * @request GET:/cosmos/base/tendermint/v1beta1/syncing - */ - getSyncing: (params: RequestParams = {}) => - this.request< - { syncing?: boolean }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/syncing`, - method: 'GET', - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetLatestValidatorSet - * @summary GetLatestValidatorSet queries latest validator-set. - * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/latest - */ - getLatestValidatorSet: ( - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - block_height?: string - validators?: { - address?: string - pub_key?: { type_url?: string; value?: string } - voting_power?: string - proposer_priority?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/validatorsets/latest`, - method: 'GET', - query: query, - ...params, - }), - - /** - * No description - * - * @tags Service - * @name GetValidatorSetByHeight - * @summary GetValidatorSetByHeight queries validator-set at a given height. - * @request GET:/cosmos/base/tendermint/v1beta1/validatorsets/{height} - */ - getValidatorSetByHeight: ( - height: string, - query?: { - 'pagination.key'?: string - 'pagination.offset'?: string - 'pagination.limit'?: string - 'pagination.count_total'?: boolean - 'pagination.reverse'?: boolean - }, - params: RequestParams = {}, - ) => - this.request< - { - block_height?: string - validators?: { - address?: string - pub_key?: { type_url?: string; value?: string } - voting_power?: string - proposer_priority?: string - }[] - pagination?: { next_key?: string; total?: string } - }, - { - error?: string - code?: number - message?: string - details?: { type_url?: string; value?: string }[] - } - >({ - path: `/cosmos/base/tendermint/v1beta1/validatorsets/${height}`, - method: 'GET', - query: query, - ...params, - }), - } -} diff --git a/packages/provider/src/generated/http-client.ts b/packages/provider/src/generated/http-client.ts new file mode 100644 index 00000000..98d4ca2d --- /dev/null +++ b/packages/provider/src/generated/http-client.ts @@ -0,0 +1,158 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import axios, { + AxiosInstance, + AxiosRequestConfig, + AxiosResponse, + ResponseType, +} from 'axios' + +export type QueryParamsType = Record + +export interface FullRequestParams + extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean + /** request path */ + path: string + /** content type of request body */ + type?: ContentType + /** query params */ + query?: QueryParamsType + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseType + /** request body */ + body?: unknown +} + +export type RequestParams = Omit< + FullRequestParams, + 'body' | 'method' | 'query' | 'path' +> + +export interface ApiConfig + extends Omit { + securityWorker?: ( + securityData: SecurityDataType | null, + ) => Promise | AxiosRequestConfig | void + secure?: boolean + format?: ResponseType +} + +export enum ContentType { + Json = 'application/json', + FormData = 'multipart/form-data', + UrlEncoded = 'application/x-www-form-urlencoded', +} + +export class HttpClient { + public instance: AxiosInstance + private securityData: SecurityDataType | null = null + private securityWorker?: ApiConfig['securityWorker'] + private secure?: boolean + private format?: ResponseType + + constructor({ + securityWorker, + secure, + format, + ...axiosConfig + }: ApiConfig = {}) { + this.instance = axios.create({ + ...axiosConfig, + baseURL: axiosConfig.baseURL || 'http://www.google.be', + }) + this.secure = secure + this.format = format + this.securityWorker = securityWorker + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data + } + + private mergeRequestParams( + params1: AxiosRequestConfig, + params2?: AxiosRequestConfig, + ): AxiosRequestConfig { + return { + ...this.instance.defaults, + ...params1, + ...(params2 || {}), + headers: { + ...(this.instance.defaults.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + } + } + + private createFormData(input: Record): FormData { + return Object.keys(input || {}).reduce((formData, key) => { + const property = input[key] + formData.append( + key, + property instanceof Blob + ? property + : typeof property === 'object' && property !== null + ? JSON.stringify(property) + : `${property}`, + ) + return formData + }, new FormData()) + } + + public request = async ({ + secure, + path, + type, + query, + format, + body, + ...params + }: FullRequestParams): Promise> => { + const secureParams = + ((typeof secure === 'boolean' ? secure : this.secure) && + this.securityWorker && + (await this.securityWorker(this.securityData))) || + {} + const requestParams = this.mergeRequestParams(params, secureParams) + const responseFormat = (format && this.format) || void 0 + + if ( + type === ContentType.FormData && + body && + body !== null && + typeof body === 'object' + ) { + requestParams.headers.common = { Accept: '*/*' } + requestParams.headers.post = {} + requestParams.headers.put = {} + + body = this.createFormData(body as Record) + } + + return this.instance.request({ + ...requestParams, + headers: { + ...(type && type !== ContentType.FormData + ? { 'Content-Type': type } + : {}), + ...(requestParams.headers || {}), + }, + params: query, + responseType: responseFormat, + data: body, + url: path, + }) + } +} diff --git a/yarn.lock b/yarn.lock index cbb9f1f8..08f7cbfb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -554,6 +554,11 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@exodus/schemasafe@^1.0.0-rc.2": + version "1.0.0-rc.7" + resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.0.0-rc.7.tgz#aded6839c2369883dafa46608a135c82b42ed76b" + integrity sha512-+1mBLsa+vvlV0lwEAP1hwgmOPkjMnoJ8hyCMfCCJga0sVDwDzrPJjnxZwdDaUmOh/vbFHQGBTk+FxsVjoI/CjQ== + "@gar/promisify@^1.0.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -1827,6 +1832,11 @@ resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== +"@types/swagger-schema-official@2.0.21": + version "2.0.21" + resolved "https://registry.yarnpkg.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.21.tgz#56812a86dcd57ba60e5c51705ee96a2b2dc9b374" + integrity sha512-n9BbLOjR4Hre7B4TSGGMPohOgOg8tcp00uxqsIE00uuWQC0QuX57G1bqC1csLsk2DpTGtHkd0dEb3ipsCZ9dAA== + "@types/unist@*", "@types/unist@^2.0.2": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -2185,13 +2195,21 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@^0.21.2: +axios@^0.21.2, axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: follow-redirects "^1.14.0" +axios@^0.27.2: + version "0.27.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== + dependencies: + follow-redirects "^1.14.9" + form-data "^4.0.0" + babel-jest@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" @@ -2434,6 +2452,11 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2669,6 +2692,11 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + commander@^8.2.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -3226,6 +3254,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg== + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3469,6 +3502,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eta@^1.12.1: + version "1.12.3" + resolved "https://registry.yarnpkg.com/eta/-/eta-1.12.3.tgz#2982d08adfbef39f9fa50e2fbd42d7337e7338b1" + integrity sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg== + eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -3559,6 +3597,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-safe-stringify@^2.0.7: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -3640,6 +3683,11 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== +follow-redirects@^1.14.9: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -3654,6 +3702,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -4048,6 +4105,11 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http2-client@^1.2.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.5.tgz#20c9dc909e3cc98284dd20af2432c524086df181" + integrity sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA== + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -4936,7 +4998,7 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: +js-yaml@^4.0.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -5285,7 +5347,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.15, lodash@^4.17.19, lodash@^4.7.0: +lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5315,7 +5377,7 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -5684,6 +5746,11 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nanoid@^3.1.22: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -5699,6 +5766,20 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-fetch-h2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz#c6188325f9bd3d834020bf0f2d6dc17ced2241ac" + integrity sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg== + dependencies: + http2-client "^1.2.5" + node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -5744,6 +5825,13 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= +node-readfiles@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/node-readfiles/-/node-readfiles-0.2.0.tgz#dbbd4af12134e2e635c245ef93ffcf6f60673a5d" + integrity sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA== + dependencies: + es6-promise "^3.2.1" + node-releases@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" @@ -5909,6 +5997,52 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +oas-kit-common@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/oas-kit-common/-/oas-kit-common-1.0.8.tgz#6d8cacf6e9097967a4c7ea8bcbcbd77018e1f535" + integrity sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ== + dependencies: + fast-safe-stringify "^2.0.7" + +oas-linter@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/oas-linter/-/oas-linter-3.2.2.tgz#ab6a33736313490659035ca6802dc4b35d48aa1e" + integrity sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ== + dependencies: + "@exodus/schemasafe" "^1.0.0-rc.2" + should "^13.2.1" + yaml "^1.10.0" + +oas-resolver@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/oas-resolver/-/oas-resolver-2.5.6.tgz#10430569cb7daca56115c915e611ebc5515c561b" + integrity sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ== + dependencies: + node-fetch-h2 "^2.3.0" + oas-kit-common "^1.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + +oas-schema-walker@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz#74c3cd47b70ff8e0b19adada14455b5d3ac38a22" + integrity sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ== + +oas-validator@^5.0.8: + version "5.0.8" + resolved "https://registry.yarnpkg.com/oas-validator/-/oas-validator-5.0.8.tgz#387e90df7cafa2d3ffc83b5fb976052b87e73c28" + integrity sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw== + dependencies: + call-me-maybe "^1.0.1" + oas-kit-common "^1.0.8" + oas-linter "^3.2.2" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + reftools "^1.1.9" + should "^13.2.1" + yaml "^1.10.0" + oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -6318,6 +6452,11 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" +prettier@^2.2.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + prettier@^2.4.1: version "2.6.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.0.tgz#12f8f504c4d8ddb76475f441337542fa799207d4" @@ -6591,6 +6730,11 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +reftools@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e" + integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w== + regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -6832,6 +6976,50 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" +should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + integrity sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA== + dependencies: + should-type "^1.4.0" + +should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + integrity sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q== + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + integrity sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA== + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + +should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + integrity sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ== + +should-util@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.1.tgz#fb0d71338f532a3a149213639e2d32cbea8bcb28" + integrity sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g== + +should@^13.2.1: + version "13.2.3" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10" + integrity sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ== + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + shx@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" @@ -7198,6 +7386,48 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +swagger-schema-official@2.0.0-bab6bed: + version "2.0.0-bab6bed" + resolved "https://registry.yarnpkg.com/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd" + integrity sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA== + +swagger-typescript-api@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/swagger-typescript-api/-/swagger-typescript-api-9.3.1.tgz#07df3aa8e83a3897356a6e820e88b8348830aa6b" + integrity sha512-vtarFELmXmDKrtY2FvU2OjNvN1BqOj3kHWzz7mAresNKRgRubZpjlopECxbBekrLeX3lezAYSNcrFMVRGJAD4A== + dependencies: + "@types/swagger-schema-official" "2.0.21" + axios "^0.21.4" + commander "^6.2.1" + cosmiconfig "^7.0.0" + eta "^1.12.1" + js-yaml "^4.0.0" + lodash "^4.17.21" + make-dir "^3.1.0" + nanoid "^3.1.22" + node-emoji "^1.10.0" + prettier "^2.2.1" + swagger-schema-official "2.0.0-bab6bed" + swagger2openapi "^7.0.5" + typescript "^4.2.4" + +swagger2openapi@^7.0.5: + version "7.0.8" + resolved "https://registry.yarnpkg.com/swagger2openapi/-/swagger2openapi-7.0.8.tgz#12c88d5de776cb1cbba758994930f40ad0afac59" + integrity sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g== + dependencies: + call-me-maybe "^1.0.1" + node-fetch "^2.6.1" + node-fetch-h2 "^2.3.0" + node-readfiles "^0.2.0" + oas-kit-common "^1.0.8" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + oas-validator "^5.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + symbol-observable@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" @@ -7546,6 +7776,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^4.2.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + typescript@^4.4.3: version "4.6.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" @@ -7977,6 +8212,19 @@ yargs@^17.0.0: y18n "^5.0.5" yargs-parser "^21.0.0" +yargs@^17.0.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 82fd006aa3289db9a0d50500c564bc7f50819f4b Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 13:06:44 +0300 Subject: [PATCH 05/11] fix: remove client from branch --- packages/client/.npmignore | 7 ------ packages/client/README.md | 7 ------ packages/client/package.json | 37 ----------------------------- packages/client/src/index.ts | 9 ------- packages/client/tsconfig.build.json | 12 ---------- packages/client/tsconfig.json | 5 ---- 6 files changed, 77 deletions(-) delete mode 100644 packages/client/.npmignore delete mode 100644 packages/client/README.md delete mode 100644 packages/client/package.json delete mode 100644 packages/client/src/index.ts delete mode 100644 packages/client/tsconfig.build.json delete mode 100644 packages/client/tsconfig.json diff --git a/packages/client/.npmignore b/packages/client/.npmignore deleted file mode 100644 index 086c13d7..00000000 --- a/packages/client/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -# Blacklist all files -.* -* -src - -# Whitelist dist -!dist/**/* diff --git a/packages/client/README.md b/packages/client/README.md deleted file mode 100644 index de9f757c..00000000 --- a/packages/client/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# `client` - -> TODO: description - -## Usage - -> TODO: DEMONSTRATE API diff --git a/packages/client/package.json b/packages/client/package.json deleted file mode 100644 index db478a56..00000000 --- a/packages/client/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@evmos/client", - "version": "0.1.0", - "description": "EVMOS client", - "author": "Yury Shapkarin ", - "homepage": "https://github.com/tharsis/evmosjs#readme", - "license": "MIT", - "main": "src/index.tx", - "files": [ - "dist" - ], - "_moduleAliases": { - "~client": "dist" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/tharsis/evmosjs.git" - }, - "scripts": { - "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "tsc --build tsconfig.build.json && link-module-alias", - "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", - "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache" - }, - "bugs": { - "url": "https://github.com/tharsis/evmosjs/issues" - }, - "dependencies": { - "@cosmjs/tendermint-rpc": "^0.28.4" - }, - "directories": { - "src": "src" - } -} diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts deleted file mode 100644 index 97b02c31..00000000 --- a/packages/client/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { Tendermint34Client as EvmosClient } from '@cosmjs/tendermint-rpc' - -export { - BlockIdFlag, - CommitSignature, - ValidatorEd25519Pubkey, - ValidatorPubkey, - ValidatorSecp256k1Pubkey, -} from '@cosmjs/tendermint-rpc' diff --git a/packages/client/tsconfig.build.json b/packages/client/tsconfig.build.json deleted file mode 100644 index 5eb08ebe..00000000 --- a/packages/client/tsconfig.build.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.build.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist" - }, - "include": [ - "./src/**/*.ts" - ], - "references": [ - ] -} diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json deleted file mode 100644 index 2bd0d4d7..00000000 --- a/packages/client/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "references": [ - ] -} From 4b7bb5fdc5b4f20b4794624f4cab5f0844b8b448 Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 13:14:39 +0300 Subject: [PATCH 06/11] fix: remove autorest --- packages/provider/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/package.json b/packages/provider/package.json index 2b14f791..ff29f6e0 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -13,7 +13,7 @@ }, "scripts": { "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "tsc --build tsconfig.build.json && npm build:api && link-module-alias && autorest", + "build": "tsc --build tsconfig.build.json && npm build:api && link-module-alias", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", "build:api": "npx swagger-typescript-api --axios --single-http-client --modular -p https://api.evmos.org/openapi.json -o ./src/generated", "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", From dda1748a2914847e2630c928df157486476c74ec Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 13:20:02 +0300 Subject: [PATCH 07/11] fix: json format --- packages/provider/tsconfig.build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/tsconfig.build.json b/packages/provider/tsconfig.build.json index 0dd8bd1a..5eb08ebe 100644 --- a/packages/provider/tsconfig.build.json +++ b/packages/provider/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.build.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", + "outDir": "./dist" }, "include": [ "./src/**/*.ts" From 903839234c9bbdfc74d65a2b1c2b05364c3fd1fa Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Wed, 10 Aug 2022 13:20:37 +0300 Subject: [PATCH 08/11] fix: build api before build ts --- packages/provider/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/package.json b/packages/provider/package.json index ff29f6e0..e0b74446 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -13,7 +13,7 @@ }, "scripts": { "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "tsc --build tsconfig.build.json && npm build:api && link-module-alias", + "build": "npm build:api && tsc --build tsconfig.build.json && link-module-alias", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", "build:api": "npx swagger-typescript-api --axios --single-http-client --modular -p https://api.evmos.org/openapi.json -o ./src/generated", "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", From 4f1b28ebda93f037774af6c1b19ddb54223e3fe7 Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Thu, 11 Aug 2022 16:32:30 +0300 Subject: [PATCH 09/11] fix: npm run build --- packages/provider/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/package.json b/packages/provider/package.json index e0b74446..87cc8068 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -13,7 +13,7 @@ }, "scripts": { "postinstall": "shx mkdir -p dist && link-module-alias", - "build": "npm build:api && tsc --build tsconfig.build.json && link-module-alias", + "build": "npm run build:api && tsc --build tsconfig.build.json && link-module-alias", "build:watch": "tsc --build -w tsconfig.build.json && link-module-alias", "build:api": "npx swagger-typescript-api --axios --single-http-client --modular -p https://api.evmos.org/openapi.json -o ./src/generated", "clean": "tsc --build tsconfig.build.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache", From b6a173ceeb4cf3a35e1d57cf92f3c17b6dab4f43 Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Sun, 11 Sep 2022 16:43:35 +0300 Subject: [PATCH 10/11] fix: use updated swagger json --- packages/provider/src/generated/http-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/src/generated/http-client.ts b/packages/provider/src/generated/http-client.ts index 98d4ca2d..9492169b 100644 --- a/packages/provider/src/generated/http-client.ts +++ b/packages/provider/src/generated/http-client.ts @@ -69,7 +69,7 @@ export class HttpClient { }: ApiConfig = {}) { this.instance = axios.create({ ...axiosConfig, - baseURL: axiosConfig.baseURL || 'http://www.google.be', + baseURL: axiosConfig.baseURL || 'https://rest.bd.evmos.org:1317', }) this.secure = secure this.format = format From 945a125a0981da8267774dc0c5d91cb11afcaa3d Mon Sep 17 00:00:00 2001 From: Yury Shapkarin Date: Sun, 11 Sep 2022 16:45:36 +0300 Subject: [PATCH 11/11] fix: build --- packages/provider/tsconfig.build.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/provider/tsconfig.build.json b/packages/provider/tsconfig.build.json index 5eb08ebe..c80f2a9c 100644 --- a/packages/provider/tsconfig.build.json +++ b/packages/provider/tsconfig.build.json @@ -7,6 +7,9 @@ "include": [ "./src/**/*.ts" ], + "exclude": [ + "./src/generated" + ], "references": [ ] }