diff --git a/packages/ag-trade/package.json b/packages/ag-trade/package.json index a6ab6e4..5a15d4e 100644 --- a/packages/ag-trade/package.json +++ b/packages/ag-trade/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "type": "module", "scripts": { + "postinstall": "patch-package", "lint-fix": "eslint --fix .", "lint": "run-s --continue-on-error lint:*", "lint:js": "eslint .", @@ -16,6 +17,8 @@ "ava": "^5.3.1", "eslint": "^8.36.0", "npm-run-all": "^4.1.5", + "patch-package": "^8.0.0", + "postinstall-postinstall": "^2.1.0", "typescript": "~5.1.6" }, "ava": { @@ -24,7 +27,6 @@ ] }, "dependencies": { - "@agoric/cosmic-proto": "^0.3.0", "@cosmjs/amino": "^0.31.3", "@cosmjs/crypto": "^0.31.3", "@cosmjs/encoding": "^0.31.3", @@ -32,8 +34,10 @@ "@cosmjs/stargate": "^0.31.3", "@cosmjs/tendermint-rpc": "^0.31.3", "@endo/far": "^0.2.21", + "@endo/marshal": "^0.8.9", "@endo/patterns": "^0.2.5", "better-sqlite3": "^8.5.2", + "cosmic-proto-es": "../cosmic-proto-es/", "google-auth-library": "^9.0.0", "google-spreadsheet": "^4.0.2", "minimatch": "^9.0.3", diff --git a/packages/ag-trade/patches/@protobufjs+inquire+1.1.0.patch b/packages/ag-trade/patches/@protobufjs+inquire+1.1.0.patch new file mode 100644 index 0000000..fdb8df0 --- /dev/null +++ b/packages/ag-trade/patches/@protobufjs+inquire+1.1.0.patch @@ -0,0 +1,21 @@ +diff --git a/node_modules/@protobufjs/inquire/index.js b/node_modules/@protobufjs/inquire/index.js +index 33778b5..c343370 100644 +--- a/node_modules/@protobufjs/inquire/index.js ++++ b/node_modules/@protobufjs/inquire/index.js +@@ -1,6 +1,7 @@ + "use strict"; + module.exports = inquire; + ++ + /** + * Requires a module only if available. + * @memberof util +@@ -9,7 +10,7 @@ module.exports = inquire; + */ + function inquire(moduleName) { + try { +- var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval ++ var mod = NOeval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty diff --git a/packages/ag-trade/patches/cosmic-proto-es++@bufbuild+protobuf+1.5.0.patch b/packages/ag-trade/patches/cosmic-proto-es++@bufbuild+protobuf+1.5.0.patch new file mode 100644 index 0000000..9f2c3d6 --- /dev/null +++ b/packages/ag-trade/patches/cosmic-proto-es++@bufbuild+protobuf+1.5.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/cosmic-proto-es/node_modules/@bufbuild/protobuf/package.json b/node_modules/cosmic-proto-es/node_modules/@bufbuild/protobuf/package.json +index 81b39d9..177f75e 100644 +--- a/node_modules/cosmic-proto-es/node_modules/@bufbuild/protobuf/package.json ++++ b/node_modules/cosmic-proto-es/node_modules/@bufbuild/protobuf/package.json +@@ -27,7 +27,7 @@ + ".": { + "module": "./dist/esm/index.js", + "require": "./dist/cjs/index.js", +- "import": "./dist/proxy/index.js" ++ "import": "./dist/esm/index.js" + } + }, + "devDependencies": { diff --git a/packages/ag-trade/src/agoricZone.js b/packages/ag-trade/src/agoricZone.js index 3489d5a..1e20d1c 100644 --- a/packages/ag-trade/src/agoricZone.js +++ b/packages/ag-trade/src/agoricZone.js @@ -1,5 +1,5 @@ // @ts-check -import { MsgWalletSpendAction } from '@agoric/cosmic-proto/swingset/msgs.js'; +import { MsgWalletSpendAction } from 'cosmic-proto-es/swingset/msgs.js'; import { Registry } from '@cosmjs/proto-signing'; import { GasPrice, defaultRegistryTypes } from '@cosmjs/stargate'; @@ -20,10 +20,16 @@ export const SwingsetMsgs = { }, }; +const MsgWalletSpendAction_pbjs = { + create: properties => new MsgWalletSpendAction(properties), + encode: message => /** @type {any} */ ({ finish: () => message.toBinary() }), + decode: bytes => MsgWalletSpendAction.fromBinary(bytes), +}; + export const SwingsetRegistry = new Registry([ ...defaultRegistryTypes, // XXX should this list be "upstreamed" to @agoric/cosmic-proto? - [SwingsetMsgs.MsgWalletSpendAction.typeUrl, MsgWalletSpendAction], + [SwingsetMsgs.MsgWalletSpendAction.typeUrl, MsgWalletSpendAction_pbjs], ]); // https://community.agoric.com/t/network-change-instituting-fees-on-the-agoric-chain-to-mitigate-spam-transactions/109/2 diff --git a/packages/ag-trade/src/cosmosFetch.js b/packages/ag-trade/src/cosmosFetch.js index 1531ade..82e4d62 100644 --- a/packages/ag-trade/src/cosmosFetch.js +++ b/packages/ag-trade/src/cosmosFetch.js @@ -7,6 +7,7 @@ import { Far } from '@endo/far'; import { makeHttpClient, makeLCD } from './httpClient.js'; export const make = _powers => { + console.log('cosmosFetch worker'); /** @param { string } rpcURL */ const makeRPCClient = rpcURL => makeHttpClient(rpcURL, globalThis.fetch); /** @param { string } apiURL */ diff --git a/packages/ag-trade/src/smartWallet.js b/packages/ag-trade/src/smartWallet.js index fc95d75..d4e1278 100644 --- a/packages/ag-trade/src/smartWallet.js +++ b/packages/ag-trade/src/smartWallet.js @@ -35,7 +35,8 @@ import { batchVstorageQuery, makeVStorage } from './batchQuery.js'; export const makeWalletActionMessage = (address, spendAction) => ({ typeUrl: SwingsetMsgs.MsgWalletSpendAction.typeUrl, value: { - owner: toBase64(toAccAddress(address)), + // probufjs: owner: toBase64(toAccAddress(address)), + owner: toAccAddress(address), spendAction, }, }); @@ -316,6 +317,7 @@ const makeQueryKit = lcd => { /** @typedef {Awaited>['query']} QueryTool */ export const make = () => { + console.log('smartWallet worker'); /** @param {number} ms */ const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); diff --git a/packages/ag-trade/yarn.lock b/packages/ag-trade/yarn.lock index 7e0ccb5..ef8da56 100644 --- a/packages/ag-trade/yarn.lock +++ b/packages/ag-trade/yarn.lock @@ -484,6 +484,11 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@bufbuild/protobuf@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.5.0.tgz#6d119e2a562da48aa8cd93f1c0297b9bb32a9c93" + integrity sha512-0Jg+B7Vl8YGCi7c3iZ8/38iTbZrwdU7or6QZlsA9lhSrhumaXOTMsGO8gqwDuus/THEkTiY3Uxn+PEJwgsLt0w== + "@colors/colors@1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" @@ -819,7 +824,7 @@ rollup "^2.79.1" source-map "^0.7.3" -"@endo/bundle-source@^2.7.0": +"@endo/bundle-source@^2.8.0": version "2.8.0" resolved "https://registry.yarnpkg.com/@endo/bundle-source/-/bundle-source-2.8.0.tgz#56f25b3d9c74d3d0bede5c526647aaf02c0a8f94" integrity sha512-nDiM3u/LKWq5xAnJ+zm35HC6kMKF3IG6Y5V0385slFHZVT8mXzRJ5ztEqRsVzvVeITfz3ZRFOaFer6v4V8Lkjg== @@ -873,21 +878,21 @@ integrity sha512-Ldr1auybH9AzrR/WV6bzP4aLRpv8CCl98mv0IAui4uQmmFOPOGchshyBfpiDF5XMKM6wh7z0VgmvmydQ5/7AHQ== "@endo/cli@file:../../../endo/packages/cli": - version "0.2.5" - dependencies: - "@endo/bundle-source" "^2.7.0" - "@endo/compartment-mapper" "^0.9.1" - "@endo/daemon" "^0.2.5" - "@endo/eventual-send" "^0.17.5" - "@endo/far" "^0.2.21" - "@endo/import-bundle" "^0.4.1" - "@endo/lockdown" "^0.1.31" - "@endo/promise-kit" "^0.2.59" - "@endo/stream-node" "^0.2.29" - "@endo/where" "^0.3.4" + version "0.2.6" + dependencies: + "@endo/bundle-source" "^2.8.0" + "@endo/compartment-mapper" "^0.9.2" + "@endo/daemon" "^0.2.6" + "@endo/eventual-send" "^0.17.6" + "@endo/far" "^0.2.22" + "@endo/import-bundle" "^0.4.2" + "@endo/lockdown" "^0.1.32" + "@endo/promise-kit" "^0.2.60" + "@endo/stream-node" "^0.2.30" + "@endo/where" "^0.3.5" commander "^5.0.0" open "^9.1.0" - ses "^0.18.7" + ses "^0.18.8" "@endo/compartment-mapper@0.8.4": version "0.8.4" @@ -909,7 +914,7 @@ "@endo/zip" "^0.2.32" ses "^0.18.5" -"@endo/compartment-mapper@^0.9.1", "@endo/compartment-mapper@^0.9.2": +"@endo/compartment-mapper@^0.9.2": version "0.9.2" resolved "https://registry.yarnpkg.com/@endo/compartment-mapper/-/compartment-mapper-0.9.2.tgz#48bfa610179cc5521c745c7b2d1eb5fab52ed29a" integrity sha512-zsAyTf87zBsE1yZ2CBzEGhcGZGGv5m93/CXZHQhut53o4DWwhuS/WTQ4cBoVFSGKWz63JbbA/7qa4fcOnv5dDw== @@ -919,7 +924,7 @@ "@endo/zip" "^0.2.35" ses "^0.18.8" -"@endo/daemon@^0.2.5": +"@endo/daemon@^0.2.6": version "0.2.6" resolved "https://registry.yarnpkg.com/@endo/daemon/-/daemon-0.2.6.tgz#c273ab6a108fad0e1a41d3febfaacd2b8c690057" integrity sha512-/xwV9WtrUVog0B/zYUr3vFyLzuagbG0XGhpA3p9E3+wfJOtdzn7qRzHv2aUCD2Q/gv8sSBO6YBgwiSSGAbk4aQ== @@ -945,7 +950,7 @@ resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-0.17.2.tgz#c8710d557c2f57723be05fe99e941cd893acc5d2" integrity sha512-nux02l2yYXXUeUA2PigOO1K0gbVVMYx3prfYrW/G7Ny6PiDLtOyaeMWwKQwFTgJV2yAkOfvycr4LC1+tm7hu/Q== -"@endo/eventual-send@^0.17.2", "@endo/eventual-send@^0.17.5", "@endo/eventual-send@^0.17.6": +"@endo/eventual-send@^0.17.2", "@endo/eventual-send@^0.17.6": version "0.17.6" resolved "https://registry.yarnpkg.com/@endo/eventual-send/-/eventual-send-0.17.6.tgz#86719e4e3ff76991c49f6680309dc77dff65fe55" integrity sha512-73cKY2uiWdzMJn7i284NJyD3K0UKjpksBg/EA2GT8YJa0TgeBczFQIm81vC08itK5gHuDDH2vC5COSGR6hxKIg== @@ -984,7 +989,7 @@ "@endo/base64" "^0.2.31" "@endo/compartment-mapper" "^0.8.4" -"@endo/import-bundle@^0.4.1": +"@endo/import-bundle@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@endo/import-bundle/-/import-bundle-0.4.2.tgz#de047f83aa22a7a3d94b0bbef4bcc5dff8b369cf" integrity sha512-SF08JSa6qO6NEueFVeKW0+w9sfjPvXrJ9L2XrgAHIvvLy9H4qLJxk92G2lfaZSL/dyvovhERhb+An1c0j3rdRw== @@ -1021,7 +1026,7 @@ dependencies: ses "^0.18.4" -"@endo/lockdown@^0.1.28", "@endo/lockdown@^0.1.31", "@endo/lockdown@^0.1.32": +"@endo/lockdown@^0.1.28", "@endo/lockdown@^0.1.32": version "0.1.32" resolved "https://registry.yarnpkg.com/@endo/lockdown/-/lockdown-0.1.32.tgz#2d13a9ca336d5dce243a3cf919c543b55973153c" integrity sha512-AN696XS3robsopxVg7gc/6c9TXPGosGmKfcM0g9SNnD1rqgo1EakS4wf7f3AbICU9iJdo0e4V5JjzWPnjqoR0g== @@ -1117,7 +1122,7 @@ dependencies: ses "^0.18.4" -"@endo/promise-kit@^0.2.56", "@endo/promise-kit@^0.2.59", "@endo/promise-kit@^0.2.60": +"@endo/promise-kit@^0.2.56", "@endo/promise-kit@^0.2.60": version "0.2.60" resolved "https://registry.yarnpkg.com/@endo/promise-kit/-/promise-kit-0.2.60.tgz#8012ada06970c7eaf965cd856563b34a1790e163" integrity sha512-6Zp9BqBbc3ywaG+iLRrQRmO/VLKrMnvsbgOKKPMpjEC3sUlksYA09uaH3GrKZgoGChF8m9bXK8eFW39z7wJNUw== @@ -1162,7 +1167,7 @@ "@endo/stream" "^0.3.25" ses "^0.18.4" -"@endo/stream-node@^0.2.29", "@endo/stream-node@^0.2.30": +"@endo/stream-node@^0.2.30": version "0.2.30" resolved "https://registry.yarnpkg.com/@endo/stream-node/-/stream-node-0.2.30.tgz#4af1989976eaad385663cd2a3342072cf9dbea7c" integrity sha512-KZZJ6MWeTxFYScuuIj5BwGVX6Y5F9+RzW8RhVZy7Najr/irgdGnF/oGk8QeUIHuVzTgL4HLJP+XATnHaLKOcGw== @@ -1189,7 +1194,7 @@ "@endo/promise-kit" "^0.2.60" ses "^0.18.8" -"@endo/where@^0.3.4", "@endo/where@^0.3.5": +"@endo/where@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@endo/where/-/where-0.3.5.tgz#df7661ec38ab6a327ef050aa88b50555876c39ef" integrity sha512-y9agS7UWpSY9YSAAYwtn6sAE7zfU2BmYGOUJpw859WcmRt5ufCRi2XAXDcvIugAUPTsSVPqJj6FO3uZNVRmXPw== @@ -1458,6 +1463,11 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -1674,6 +1684,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + ava@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ava/-/ava-5.3.1.tgz#335737dd963b7941b90214836cea2e8de1f4d5f4" @@ -1912,7 +1927,7 @@ chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1955,7 +1970,7 @@ chunkd@^2.0.1: resolved "https://registry.yarnpkg.com/chunkd/-/chunkd-2.0.1.tgz#49cd1d7b06992dc4f7fccd962fe2a101ee7da920" integrity sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ== -ci-info@^3.8.0: +ci-info@^3.7.0, ci-info@^3.8.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== @@ -2127,6 +2142,11 @@ convert-to-spaces@^2.0.1: resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz#61a6c98f8aa626c16b296b862a91412a33bceb6b" integrity sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ== +cosmic-proto-es@../cosmic-proto-es/: + version "0.1.0" + dependencies: + "@bufbuild/protobuf" "^1.5.0" + cosmjs-types@^0.7.1: version "0.7.2" resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.7.2.tgz#a757371abd340949c5bd5d49c6f8379ae1ffd7e2" @@ -2494,7 +2514,7 @@ eslint@^8.36.0: strip-ansi "^6.0.1" text-table "^0.2.0" -"esm@github:agoric-labs/esm#Agoric-built": +esm@agoric-labs/esm#Agoric-built: version "3.2.25" resolved "https://codeload.github.com/agoric-labs/esm/tar.gz/3603726ad4636b2f865f463188fcaade6375638e" @@ -2700,6 +2720,13 @@ find-up@^6.0.0: locate-path "^7.1.0" path-exists "^5.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + flat-cache@^3.0.4: version "3.2.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" @@ -2745,6 +2772,16 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2909,7 +2946,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3334,7 +3371,7 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -3432,7 +3469,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1, json-stable-stringify@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz#43d39c7c8da34bfaf785a61a56808b0def9f747d" integrity sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA== @@ -3442,6 +3479,15 @@ json-stable-stringify@^1.0.1: jsonify "^0.0.1" object-keys "^1.1.1" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" @@ -3471,6 +3517,13 @@ keyv@^4.5.3: dependencies: json-buffer "3.0.1" +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kuler@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" @@ -3640,7 +3693,7 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromatch@^4.0.4: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -3707,7 +3760,7 @@ minimatch@^9.0.3: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.0, minimist@^1.2.3: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -3873,6 +3926,14 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + open@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" @@ -3997,6 +4058,27 @@ parse-ms@^3.0.0: resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-3.0.0.tgz#3ea24a934913345fcc3656deda72df921da3a70e" integrity sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw== +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4074,6 +4156,11 @@ plur@^5.1.0: dependencies: irregular-plurals "^3.3.0" +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + prebuild-install@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" @@ -4274,6 +4361,13 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -4358,7 +4452,7 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.2, semver@^7.3.5: +semver@^7.3.2, semver@^7.3.5, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -4372,7 +4466,7 @@ serialize-error@^7.0.1: dependencies: type-fest "^0.13.1" -ses@^0.18.4, ses@^0.18.5, ses@^0.18.7, ses@^0.18.8: +ses@^0.18.4, ses@^0.18.5, ses@^0.18.8: version "0.18.8" resolved "https://registry.yarnpkg.com/ses/-/ses-0.18.8.tgz#88036511ac3b3c07e4d82dd8cfc6e5f3788205b6" integrity sha512-kOH1AhJc6gWDXKURKeU1w7iFUdImAegAljVvBg5EUBgNqjH4bxcEsGVUadVEPtA2PVRMyQp1fiSMDwEZkQNj1g== @@ -4467,6 +4561,11 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" @@ -4894,6 +4993,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + untildify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" @@ -5067,6 +5171,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@^2.2.2: + version "2.3.4" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2" + integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== + yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" diff --git a/packages/cosmic-proto-es/CONTRIBUTING.md b/packages/cosmic-proto-es/CONTRIBUTING.md new file mode 100644 index 0000000..e4da404 --- /dev/null +++ b/packages/cosmic-proto-es/CONTRIBUTING.md @@ -0,0 +1 @@ +https://github.com/bufbuild/protobuf-es/tree/main#quickstart diff --git a/packages/cosmic-proto-es/README.md b/packages/cosmic-proto-es/README.md new file mode 100644 index 0000000..dfd39df --- /dev/null +++ b/packages/cosmic-proto-es/README.md @@ -0,0 +1 @@ +# cosmic-proto-es: Agoric cosmic-swingset protobuf stubs in ES modules diff --git a/packages/cosmic-proto-es/buf.gen.yaml b/packages/cosmic-proto-es/buf.gen.yaml new file mode 100644 index 0000000..27e9bd8 --- /dev/null +++ b/packages/cosmic-proto-es/buf.gen.yaml @@ -0,0 +1,6 @@ +# Learn more: https://docs.buf.build/configuration/v1/buf-gen-yaml +version: v1 +plugins: + - plugin: es + # opt: target=ts + out: src/gen diff --git a/packages/cosmic-proto-es/package.json b/packages/cosmic-proto-es/package.json new file mode 100644 index 0000000..4ce164c --- /dev/null +++ b/packages/cosmic-proto-es/package.json @@ -0,0 +1,44 @@ +{ + "name": "cosmic-proto-es", + "version": "0.1.0", + "description": "Agoric cosmic-swingset protobuf stubs in ES modules", + "main": "index.js", + "author": "Dan Connolly", + "license": "Apache 2", + "private": true, + "type": "module", + "exports": { + "./package.json": "./package.json", + "./swingset/msgs.js": { + "types": "./src/gen/agoric/swingset/msgs_pg.d.ts", + "default": "./src/gen/agoric/swingset/msgs_pb.js" + }, + "./swingset/query.js": { + "types": "./src/gen/agoric/swingset/query_pg.d.ts", + "default": "./src/gen/agoric/swingset/query_pb.js" + }, + "./vstorage/query.js": { + "types": "./src/gen/agoric/vstorage/query_pg.d.ts", + "default": "./src/gen/agoric/vstorage/query_pb.js" + }, + "./swingset/swingset.js": { + "types": "./src/gen/agoric/swingset/swingset_pg.d.ts", + "default": "./src/gen/agoric/swingset/swingset_pb.js" + } + }, + "scripts": { + "postinstall": "patch-package", + "test": "node test/sanity-test.js", + "build": "echo Use yarn rebuild to update dist output", + "rebuild": "rm -rf src/gen && yarn generate", + "generate": "buf generate proto" + }, + "devDependencies": { + "@bufbuild/buf": "^1.28.1", + "@bufbuild/protoc-gen-es": "^1.5.0", + "patch-package": "^8.0.0" + }, + "dependencies": { + "@bufbuild/protobuf": "^1.5.0" + } +} diff --git a/packages/cosmic-proto-es/patches/@bufbuild+protobuf+1.5.0.patch b/packages/cosmic-proto-es/patches/@bufbuild+protobuf+1.5.0.patch new file mode 100644 index 0000000..b05057b --- /dev/null +++ b/packages/cosmic-proto-es/patches/@bufbuild+protobuf+1.5.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@bufbuild/protobuf/package.json b/node_modules/@bufbuild/protobuf/package.json +index 81b39d9..177f75e 100644 +--- a/node_modules/@bufbuild/protobuf/package.json ++++ b/node_modules/@bufbuild/protobuf/package.json +@@ -27,7 +27,7 @@ + ".": { + "module": "./dist/esm/index.js", + "require": "./dist/cjs/index.js", +- "import": "./dist/proxy/index.js" ++ "import": "./dist/esm/index.js" + } + }, + "devDependencies": { diff --git a/packages/cosmic-proto-es/proto/agoric/lien/genesis.proto b/packages/cosmic-proto-es/proto/agoric/lien/genesis.proto new file mode 100644 index 0000000..b578695 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/lien/genesis.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package agoric.lien; + +import "gogoproto/gogo.proto"; +import "agoric/lien/lien.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/lien/types"; + +// The initial or exported state. +message GenesisState { + option (gogoproto.equal) = false; + + repeated AccountLien liens = 1 [ + (gogoproto.nullable) = false + ]; +} + +// The lien on a particular account +message AccountLien { + // Account address, bech32-encoded. + string address = 1; + + // The liened amount. Should be nonzero. + Lien lien = 2; +} diff --git a/packages/cosmic-proto-es/proto/agoric/lien/lien.proto b/packages/cosmic-proto-es/proto/agoric/lien/lien.proto new file mode 100644 index 0000000..d66e9c2 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/lien/lien.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package agoric.lien; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/lien/types"; + +// Lien contains the lien state of a particular account. +message Lien { + // coins holds the amount liened + repeated cosmos.base.v1beta1.Coin coins = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"coins\"" + ]; + // delegated tracks the net amount delegated for non-vesting accounts, + // or zero coins for vesting accounts. + // (Vesting accounts have their own fields to track delegation.) + repeated cosmos.base.v1beta1.Coin delegated = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"delegated\"" + ]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/swingset/genesis.proto b/packages/cosmic-proto-es/proto/agoric/swingset/genesis.proto new file mode 100644 index 0000000..8a178e4 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/swingset/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package agoric.swingset; + +import "gogoproto/gogo.proto"; +import "agoric/swingset/swingset.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; + +// The initial or exported state. +message GenesisState { + option (gogoproto.equal) = false; + + Params params = 2 [(gogoproto.nullable) = false]; + + State state = 3 [(gogoproto.nullable) = false]; + + repeated SwingStoreExportDataEntry swing_store_export_data = 4 [ + (gogoproto.jsontag) = "swingStoreExportData" + ]; +} + +// A SwingStore "export data" entry. +message SwingStoreExportDataEntry { + string key = 1; + string value = 2; +} diff --git a/packages/cosmic-proto-es/proto/agoric/swingset/msgs.proto b/packages/cosmic-proto-es/proto/agoric/swingset/msgs.proto new file mode 100644 index 0000000..fcd96c1 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/swingset/msgs.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; +package agoric.swingset; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; + +// Transactions. +service Msg { + // Install a JavaScript sources bundle on the chain's SwingSet controller. + rpc InstallBundle(MsgInstallBundle) returns (MsgInstallBundleResponse); + // Send inbound messages. + rpc DeliverInbound(MsgDeliverInbound) returns (MsgDeliverInboundResponse); + // Perform a low-privilege wallet action. + rpc WalletAction(MsgWalletAction) returns (MsgWalletActionResponse); + // Perform a wallet action that spends assets. + rpc WalletSpendAction(MsgWalletSpendAction) returns (MsgWalletSpendActionResponse); + // Provision a new endpoint. + rpc Provision(MsgProvision) returns (MsgProvisionResponse); +} + +// MsgDeliverInbound defines an SDK message for delivering an eventual send +message MsgDeliverInbound { + option (gogoproto.equal) = false; + + repeated string messages = 1 [ + (gogoproto.jsontag) = "messages", + (gogoproto.moretags) = "yaml:\"messages\"" + ]; + repeated uint64 nums = 2 [ + (gogoproto.jsontag) = "nums", + (gogoproto.moretags) = "yaml:\"nums\"" + ]; + uint64 ack = 3 [ + (gogoproto.jsontag) = "ack", + (gogoproto.moretags) = "yaml:\"ack\"" + ]; + bytes submitter = 4 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "submitter", + (gogoproto.moretags) = "yaml:\"submitter\"" + ]; +} + +// MsgDeliverInboundResponse is an empty reply. +message MsgDeliverInboundResponse {} + +// MsgWalletAction defines an SDK message for the on-chain wallet to perform an +// action that *does not* spend any assets (other than gas fees/stamps). This +// message type is typically protected by feegrant budgets. +message MsgWalletAction { + option (gogoproto.equal) = false; + + bytes owner = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // The action to perform, as JSON-stringified marshalled data. + string action = 2; +} + +// MsgWalletActionResponse is an empty reply. +message MsgWalletActionResponse {} + +// MsgWalletSpendAction defines an SDK message for the on-chain wallet to +// perform an action that *does spend the owner's assets.* This message type is +// typically protected by explicit confirmation by the user. +message MsgWalletSpendAction { + option (gogoproto.equal) = false; + + bytes owner = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // The action to perform, as JSON-stringified marshalled data. + string spend_action = 2; +} + +// MsgWalletSpendActionResponse is an empty reply. +message MsgWalletSpendActionResponse {} + +// MsgProvision defines an SDK message for provisioning a client to the chain +message MsgProvision { + option (gogoproto.equal) = false; + + string nickname = 1 [ + (gogoproto.jsontag) = "nickname", + (gogoproto.moretags) = "yaml:\"nickname\"" + ]; + bytes address = 2 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "address", + (gogoproto.moretags) = "yaml:\"address\"" + ]; + repeated string power_flags = 3 [ + (gogoproto.customname) = "PowerFlags", + (gogoproto.jsontag) = "powerFlags", + (gogoproto.moretags) = "yaml:\"powerFlags\"" + ]; + bytes submitter = 4 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "submitter", + (gogoproto.moretags) = "yaml:\"submitter\"" + ]; +} + +// MsgProvisionResponse is an empty reply. +message MsgProvisionResponse {} + +// MsgInstallBundle carries a signed bundle to SwingSet. +message MsgInstallBundle { + string bundle = 1 [ + (gogoproto.jsontag) = "bundle", + (gogoproto.moretags) = "yaml:\"bundle\"" + ]; + bytes submitter = 2 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "submitter", + (gogoproto.moretags) = "yaml:\"submitter\"" + ]; + // Either bundle or compressed_bundle will be set. + // Default compression algorithm is gzip. + bytes compressed_bundle = 3 [ + (gogoproto.jsontag) = "compressedBundle", + (gogoproto.moretags) = "yaml:\"compressedBundle\"" + ]; + // Size in bytes of uncompression of compressed_bundle. + int64 uncompressed_size = 4 [ + (gogoproto.jsontag) = "uncompressedSize" + ]; +} + +// MsgInstallBundleResponse is an empty acknowledgement that an install bundle +// message has been queued for the SwingSet kernel's consideration. +message MsgInstallBundleResponse {} diff --git a/packages/cosmic-proto-es/proto/agoric/swingset/query.proto b/packages/cosmic-proto-es/proto/agoric/swingset/query.proto new file mode 100644 index 0000000..12cc439 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/swingset/query.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +package agoric.swingset; + +import "gogoproto/gogo.proto"; +import "agoric/swingset/swingset.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; + +// Query provides defines the gRPC querier service +service Query { + // Params queries params of the swingset module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/agoric/swingset/params"; + } + + // Egress queries a provisioned egress. + rpc Egress(QueryEgressRequest) returns (QueryEgressResponse) { + option (google.api.http).get = "/agoric/swingset/egress/{peer}"; + } + + // Return the contents of a peer's outbound mailbox. + rpc Mailbox(QueryMailboxRequest) returns (QueryMailboxResponse) { + option (google.api.http).get = "/agoric/swingset/mailbox/{peer}"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryEgressRequest is the request type for the Query/Egress RPC method +message QueryEgressRequest { + bytes peer = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "peer", + (gogoproto.moretags) = "yaml:\"peer\"" + ]; +} + +// QueryEgressResponse is the egress response. +message QueryEgressResponse { + agoric.swingset.Egress egress = 1; +} + +// QueryMailboxRequest is the mailbox query. +message QueryMailboxRequest { + bytes peer = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "peer", + (gogoproto.moretags) = "yaml:\"peer\"" + ]; +} + +// QueryMailboxResponse is the mailbox response. +message QueryMailboxResponse { + string value = 1 [ + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/swingset/swingset.proto b/packages/cosmic-proto-es/proto/agoric/swingset/swingset.proto new file mode 100644 index 0000000..c1a238e --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/swingset/swingset.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; +package agoric.swingset; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; + +// CoreEvalProposal is a gov Content type for evaluating code in the SwingSet +// core. +// See `agoric-sdk/packages/vats/src/core/eval.js`. +message CoreEvalProposal { + option (gogoproto.goproto_getters) = false; + + string title = 1; + string description = 2; + + // Although evals are sequential, they may run concurrently, since they each + // can return a Promise. + repeated CoreEval evals = 3 [(gogoproto.nullable) = false]; +} + +// CoreEval defines an individual SwingSet core evaluation, for use in +// CoreEvalProposal. +message CoreEval { + // Grant these JSON-stringified core bootstrap permits to the jsCode, as the + // `powers` endowment. + string json_permits = 1 [(gogoproto.moretags) = "yaml:\"json_permits\""]; + + // Evaluate this JavaScript code in a Compartment endowed with `powers` as + // well as some powerless helpers. + string js_code = 2 [(gogoproto.moretags) = "yaml:\"js_code\""]; +} + +// Params are the swingset configuration/governance parameters. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // Map from unit name to a value in SwingSet "beans". + // Must not be negative. + // + // These values are used by SwingSet to normalize named per-resource charges + // (maybe rent) in a single Nat usage unit, the "bean". + // + // There is no required order to this list of entries, but all the chain + // nodes must all serialize and deserialize the existing order without + // permuting it. + repeated StringBeans beans_per_unit = 1 [ + (gogoproto.nullable) = false + ]; + + // The price in Coins per the unit named "fee". This value is used by + // cosmic-swingset JS code to decide how many tokens to charge. + // + // cost = beans_used * fee_unit_price / beans_per_unit["fee"] + repeated cosmos.base.v1beta1.Coin fee_unit_price = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; + + // The SwingSet bootstrap vat configuration file. Not usefully modifiable + // via governance as it is only referenced by the chain's initial + // construction. + string bootstrap_vat_config = 3; + + // If the provision submitter doesn't hold a provisionpass, their requested + // power flags are looked up in this fee menu (first match wins) and the sum + // is charged. If any power flag is not found in this menu, the request is + // rejected. + repeated PowerFlagFee power_flag_fees = 4 [ + (gogoproto.nullable) = false + ]; + + // Maximum sizes for queues. + // These values are used by SwingSet to compute how many messages should be + // accepted in a block. + // + // There is no required order to this list of entries, but all the chain + // nodes must all serialize and deserialize the existing order without + // permuting it. + repeated QueueSize queue_max = 5 [ + (gogoproto.nullable) = false + ]; +} + +// The current state of the module. +message State { + // The allowed number of items to add to queues, as determined by SwingSet. + // Transactions which attempt to enqueue more should be rejected. + repeated QueueSize queue_allowed = 1 [ + (gogoproto.nullable) = false + ]; +} + +// Map element of a string key to a Nat bean count. +message StringBeans { + option (gogoproto.equal) = true; + + // What the beans are for. + string key = 1; + + // The actual bean value. + string beans = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", + (gogoproto.nullable) = false + ]; +} + +// Map a provisioning power flag to its corresponding fee. +message PowerFlagFee { + option (gogoproto.equal) = true; + + string power_flag = 1; + repeated cosmos.base.v1beta1.Coin fee = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} + +// Map element of a string key to a size. +message QueueSize { + option (gogoproto.equal) = true; + + // What the size is for. + string key = 1; + + // The actual size value. + int32 size = 2; +} + +// Egress is the format for a swingset egress. +message Egress { + option (gogoproto.equal) = false; + + string nickname = 1 [ + (gogoproto.jsontag) = "nickname", + (gogoproto.moretags) = "yaml:\"nickname\"" + ]; + bytes peer = 2 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "peer", + (gogoproto.moretags) = "yaml:\"peer\"" + ]; + // TODO: Remove these power flags as they are deprecated and have no effect. + repeated string power_flags = 3 [ + (gogoproto.customname) = "PowerFlags", + (gogoproto.jsontag) = "powerFlags", + (gogoproto.moretags) = "yaml:\"powerFlags\"" + ]; +} + +// SwingStoreArtifact encodes an artifact of a swing-store export. +// Artifacts may be stored or transmitted in any order. Most handlers do +// maintain the artifact order from their original source as an effect of how +// they handle the artifacts. +message SwingStoreArtifact { + option (gogoproto.equal) = false; + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + + bytes data = 2 [ + (gogoproto.jsontag) = "data", + (gogoproto.moretags) = "yaml:\"data\"" + ]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vbank/genesis.proto b/packages/cosmic-proto-es/proto/agoric/vbank/genesis.proto new file mode 100644 index 0000000..b28b6b4 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vbank/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package agoric.vbank; + +import "gogoproto/gogo.proto"; +import "agoric/vbank/vbank.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"; + +// The initial and exported module state. +message GenesisState { + option (gogoproto.equal) = false; + + // parms defines all the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // state is the current operation state. + State state = 2 [(gogoproto.nullable) = false]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vbank/msgs.proto b/packages/cosmic-proto-es/proto/agoric/vbank/msgs.proto new file mode 100644 index 0000000..fc81401 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vbank/msgs.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; +package agoric.vbank; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"; + +// No transactions. +service Msg { +} diff --git a/packages/cosmic-proto-es/proto/agoric/vbank/query.proto b/packages/cosmic-proto-es/proto/agoric/vbank/query.proto new file mode 100644 index 0000000..3363c95 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vbank/query.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package agoric.vbank; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "agoric/vbank/vbank.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"; + +// Query defines the gRPC querier service for vbank module. +service Query { + // Params queries params of the vbank module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/agoric/vbank/params"; + } + + // State queries current state of the vbank module. + rpc State(QueryStateRequest) returns (QueryStateResponse) { + option (google.api.http).get = "/agoric/vbank/state"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryStateRequest is the request type for the Query/State RPC method. +message QueryStateRequest {} + +// QueryStateResponse is the response type for the Query/State RPC method. +message QueryStateResponse { + // state defines the parameters of the module. + State state = 1 [(gogoproto.nullable) = false]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vbank/vbank.proto b/packages/cosmic-proto-es/proto/agoric/vbank/vbank.proto new file mode 100644 index 0000000..7884abe --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vbank/vbank.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; +package agoric.vbank; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"; + +// The module governance/configuration parameters. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // reward_epoch_duration_blocks is the length of a reward epoch, in blocks. + // A value of zero has the same meaning as a value of one: + // the full reward buffer should be distributed immediately. + int64 reward_epoch_duration_blocks = 1 [ + (gogoproto.moretags) = "yaml:\"reward_epoch_duration_blocks\"" + ]; + + // per_epoch_reward_fraction is a fraction of the reward pool to distrubute + // once every reward epoch. If less than zero, use approximately continuous + // per-block distribution. + string per_epoch_reward_fraction = 2 [ + (gogoproto.moretags) = "yaml:\"discrete_epoch_reward_fraction\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + + // reward_smoothing_blocks is the number of blocks over which to distribute + // an epoch's rewards. If zero, use the same value as + // reward_epoch_duration_blocks. + int64 reward_smoothing_blocks = 3 [ + (gogoproto.moretags) = "yaml:\"reward_smoothing_blocks\"" + ]; +} + +// The current state of the module. +message State { + option (gogoproto.equal) = true; + + // rewardPool is the current balance of rewards in the module account. + // NOTE: Tracking manually since there is no bank call for getting a + // module account balance by name. + repeated cosmos.base.v1beta1.Coin reward_pool = 1 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"reward_pool\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // reward_block_amount is the amount of reward, if available, to send to the + // fee collector module on every block. + repeated cosmos.base.v1beta1.Coin reward_block_amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"reward_block_amount\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // last_sequence is a sequence number for communicating with the VM. + uint64 last_sequence = 3 [ + (gogoproto.moretags) = "yaml:\"last_sequence\"" + ]; + + int64 last_reward_distribution_block = 4 [ + (gogoproto.moretags) = "yaml:\"last_reward_distribution_block\"" + ]; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vibc/msgs.proto b/packages/cosmic-proto-es/proto/agoric/vibc/msgs.proto new file mode 100644 index 0000000..9f415a5 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vibc/msgs.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package agoric.vibc; + +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vibc/types"; + +// The module transactions. +service Msg { + // Force sending an arbitrary packet on a channel. + rpc SendPacket(MsgSendPacket) returns (MsgSendPacketResponse); +} + +// MsgSendPacket is an SDK message for sending an outgoing IBC packet +message MsgSendPacket { + option (gogoproto.equal) = false; + + ibc.core.channel.v1.Packet packet = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "packet", + (gogoproto.moretags) = "yaml:\"packet\"" + ]; + bytes sender = 2 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.jsontag) = "submitter", + (gogoproto.moretags) = "yaml:\"submitter\"" + ]; +} + +// Empty response for SendPacket. +message MsgSendPacketResponse {} diff --git a/packages/cosmic-proto-es/proto/agoric/vstorage/genesis.proto b/packages/cosmic-proto-es/proto/agoric/vstorage/genesis.proto new file mode 100644 index 0000000..da621b1 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vstorage/genesis.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package agoric.vstorage; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage/types"; + +// The initial or exported state. +message GenesisState { + option (gogoproto.equal) = false; + + repeated DataEntry data = 1 [ + (gogoproto.jsontag) = "data", + (gogoproto.moretags) = "yaml:\"data\"" + ]; +} + +// A vstorage entry. The only necessary entries are those with data, as the +// ancestor nodes are reconstructed on import. +message DataEntry { + // A "."-separated path with individual path elements matching + // `[-_A-Za-z0-9]+` + string path = 1; + string value = 2; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vstorage/query.proto b/packages/cosmic-proto-es/proto/agoric/vstorage/query.proto new file mode 100644 index 0000000..462b7a8 --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vstorage/query.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; +package agoric.vstorage; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage/types"; + +// Query defines the gRPC querier service +service Query { + // Return the raw string value of an arbitrary vstorage datum. + rpc Data(QueryDataRequest) returns (QueryDataResponse) { + option (google.api.http).get = "/agoric/vstorage/data/{path}"; + } + + // Return a formatted representation of a vstorage datum that must be + // a valid StreamCell with CapData values, or standalone CapData. + rpc CapData(QueryCapDataRequest) + returns (QueryCapDataResponse) { + option (google.api.http).get = "/agoric/vstorage/capdata/{path}"; + } + + // Return the children of a given vstorage path. + rpc Children(QueryChildrenRequest) + returns (QueryChildrenResponse) { + option (google.api.http).get = "/agoric/vstorage/children/{path}"; + } +} + +// QueryDataRequest is the vstorage path data query. +message QueryDataRequest { + string path = 1 [ + (gogoproto.jsontag) = "path", + (gogoproto.moretags) = "yaml:\"path\"" + ]; +} + +// QueryDataResponse is the vstorage path data response. +message QueryDataResponse { + string value = 1 [ + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; +} + +// QueryCapDataRequest contains a path and formatting configuration. +message QueryCapDataRequest { + string path = 1 [ + (gogoproto.jsontag) = "path", + (gogoproto.moretags) = "yaml:\"path\"" + ]; + // mediaType must be an actual media type in the registry at + // https://www.iana.org/assignments/media-types/media-types.xhtml + // or a special value that does not conflict with the media type syntax. + // The only valid value is "JSON Lines", which is also the default. + string media_type = 2 [ + (gogoproto.jsontag) = "mediaType", + (gogoproto.moretags) = "yaml:\"mediaType\"" + ]; + // itemFormat, if present, must be the special value "flat" to indicate that + // the deep structure of each item should be flattened into a single level + // with kebab-case keys (e.g., `{ "metrics": { "min": 0, "max": 88 } }` as + // `{ "metrics-min": 0, "metrics-max": 88 }`). + string item_format = 3 [ + (gogoproto.jsontag) = "itemFormat", + (gogoproto.moretags) = "yaml:\"itemFormat\"" + ]; + // remotableValueFormat indicates how to transform references to opaque but + // distinguishable Remotables into readable embedded representations. + // * "object" represents each Remotable as an `{ id, allegedName }` object, e.g. `{ "id": "board007", "allegedName": "IST brand" }`. + // * "string" represents each Remotable as a string with bracket-wrapped contents including its alleged name and id, e.g. "[Alleged: IST brand ]". + string remotable_value_format = 10 [ + (gogoproto.jsontag) = "remotableValueFormat", + (gogoproto.moretags) = "yaml:\"remotableValueFormat\"" + ]; +} + +// QueryCapDataResponse represents the result with the requested formatting, +// reserving space for future metadata such as media type. +message QueryCapDataResponse { + string block_height = 1 [ + (gogoproto.jsontag) = "blockHeight", + (gogoproto.moretags) = "yaml:\"blockHeight\"" + ]; + string value = 10 [ + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; +} + +// QueryChildrenRequest is the vstorage path children query. +message QueryChildrenRequest { + string path = 1 [ + (gogoproto.jsontag) = "path", + (gogoproto.moretags) = "yaml:\"path\"" + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryChildrenResponse is the vstorage path children response. +message QueryChildrenResponse { + repeated string children = 1 [ + (gogoproto.jsontag) = "children", + (gogoproto.moretags) = "yaml:\"children\"" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/packages/cosmic-proto-es/proto/agoric/vstorage/vstorage.proto b/packages/cosmic-proto-es/proto/agoric/vstorage/vstorage.proto new file mode 100644 index 0000000..6270aec --- /dev/null +++ b/packages/cosmic-proto-es/proto/agoric/vstorage/vstorage.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package agoric.vstorage; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage/types"; + +// Data is the vstorage node data. +message Data { + option (gogoproto.equal) = false; + + string value = 1 [ + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; +} + +// Children are the immediate names (just one level deep) of subnodes leading to +// more data from a given vstorage node. +message Children { + option (gogoproto.equal) = false; + + repeated string children = 1 [ + (gogoproto.jsontag) = "children", + (gogoproto.moretags) = "yaml:\"children\"" + ]; +} diff --git a/packages/cosmic-proto-es/proto/cosmos/base/query/v1beta1/pagination.proto b/packages/cosmic-proto-es/proto/cosmos/base/query/v1beta1/pagination.proto new file mode 100644 index 0000000..784c479 --- /dev/null +++ b/packages/cosmic-proto-es/proto/cosmos/base/query/v1beta1/pagination.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.base.query.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest pagination = 2; +// } +message PageRequest { + // key is a value returned in PageResponse.next_key to begin + // querying the next page most efficiently. Only one of offset or key + // should be set. + bytes key = 1; + + // 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. + uint64 offset = 2; + + // 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. + uint64 limit = 3; + + // 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. + bool count_total = 4; + + // reverse is set to true if results are to be returned in the descending order. + bool reverse = 5; +} + +// 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; +// } +message PageResponse { + // next_key is the key to be passed to PageRequest.key to + // query the next page most efficiently + bytes next_key = 1; + + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + uint64 total = 2; +} diff --git a/packages/cosmic-proto-es/proto/cosmos/base/v1beta1/coin.proto b/packages/cosmic-proto-es/proto/cosmos/base/v1beta1/coin.proto new file mode 100644 index 0000000..fab7528 --- /dev/null +++ b/packages/cosmic-proto-es/proto/cosmos/base/v1beta1/coin.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cosmos.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; + +// 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. +message Coin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// 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. +message DecCoin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} + +// IntProto defines a Protobuf wrapper around an Int object. +message IntProto { + string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecProto defines a Protobuf wrapper around a Dec object. +message DecProto { + string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} diff --git a/packages/cosmic-proto-es/proto/cosmos/upgrade/v1beta1/upgrade.proto b/packages/cosmic-proto-es/proto/cosmos/upgrade/v1beta1/upgrade.proto new file mode 100644 index 0000000..4e1d69a --- /dev/null +++ b/packages/cosmic-proto-es/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; +option (gogoproto.goproto_getters_all) = false; + +// Plan specifies information about a planned upgrade and when it should occur. +message Plan { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // Sets the name for the upgrade. This name will be used by the upgraded + // version of the software to apply any special "on-upgrade" commands during + // the first BeginBlock method after the upgrade is applied. It is also used + // to detect whether a software version can handle a given upgrade. If no + // upgrade handler with this name has been set in the software, it will be + // assumed that the software is out-of-date when the upgrade Time or Height is + // reached and the software will exit. + string name = 1; + + // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + // has been removed from the SDK. + // If this field is not empty, an error will be thrown. + google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + // The height at which the upgrade must be performed. + // Only used if Time is not set. + int64 height = 3; + + // Any application specific upgrade info to be included on-chain + // such as a git commit that validators could automatically upgrade to + string info = 4; + + // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + // moved to the IBC module in the sub module 02-client. + // If this field is not empty, an error will be thrown. + google.protobuf.Any upgraded_client_state = 5 + [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; +} + +// SoftwareUpgradeProposal is a gov Content type for initiating a software +// upgrade. +message SoftwareUpgradeProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + Plan plan = 3 [(gogoproto.nullable) = false]; +} + +// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +// upgrade. +message CancelSoftwareUpgradeProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; +} + +// ModuleVersion specifies a module and its consensus version. +message ModuleVersion { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = true; + + // name of the app module + string name = 1; + + // consensus version of the app module + uint64 version = 2; +} diff --git a/packages/cosmic-proto-es/proto/gogoproto/gogo.proto b/packages/cosmic-proto-es/proto/gogoproto/gogo.proto new file mode 100644 index 0000000..49e78f9 --- /dev/null +++ b/packages/cosmic-proto-es/proto/gogoproto/gogo.proto @@ -0,0 +1,145 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; +} diff --git a/packages/cosmic-proto-es/proto/google/api/annotations.proto b/packages/cosmic-proto-es/proto/google/api/annotations.proto new file mode 100644 index 0000000..85c361b --- /dev/null +++ b/packages/cosmic-proto-es/proto/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/packages/cosmic-proto-es/proto/google/api/http.proto b/packages/cosmic-proto-es/proto/google/api/http.proto new file mode 100644 index 0000000..2bd3a19 --- /dev/null +++ b/packages/cosmic-proto-es/proto/google/api/http.proto @@ -0,0 +1,318 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parmeters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// `HttpRule` defines the mapping of an RPC method to one or more HTTP +// REST API methods. The mapping specifies how different portions of the RPC +// request message are mapped to URL path, URL query parameters, and +// HTTP request body. The mapping is typically specified as an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. +// +// The mapping consists of a field specifying the path template and +// method kind. The path template can refer to fields in the request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped +// } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be referenced +// from a path pattern. Fields mapped to the path pattern cannot be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to HTTP parameters must have a +// primitive type or a repeated primitive type. Message types are not +// allowed. In the case of a repeated type, the parameter can be +// repeated in the URL, as in `...?param=A¶m=B`. +// +// For HTTP method kinds which allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice of +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// +// This enables the following two alternative HTTP JSON to RPC +// mappings: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: +// +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) fields. +// 4. Any body sent with an HTTP request can contain only (b) fields. +// +// The syntax of the path template is as follows: +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single path segment. The syntax `**` matches zero +// or more path segments, which must be the last part of the path except the +// `Verb`. The syntax `LITERAL` matches literal text in the path. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path, all characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the +// Discovery Document as `{var}`. +// +// If a variable contains one or more path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path, all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables +// show up in the Discovery Document as `{+var}`. +// +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** match +// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. +// +// NOTE: the field paths in variables and in the `body` must not refer to +// repeated fields or map fields. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP body, or + // `*` for mapping all fields not captured by the path pattern to the HTTP + // body. NOTE: the referred field must not be a repeated field and must be + // present at the top-level of request message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/packages/cosmic-proto-es/proto/google/api/httpbody.proto b/packages/cosmic-proto-es/proto/google/api/httpbody.proto new file mode 100644 index 0000000..4428515 --- /dev/null +++ b/packages/cosmic-proto-es/proto/google/api/httpbody.proto @@ -0,0 +1,78 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} \ No newline at end of file diff --git a/packages/cosmic-proto-es/proto/google/protobuf/any.proto b/packages/cosmic-proto-es/proto/google/protobuf/any.proto new file mode 100644 index 0000000..a4b7c28 --- /dev/null +++ b/packages/cosmic-proto-es/proto/google/protobuf/any.proto @@ -0,0 +1,161 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "gogoproto/gogo.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/any"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: 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" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; + + option (gogoproto.typedecl) = false; +} + +option (gogoproto.goproto_registration) = false; diff --git a/packages/cosmic-proto-es/proto/ibc/core/channel/v1/channel.proto b/packages/cosmic-proto-es/proto/ibc/core/channel/v1/channel.proto new file mode 100644 index 0000000..68c6ec1 --- /dev/null +++ b/packages/cosmic-proto-es/proto/ibc/core/channel/v1/channel.proto @@ -0,0 +1,148 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; + +// 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. +message Channel { + option (gogoproto.goproto_getters) = false; + + // current state of the channel end + State state = 1; + // whether the channel is ordered or unordered + Order ordering = 2; + // counterparty channel end + Counterparty counterparty = 3 [(gogoproto.nullable) = false]; + // list of connection identifiers, in order, along which packets sent on + // this channel will travel + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + // opaque channel version, which is agreed upon during the handshake + string version = 5; +} + +// IdentifiedChannel defines a channel with additional port and channel +// identifier fields. +message IdentifiedChannel { + option (gogoproto.goproto_getters) = false; + + // current state of the channel end + State state = 1; + // whether the channel is ordered or unordered + Order ordering = 2; + // counterparty channel end + Counterparty counterparty = 3 [(gogoproto.nullable) = false]; + // list of connection identifiers, in order, along which packets sent on + // this channel will travel + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + // opaque channel version, which is agreed upon during the handshake + string version = 5; + // port identifier + string port_id = 6; + // channel identifier + string channel_id = 7; +} + +// State defines if a channel is in one of the following states: +// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. +enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Default State + STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; + // A channel has just started the opening handshake. + STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; + // A channel has acknowledged the handshake step on the counterparty chain. + STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; + // A channel has completed the handshake. Open channels are + // ready to send and receive packets. + STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; + // A channel has been closed and can no longer be used to send or receive + // packets. + STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; +} + +// Order defines if a channel is ORDERED or UNORDERED +enum Order { + option (gogoproto.goproto_enum_prefix) = false; + + // zero-value for channel ordering + ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; + // packets can be delivered in any order, which may differ from the order in + // which they were sent. + ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; + // packets are delivered exactly in the order which they were sent + ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; +} + +// Counterparty defines a channel end counterparty +message Counterparty { + option (gogoproto.goproto_getters) = false; + + // port on the counterparty chain which owns the other end of the channel. + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel end on the counterparty chain + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// Packet defines a type that carries data across different chains through IBC +message Packet { + option (gogoproto.goproto_getters) = false; + + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + uint64 sequence = 1; + // identifies the port on the sending chain. + string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; + // identifies the channel end on the sending chain. + string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; + // identifies the port on the receiving chain. + string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; + // identifies the channel end on the receiving chain. + string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; + // actual opaque bytes transferred directly to the application module + bytes data = 6; + // block height after which the packet times out + ibc.core.client.v1.Height timeout_height = 7 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; + // block timestamp (in nanoseconds) after which the packet times out + uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; +} + +// 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. +message PacketState { + option (gogoproto.goproto_getters) = false; + + // channel port identifier. + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel unique identifier. + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // packet sequence. + uint64 sequence = 3; + // embedded data that represents packet state. + bytes data = 4; +} + +// Acknowledgement is the recommended acknowledgement format to be used by +// app-specific protocols. +// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental +// conflicts with other protobuf message formats used for acknowledgements. +// The first byte of any message with this format will be the non-ASCII values +// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: +// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope +message Acknowledgement { + // response contains either a result or an error and must be non-empty + oneof response { + bytes result = 21; + string error = 22; + } +} diff --git a/packages/cosmic-proto-es/proto/ibc/core/client/v1/client.proto b/packages/cosmic-proto-es/proto/ibc/core/client/v1/client.proto new file mode 100644 index 0000000..91ad0c9 --- /dev/null +++ b/packages/cosmic-proto-es/proto/ibc/core/client/v1/client.proto @@ -0,0 +1,100 @@ +syntax = "proto3"; + +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; + +// IdentifiedClientState defines a client state with an additional client +// identifier field. +message IdentifiedClientState { + // client identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // client state + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; +} + +// ConsensusStateWithHeight defines a consensus state with an additional height +// field. +message ConsensusStateWithHeight { + // consensus state height + Height height = 1 [(gogoproto.nullable) = false]; + // consensus state + google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""]; +} + +// ClientConsensusStates defines all the stored consensus states for a given +// client. +message ClientConsensusStates { + // client identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // consensus states and their heights associated with the client + repeated ConsensusStateWithHeight consensus_states = 2 + [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; +} + +// ClientUpdateProposal is a governance proposal. If it passes, the substitute +// client's latest consensus state is copied over to the subject client. The proposal +// handler may fail if the subject and the substitute do not match in client and +// chain parameters (with exception to latest height, frozen height, and chain-id). +message ClientUpdateProposal { + option (gogoproto.goproto_getters) = false; + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; + // the client identifier for the client to be updated if the proposal passes + string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; + // the substitute client identifier for the client standing in for the subject + // client + string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"substitute_client_id\""]; +} + +// UpgradeProposal is a gov Content type for initiating an IBC breaking +// upgrade. +message UpgradeProposal { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; + cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; + + // An UpgradedClientState must be provided to perform an IBC breaking upgrade. + // This will make the chain commit to the correct upgraded (self) client state + // before the upgrade occurs, so that connecting chains can verify that the + // new upgraded client is valid by verifying a proof on the previous version + // of the chain. This will allow IBC connections to persist smoothly across + // planned chain upgrades + google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; +} + +// Height is a monotonically increasing data type +// that can be compared against another Height for the purposes of updating and +// freezing clients +// +// Normally the RevisionHeight is incremented at each height while keeping +// RevisionNumber the same. However some consensus algorithms may choose to +// reset the height in certain conditions e.g. hard forks, state-machine +// breaking changes In these cases, the RevisionNumber is incremented so that +// height continues to be monitonically increasing even as the RevisionHeight +// gets reset +message Height { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + // the revision that the client is currently on + uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; + // the height within the given revision + uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; +} + +// Params defines the set of IBC light client parameters. +message Params { + // allowed_clients defines the list of allowed client state types. + repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; +} diff --git a/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.d.ts new file mode 100644 index 0000000..956fe11 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.d.ts @@ -0,0 +1,70 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/lien/genesis.proto (package agoric.lien, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Lien } from "./lien_pb.js"; + +/** + * The initial or exported state. + * + * @generated from message agoric.lien.GenesisState + */ +export declare class GenesisState extends Message { + /** + * @generated from field: repeated agoric.lien.AccountLien liens = 1; + */ + liens: AccountLien[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.lien.GenesisState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GenesisState; + + static fromJson(jsonValue: JsonValue, options?: Partial): GenesisState; + + static fromJsonString(jsonString: string, options?: Partial): GenesisState; + + static equals(a: GenesisState | PlainMessage | undefined, b: GenesisState | PlainMessage | undefined): boolean; +} + +/** + * The lien on a particular account + * + * @generated from message agoric.lien.AccountLien + */ +export declare class AccountLien extends Message { + /** + * Account address, bech32-encoded. + * + * @generated from field: string address = 1; + */ + address: string; + + /** + * The liened amount. Should be nonzero. + * + * @generated from field: agoric.lien.Lien lien = 2; + */ + lien?: Lien; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.lien.AccountLien"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AccountLien; + + static fromJson(jsonValue: JsonValue, options?: Partial): AccountLien; + + static fromJsonString(jsonString: string, options?: Partial): AccountLien; + + static equals(a: AccountLien | PlainMessage | undefined, b: AccountLien | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.js b/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.js new file mode 100644 index 0000000..008264f --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/lien/genesis_pb.js @@ -0,0 +1,33 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/lien/genesis.proto (package agoric.lien, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Lien } from "./lien_pb.js"; + +/** + * The initial or exported state. + * + * @generated from message agoric.lien.GenesisState + */ +export const GenesisState = proto3.makeMessageType( + "agoric.lien.GenesisState", + () => [ + { no: 1, name: "liens", kind: "message", T: AccountLien, repeated: true }, + ], +); + +/** + * The lien on a particular account + * + * @generated from message agoric.lien.AccountLien + */ +export const AccountLien = proto3.makeMessageType( + "agoric.lien.AccountLien", + () => [ + { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lien", kind: "message", T: Lien }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.d.ts new file mode 100644 index 0000000..8b7d380 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.d.ts @@ -0,0 +1,46 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/lien/lien.proto (package agoric.lien, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * Lien contains the lien state of a particular account. + * + * @generated from message agoric.lien.Lien + */ +export declare class Lien extends Message { + /** + * coins holds the amount liened + * + * @generated from field: repeated cosmos.base.v1beta1.Coin coins = 1; + */ + coins: Coin[]; + + /** + * delegated tracks the net amount delegated for non-vesting accounts, + * or zero coins for vesting accounts. + * (Vesting accounts have their own fields to track delegation.) + * + * @generated from field: repeated cosmos.base.v1beta1.Coin delegated = 2; + */ + delegated: Coin[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.lien.Lien"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Lien; + + static fromJson(jsonValue: JsonValue, options?: Partial): Lien; + + static fromJsonString(jsonString: string, options?: Partial): Lien; + + static equals(a: Lien | PlainMessage | undefined, b: Lien | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.js b/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.js new file mode 100644 index 0000000..1988e86 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/lien/lien_pb.js @@ -0,0 +1,21 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/lien/lien.proto (package agoric.lien, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * Lien contains the lien state of a particular account. + * + * @generated from message agoric.lien.Lien + */ +export const Lien = proto3.makeMessageType( + "agoric.lien.Lien", + () => [ + { no: 1, name: "coins", kind: "message", T: Coin, repeated: true }, + { no: 2, name: "delegated", kind: "message", T: Coin, repeated: true }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.d.ts new file mode 100644 index 0000000..cbf0815 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.d.ts @@ -0,0 +1,76 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/genesis.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Params, State } from "./swingset_pb.js"; + +/** + * The initial or exported state. + * + * @generated from message agoric.swingset.GenesisState + */ +export declare class GenesisState extends Message { + /** + * @generated from field: agoric.swingset.Params params = 2; + */ + params?: Params; + + /** + * @generated from field: agoric.swingset.State state = 3; + */ + state?: State; + + /** + * @generated from field: repeated agoric.swingset.SwingStoreExportDataEntry swing_store_export_data = 4; + */ + swingStoreExportData: SwingStoreExportDataEntry[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.GenesisState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GenesisState; + + static fromJson(jsonValue: JsonValue, options?: Partial): GenesisState; + + static fromJsonString(jsonString: string, options?: Partial): GenesisState; + + static equals(a: GenesisState | PlainMessage | undefined, b: GenesisState | PlainMessage | undefined): boolean; +} + +/** + * A SwingStore "export data" entry. + * + * @generated from message agoric.swingset.SwingStoreExportDataEntry + */ +export declare class SwingStoreExportDataEntry extends Message { + /** + * @generated from field: string key = 1; + */ + key: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.SwingStoreExportDataEntry"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SwingStoreExportDataEntry; + + static fromJson(jsonValue: JsonValue, options?: Partial): SwingStoreExportDataEntry; + + static fromJsonString(jsonString: string, options?: Partial): SwingStoreExportDataEntry; + + static equals(a: SwingStoreExportDataEntry | PlainMessage | undefined, b: SwingStoreExportDataEntry | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.js b/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.js new file mode 100644 index 0000000..b7235de --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/genesis_pb.js @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/genesis.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Params, State } from "./swingset_pb.js"; + +/** + * The initial or exported state. + * + * @generated from message agoric.swingset.GenesisState + */ +export const GenesisState = proto3.makeMessageType( + "agoric.swingset.GenesisState", + () => [ + { no: 2, name: "params", kind: "message", T: Params }, + { no: 3, name: "state", kind: "message", T: State }, + { no: 4, name: "swing_store_export_data", kind: "message", T: SwingStoreExportDataEntry, repeated: true }, + ], +); + +/** + * A SwingStore "export data" entry. + * + * @generated from message agoric.swingset.SwingStoreExportDataEntry + */ +export const SwingStoreExportDataEntry = proto3.makeMessageType( + "agoric.swingset.SwingStoreExportDataEntry", + () => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.d.ts new file mode 100644 index 0000000..9de045d --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.d.ts @@ -0,0 +1,312 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/msgs.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * MsgDeliverInbound defines an SDK message for delivering an eventual send + * + * @generated from message agoric.swingset.MsgDeliverInbound + */ +export declare class MsgDeliverInbound extends Message { + /** + * @generated from field: repeated string messages = 1; + */ + messages: string[]; + + /** + * @generated from field: repeated uint64 nums = 2; + */ + nums: bigint[]; + + /** + * @generated from field: uint64 ack = 3; + */ + ack: bigint; + + /** + * @generated from field: bytes submitter = 4; + */ + submitter: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgDeliverInbound"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgDeliverInbound; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgDeliverInbound; + + static fromJsonString(jsonString: string, options?: Partial): MsgDeliverInbound; + + static equals(a: MsgDeliverInbound | PlainMessage | undefined, b: MsgDeliverInbound | PlainMessage | undefined): boolean; +} + +/** + * MsgDeliverInboundResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgDeliverInboundResponse + */ +export declare class MsgDeliverInboundResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgDeliverInboundResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgDeliverInboundResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgDeliverInboundResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgDeliverInboundResponse; + + static equals(a: MsgDeliverInboundResponse | PlainMessage | undefined, b: MsgDeliverInboundResponse | PlainMessage | undefined): boolean; +} + +/** + * MsgWalletAction defines an SDK message for the on-chain wallet to perform an + * action that *does not* spend any assets (other than gas fees/stamps). This + * message type is typically protected by feegrant budgets. + * + * @generated from message agoric.swingset.MsgWalletAction + */ +export declare class MsgWalletAction extends Message { + /** + * @generated from field: bytes owner = 1; + */ + owner: Uint8Array; + + /** + * The action to perform, as JSON-stringified marshalled data. + * + * @generated from field: string action = 2; + */ + action: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgWalletAction"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgWalletAction; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgWalletAction; + + static fromJsonString(jsonString: string, options?: Partial): MsgWalletAction; + + static equals(a: MsgWalletAction | PlainMessage | undefined, b: MsgWalletAction | PlainMessage | undefined): boolean; +} + +/** + * MsgWalletActionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgWalletActionResponse + */ +export declare class MsgWalletActionResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgWalletActionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgWalletActionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgWalletActionResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgWalletActionResponse; + + static equals(a: MsgWalletActionResponse | PlainMessage | undefined, b: MsgWalletActionResponse | PlainMessage | undefined): boolean; +} + +/** + * MsgWalletSpendAction defines an SDK message for the on-chain wallet to + * perform an action that *does spend the owner's assets.* This message type is + * typically protected by explicit confirmation by the user. + * + * @generated from message agoric.swingset.MsgWalletSpendAction + */ +export declare class MsgWalletSpendAction extends Message { + /** + * @generated from field: bytes owner = 1; + */ + owner: Uint8Array; + + /** + * The action to perform, as JSON-stringified marshalled data. + * + * @generated from field: string spend_action = 2; + */ + spendAction: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgWalletSpendAction"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgWalletSpendAction; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgWalletSpendAction; + + static fromJsonString(jsonString: string, options?: Partial): MsgWalletSpendAction; + + static equals(a: MsgWalletSpendAction | PlainMessage | undefined, b: MsgWalletSpendAction | PlainMessage | undefined): boolean; +} + +/** + * MsgWalletSpendActionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgWalletSpendActionResponse + */ +export declare class MsgWalletSpendActionResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgWalletSpendActionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgWalletSpendActionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgWalletSpendActionResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgWalletSpendActionResponse; + + static equals(a: MsgWalletSpendActionResponse | PlainMessage | undefined, b: MsgWalletSpendActionResponse | PlainMessage | undefined): boolean; +} + +/** + * MsgProvision defines an SDK message for provisioning a client to the chain + * + * @generated from message agoric.swingset.MsgProvision + */ +export declare class MsgProvision extends Message { + /** + * @generated from field: string nickname = 1; + */ + nickname: string; + + /** + * @generated from field: bytes address = 2; + */ + address: Uint8Array; + + /** + * @generated from field: repeated string power_flags = 3; + */ + powerFlags: string[]; + + /** + * @generated from field: bytes submitter = 4; + */ + submitter: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgProvision"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgProvision; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgProvision; + + static fromJsonString(jsonString: string, options?: Partial): MsgProvision; + + static equals(a: MsgProvision | PlainMessage | undefined, b: MsgProvision | PlainMessage | undefined): boolean; +} + +/** + * MsgProvisionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgProvisionResponse + */ +export declare class MsgProvisionResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgProvisionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgProvisionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgProvisionResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgProvisionResponse; + + static equals(a: MsgProvisionResponse | PlainMessage | undefined, b: MsgProvisionResponse | PlainMessage | undefined): boolean; +} + +/** + * MsgInstallBundle carries a signed bundle to SwingSet. + * + * @generated from message agoric.swingset.MsgInstallBundle + */ +export declare class MsgInstallBundle extends Message { + /** + * @generated from field: string bundle = 1; + */ + bundle: string; + + /** + * @generated from field: bytes submitter = 2; + */ + submitter: Uint8Array; + + /** + * Either bundle or compressed_bundle will be set. + * Default compression algorithm is gzip. + * + * @generated from field: bytes compressed_bundle = 3; + */ + compressedBundle: Uint8Array; + + /** + * Size in bytes of uncompression of compressed_bundle. + * + * @generated from field: int64 uncompressed_size = 4; + */ + uncompressedSize: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgInstallBundle"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgInstallBundle; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgInstallBundle; + + static fromJsonString(jsonString: string, options?: Partial): MsgInstallBundle; + + static equals(a: MsgInstallBundle | PlainMessage | undefined, b: MsgInstallBundle | PlainMessage | undefined): boolean; +} + +/** + * MsgInstallBundleResponse is an empty acknowledgement that an install bundle + * message has been queued for the SwingSet kernel's consideration. + * + * @generated from message agoric.swingset.MsgInstallBundleResponse + */ +export declare class MsgInstallBundleResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.MsgInstallBundleResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgInstallBundleResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgInstallBundleResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgInstallBundleResponse; + + static equals(a: MsgInstallBundleResponse | PlainMessage | undefined, b: MsgInstallBundleResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.js b/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.js new file mode 100644 index 0000000..a7e3410 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/msgs_pb.js @@ -0,0 +1,133 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/msgs.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * MsgDeliverInbound defines an SDK message for delivering an eventual send + * + * @generated from message agoric.swingset.MsgDeliverInbound + */ +export const MsgDeliverInbound = proto3.makeMessageType( + "agoric.swingset.MsgDeliverInbound", + () => [ + { no: 1, name: "messages", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "nums", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true }, + { no: 3, name: "ack", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 4, name: "submitter", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * MsgDeliverInboundResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgDeliverInboundResponse + */ +export const MsgDeliverInboundResponse = proto3.makeMessageType( + "agoric.swingset.MsgDeliverInboundResponse", + [], +); + +/** + * MsgWalletAction defines an SDK message for the on-chain wallet to perform an + * action that *does not* spend any assets (other than gas fees/stamps). This + * message type is typically protected by feegrant budgets. + * + * @generated from message agoric.swingset.MsgWalletAction + */ +export const MsgWalletAction = proto3.makeMessageType( + "agoric.swingset.MsgWalletAction", + () => [ + { no: 1, name: "owner", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "action", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * MsgWalletActionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgWalletActionResponse + */ +export const MsgWalletActionResponse = proto3.makeMessageType( + "agoric.swingset.MsgWalletActionResponse", + [], +); + +/** + * MsgWalletSpendAction defines an SDK message for the on-chain wallet to + * perform an action that *does spend the owner's assets.* This message type is + * typically protected by explicit confirmation by the user. + * + * @generated from message agoric.swingset.MsgWalletSpendAction + */ +export const MsgWalletSpendAction = proto3.makeMessageType( + "agoric.swingset.MsgWalletSpendAction", + () => [ + { no: 1, name: "owner", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "spend_action", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * MsgWalletSpendActionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgWalletSpendActionResponse + */ +export const MsgWalletSpendActionResponse = proto3.makeMessageType( + "agoric.swingset.MsgWalletSpendActionResponse", + [], +); + +/** + * MsgProvision defines an SDK message for provisioning a client to the chain + * + * @generated from message agoric.swingset.MsgProvision + */ +export const MsgProvision = proto3.makeMessageType( + "agoric.swingset.MsgProvision", + () => [ + { no: 1, name: "nickname", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "address", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "power_flags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "submitter", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * MsgProvisionResponse is an empty reply. + * + * @generated from message agoric.swingset.MsgProvisionResponse + */ +export const MsgProvisionResponse = proto3.makeMessageType( + "agoric.swingset.MsgProvisionResponse", + [], +); + +/** + * MsgInstallBundle carries a signed bundle to SwingSet. + * + * @generated from message agoric.swingset.MsgInstallBundle + */ +export const MsgInstallBundle = proto3.makeMessageType( + "agoric.swingset.MsgInstallBundle", + () => [ + { no: 1, name: "bundle", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "submitter", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "compressed_bundle", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 4, name: "uncompressed_size", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * MsgInstallBundleResponse is an empty acknowledgement that an install bundle + * message has been queued for the SwingSet kernel's consideration. + * + * @generated from message agoric.swingset.MsgInstallBundleResponse + */ +export const MsgInstallBundleResponse = proto3.makeMessageType( + "agoric.swingset.MsgInstallBundleResponse", + [], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.d.ts new file mode 100644 index 0000000..d75cb2b --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.d.ts @@ -0,0 +1,162 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/query.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Egress, Params } from "./swingset_pb.js"; + +/** + * QueryParamsRequest is the request type for the Query/Params RPC method. + * + * @generated from message agoric.swingset.QueryParamsRequest + */ +export declare class QueryParamsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryParamsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryParamsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryParamsRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryParamsRequest; + + static equals(a: QueryParamsRequest | PlainMessage | undefined, b: QueryParamsRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + * + * @generated from message agoric.swingset.QueryParamsResponse + */ +export declare class QueryParamsResponse extends Message { + /** + * params defines the parameters of the module. + * + * @generated from field: agoric.swingset.Params params = 1; + */ + params?: Params; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryParamsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryParamsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryParamsResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryParamsResponse; + + static equals(a: QueryParamsResponse | PlainMessage | undefined, b: QueryParamsResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryEgressRequest is the request type for the Query/Egress RPC method + * + * @generated from message agoric.swingset.QueryEgressRequest + */ +export declare class QueryEgressRequest extends Message { + /** + * @generated from field: bytes peer = 1; + */ + peer: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryEgressRequest; + + static equals(a: QueryEgressRequest | PlainMessage | undefined, b: QueryEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryEgressResponse is the egress response. + * + * @generated from message agoric.swingset.QueryEgressResponse + */ +export declare class QueryEgressResponse extends Message { + /** + * @generated from field: agoric.swingset.Egress egress = 1; + */ + egress?: Egress; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryEgressResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryEgressResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryEgressResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryEgressResponse; + + static equals(a: QueryEgressResponse | PlainMessage | undefined, b: QueryEgressResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryMailboxRequest is the mailbox query. + * + * @generated from message agoric.swingset.QueryMailboxRequest + */ +export declare class QueryMailboxRequest extends Message { + /** + * @generated from field: bytes peer = 1; + */ + peer: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryMailboxRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryMailboxRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryMailboxRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryMailboxRequest; + + static equals(a: QueryMailboxRequest | PlainMessage | undefined, b: QueryMailboxRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryMailboxResponse is the mailbox response. + * + * @generated from message agoric.swingset.QueryMailboxResponse + */ +export declare class QueryMailboxResponse extends Message { + /** + * @generated from field: string value = 1; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueryMailboxResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryMailboxResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryMailboxResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryMailboxResponse; + + static equals(a: QueryMailboxResponse | PlainMessage | undefined, b: QueryMailboxResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.js b/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.js new file mode 100644 index 0000000..51442de --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/query_pb.js @@ -0,0 +1,78 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/query.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Egress, Params } from "./swingset_pb.js"; + +/** + * QueryParamsRequest is the request type for the Query/Params RPC method. + * + * @generated from message agoric.swingset.QueryParamsRequest + */ +export const QueryParamsRequest = proto3.makeMessageType( + "agoric.swingset.QueryParamsRequest", + [], +); + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + * + * @generated from message agoric.swingset.QueryParamsResponse + */ +export const QueryParamsResponse = proto3.makeMessageType( + "agoric.swingset.QueryParamsResponse", + () => [ + { no: 1, name: "params", kind: "message", T: Params }, + ], +); + +/** + * QueryEgressRequest is the request type for the Query/Egress RPC method + * + * @generated from message agoric.swingset.QueryEgressRequest + */ +export const QueryEgressRequest = proto3.makeMessageType( + "agoric.swingset.QueryEgressRequest", + () => [ + { no: 1, name: "peer", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * QueryEgressResponse is the egress response. + * + * @generated from message agoric.swingset.QueryEgressResponse + */ +export const QueryEgressResponse = proto3.makeMessageType( + "agoric.swingset.QueryEgressResponse", + () => [ + { no: 1, name: "egress", kind: "message", T: Egress }, + ], +); + +/** + * QueryMailboxRequest is the mailbox query. + * + * @generated from message agoric.swingset.QueryMailboxRequest + */ +export const QueryMailboxRequest = proto3.makeMessageType( + "agoric.swingset.QueryMailboxRequest", + () => [ + { no: 1, name: "peer", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * QueryMailboxResponse is the mailbox response. + * + * @generated from message agoric.swingset.QueryMailboxResponse + */ +export const QueryMailboxResponse = proto3.makeMessageType( + "agoric.swingset.QueryMailboxResponse", + () => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.d.ts new file mode 100644 index 0000000..c33a3e4 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.d.ts @@ -0,0 +1,368 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/swingset.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * CoreEvalProposal is a gov Content type for evaluating code in the SwingSet + * core. + * See `agoric-sdk/packages/vats/src/core/eval.js`. + * + * @generated from message agoric.swingset.CoreEvalProposal + */ +export declare class CoreEvalProposal extends Message { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * Although evals are sequential, they may run concurrently, since they each + * can return a Promise. + * + * @generated from field: repeated agoric.swingset.CoreEval evals = 3; + */ + evals: CoreEval[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.CoreEvalProposal"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CoreEvalProposal; + + static fromJson(jsonValue: JsonValue, options?: Partial): CoreEvalProposal; + + static fromJsonString(jsonString: string, options?: Partial): CoreEvalProposal; + + static equals(a: CoreEvalProposal | PlainMessage | undefined, b: CoreEvalProposal | PlainMessage | undefined): boolean; +} + +/** + * CoreEval defines an individual SwingSet core evaluation, for use in + * CoreEvalProposal. + * + * @generated from message agoric.swingset.CoreEval + */ +export declare class CoreEval extends Message { + /** + * Grant these JSON-stringified core bootstrap permits to the jsCode, as the + * `powers` endowment. + * + * @generated from field: string json_permits = 1; + */ + jsonPermits: string; + + /** + * Evaluate this JavaScript code in a Compartment endowed with `powers` as + * well as some powerless helpers. + * + * @generated from field: string js_code = 2; + */ + jsCode: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.CoreEval"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CoreEval; + + static fromJson(jsonValue: JsonValue, options?: Partial): CoreEval; + + static fromJsonString(jsonString: string, options?: Partial): CoreEval; + + static equals(a: CoreEval | PlainMessage | undefined, b: CoreEval | PlainMessage | undefined): boolean; +} + +/** + * Params are the swingset configuration/governance parameters. + * + * @generated from message agoric.swingset.Params + */ +export declare class Params extends Message { + /** + * Map from unit name to a value in SwingSet "beans". + * Must not be negative. + * + * These values are used by SwingSet to normalize named per-resource charges + * (maybe rent) in a single Nat usage unit, the "bean". + * + * There is no required order to this list of entries, but all the chain + * nodes must all serialize and deserialize the existing order without + * permuting it. + * + * @generated from field: repeated agoric.swingset.StringBeans beans_per_unit = 1; + */ + beansPerUnit: StringBeans[]; + + /** + * The price in Coins per the unit named "fee". This value is used by + * cosmic-swingset JS code to decide how many tokens to charge. + * + * cost = beans_used * fee_unit_price / beans_per_unit["fee"] + * + * @generated from field: repeated cosmos.base.v1beta1.Coin fee_unit_price = 2; + */ + feeUnitPrice: Coin[]; + + /** + * The SwingSet bootstrap vat configuration file. Not usefully modifiable + * via governance as it is only referenced by the chain's initial + * construction. + * + * @generated from field: string bootstrap_vat_config = 3; + */ + bootstrapVatConfig: string; + + /** + * If the provision submitter doesn't hold a provisionpass, their requested + * power flags are looked up in this fee menu (first match wins) and the sum + * is charged. If any power flag is not found in this menu, the request is + * rejected. + * + * @generated from field: repeated agoric.swingset.PowerFlagFee power_flag_fees = 4; + */ + powerFlagFees: PowerFlagFee[]; + + /** + * Maximum sizes for queues. + * These values are used by SwingSet to compute how many messages should be + * accepted in a block. + * + * There is no required order to this list of entries, but all the chain + * nodes must all serialize and deserialize the existing order without + * permuting it. + * + * @generated from field: repeated agoric.swingset.QueueSize queue_max = 5; + */ + queueMax: QueueSize[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.Params"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Params; + + static fromJson(jsonValue: JsonValue, options?: Partial): Params; + + static fromJsonString(jsonString: string, options?: Partial): Params; + + static equals(a: Params | PlainMessage | undefined, b: Params | PlainMessage | undefined): boolean; +} + +/** + * The current state of the module. + * + * @generated from message agoric.swingset.State + */ +export declare class State extends Message { + /** + * The allowed number of items to add to queues, as determined by SwingSet. + * Transactions which attempt to enqueue more should be rejected. + * + * @generated from field: repeated agoric.swingset.QueueSize queue_allowed = 1; + */ + queueAllowed: QueueSize[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.State"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): State; + + static fromJson(jsonValue: JsonValue, options?: Partial): State; + + static fromJsonString(jsonString: string, options?: Partial): State; + + static equals(a: State | PlainMessage | undefined, b: State | PlainMessage | undefined): boolean; +} + +/** + * Map element of a string key to a Nat bean count. + * + * @generated from message agoric.swingset.StringBeans + */ +export declare class StringBeans extends Message { + /** + * What the beans are for. + * + * @generated from field: string key = 1; + */ + key: string; + + /** + * The actual bean value. + * + * @generated from field: string beans = 2; + */ + beans: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.StringBeans"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StringBeans; + + static fromJson(jsonValue: JsonValue, options?: Partial): StringBeans; + + static fromJsonString(jsonString: string, options?: Partial): StringBeans; + + static equals(a: StringBeans | PlainMessage | undefined, b: StringBeans | PlainMessage | undefined): boolean; +} + +/** + * Map a provisioning power flag to its corresponding fee. + * + * @generated from message agoric.swingset.PowerFlagFee + */ +export declare class PowerFlagFee extends Message { + /** + * @generated from field: string power_flag = 1; + */ + powerFlag: string; + + /** + * @generated from field: repeated cosmos.base.v1beta1.Coin fee = 2; + */ + fee: Coin[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.PowerFlagFee"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PowerFlagFee; + + static fromJson(jsonValue: JsonValue, options?: Partial): PowerFlagFee; + + static fromJsonString(jsonString: string, options?: Partial): PowerFlagFee; + + static equals(a: PowerFlagFee | PlainMessage | undefined, b: PowerFlagFee | PlainMessage | undefined): boolean; +} + +/** + * Map element of a string key to a size. + * + * @generated from message agoric.swingset.QueueSize + */ +export declare class QueueSize extends Message { + /** + * What the size is for. + * + * @generated from field: string key = 1; + */ + key: string; + + /** + * The actual size value. + * + * @generated from field: int32 size = 2; + */ + size: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.QueueSize"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueueSize; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueueSize; + + static fromJsonString(jsonString: string, options?: Partial): QueueSize; + + static equals(a: QueueSize | PlainMessage | undefined, b: QueueSize | PlainMessage | undefined): boolean; +} + +/** + * Egress is the format for a swingset egress. + * + * @generated from message agoric.swingset.Egress + */ +export declare class Egress extends Message { + /** + * @generated from field: string nickname = 1; + */ + nickname: string; + + /** + * @generated from field: bytes peer = 2; + */ + peer: Uint8Array; + + /** + * TODO: Remove these power flags as they are deprecated and have no effect. + * + * @generated from field: repeated string power_flags = 3; + */ + powerFlags: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.Egress"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Egress; + + static fromJson(jsonValue: JsonValue, options?: Partial): Egress; + + static fromJsonString(jsonString: string, options?: Partial): Egress; + + static equals(a: Egress | PlainMessage | undefined, b: Egress | PlainMessage | undefined): boolean; +} + +/** + * SwingStoreArtifact encodes an artifact of a swing-store export. + * Artifacts may be stored or transmitted in any order. Most handlers do + * maintain the artifact order from their original source as an effect of how + * they handle the artifacts. + * + * @generated from message agoric.swingset.SwingStoreArtifact + */ +export declare class SwingStoreArtifact extends Message { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: bytes data = 2; + */ + data: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.swingset.SwingStoreArtifact"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SwingStoreArtifact; + + static fromJson(jsonValue: JsonValue, options?: Partial): SwingStoreArtifact; + + static fromJsonString(jsonString: string, options?: Partial): SwingStoreArtifact; + + static equals(a: SwingStoreArtifact | PlainMessage | undefined, b: SwingStoreArtifact | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.js b/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.js new file mode 100644 index 0000000..ab6e122 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/swingset/swingset_pb.js @@ -0,0 +1,135 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/swingset/swingset.proto (package agoric.swingset, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * CoreEvalProposal is a gov Content type for evaluating code in the SwingSet + * core. + * See `agoric-sdk/packages/vats/src/core/eval.js`. + * + * @generated from message agoric.swingset.CoreEvalProposal + */ +export const CoreEvalProposal = proto3.makeMessageType( + "agoric.swingset.CoreEvalProposal", + () => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "evals", kind: "message", T: CoreEval, repeated: true }, + ], +); + +/** + * CoreEval defines an individual SwingSet core evaluation, for use in + * CoreEvalProposal. + * + * @generated from message agoric.swingset.CoreEval + */ +export const CoreEval = proto3.makeMessageType( + "agoric.swingset.CoreEval", + () => [ + { no: 1, name: "json_permits", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "js_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * Params are the swingset configuration/governance parameters. + * + * @generated from message agoric.swingset.Params + */ +export const Params = proto3.makeMessageType( + "agoric.swingset.Params", + () => [ + { no: 1, name: "beans_per_unit", kind: "message", T: StringBeans, repeated: true }, + { no: 2, name: "fee_unit_price", kind: "message", T: Coin, repeated: true }, + { no: 3, name: "bootstrap_vat_config", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "power_flag_fees", kind: "message", T: PowerFlagFee, repeated: true }, + { no: 5, name: "queue_max", kind: "message", T: QueueSize, repeated: true }, + ], +); + +/** + * The current state of the module. + * + * @generated from message agoric.swingset.State + */ +export const State = proto3.makeMessageType( + "agoric.swingset.State", + () => [ + { no: 1, name: "queue_allowed", kind: "message", T: QueueSize, repeated: true }, + ], +); + +/** + * Map element of a string key to a Nat bean count. + * + * @generated from message agoric.swingset.StringBeans + */ +export const StringBeans = proto3.makeMessageType( + "agoric.swingset.StringBeans", + () => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "beans", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * Map a provisioning power flag to its corresponding fee. + * + * @generated from message agoric.swingset.PowerFlagFee + */ +export const PowerFlagFee = proto3.makeMessageType( + "agoric.swingset.PowerFlagFee", + () => [ + { no: 1, name: "power_flag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "fee", kind: "message", T: Coin, repeated: true }, + ], +); + +/** + * Map element of a string key to a size. + * + * @generated from message agoric.swingset.QueueSize + */ +export const QueueSize = proto3.makeMessageType( + "agoric.swingset.QueueSize", + () => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "size", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + +/** + * Egress is the format for a swingset egress. + * + * @generated from message agoric.swingset.Egress + */ +export const Egress = proto3.makeMessageType( + "agoric.swingset.Egress", + () => [ + { no: 1, name: "nickname", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "peer", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "power_flags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * SwingStoreArtifact encodes an artifact of a swing-store export. + * Artifacts may be stored or transmitted in any order. Most handlers do + * maintain the artifact order from their original source as an effect of how + * they handle the artifacts. + * + * @generated from message agoric.swingset.SwingStoreArtifact + */ +export const SwingStoreArtifact = proto3.makeMessageType( + "agoric.swingset.SwingStoreArtifact", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.d.ts new file mode 100644 index 0000000..8854c89 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.d.ts @@ -0,0 +1,44 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/genesis.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Params, State } from "./vbank_pb.js"; + +/** + * The initial and exported module state. + * + * @generated from message agoric.vbank.GenesisState + */ +export declare class GenesisState extends Message { + /** + * parms defines all the parameters of the module. + * + * @generated from field: agoric.vbank.Params params = 1; + */ + params?: Params; + + /** + * state is the current operation state. + * + * @generated from field: agoric.vbank.State state = 2; + */ + state?: State; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.GenesisState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GenesisState; + + static fromJson(jsonValue: JsonValue, options?: Partial): GenesisState; + + static fromJsonString(jsonString: string, options?: Partial): GenesisState; + + static equals(a: GenesisState | PlainMessage | undefined, b: GenesisState | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.js new file mode 100644 index 0000000..3202ee5 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/genesis_pb.js @@ -0,0 +1,21 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/genesis.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Params, State } from "./vbank_pb.js"; + +/** + * The initial and exported module state. + * + * @generated from message agoric.vbank.GenesisState + */ +export const GenesisState = proto3.makeMessageType( + "agoric.vbank.GenesisState", + () => [ + { no: 1, name: "params", kind: "message", T: Params }, + { no: 2, name: "state", kind: "message", T: State }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.d.ts new file mode 100644 index 0000000..cbb20b3 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.d.ts @@ -0,0 +1,107 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/query.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Params, State } from "./vbank_pb.js"; + +/** + * QueryParamsRequest is the request type for the Query/Params RPC method. + * + * @generated from message agoric.vbank.QueryParamsRequest + */ +export declare class QueryParamsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.QueryParamsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryParamsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryParamsRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryParamsRequest; + + static equals(a: QueryParamsRequest | PlainMessage | undefined, b: QueryParamsRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + * + * @generated from message agoric.vbank.QueryParamsResponse + */ +export declare class QueryParamsResponse extends Message { + /** + * params defines the parameters of the module. + * + * @generated from field: agoric.vbank.Params params = 1; + */ + params?: Params; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.QueryParamsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryParamsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryParamsResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryParamsResponse; + + static equals(a: QueryParamsResponse | PlainMessage | undefined, b: QueryParamsResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryStateRequest is the request type for the Query/State RPC method. + * + * @generated from message agoric.vbank.QueryStateRequest + */ +export declare class QueryStateRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.QueryStateRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryStateRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryStateRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryStateRequest; + + static equals(a: QueryStateRequest | PlainMessage | undefined, b: QueryStateRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryStateResponse is the response type for the Query/State RPC method. + * + * @generated from message agoric.vbank.QueryStateResponse + */ +export declare class QueryStateResponse extends Message { + /** + * state defines the parameters of the module. + * + * @generated from field: agoric.vbank.State state = 1; + */ + state?: State; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.QueryStateResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryStateResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryStateResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryStateResponse; + + static equals(a: QueryStateResponse | PlainMessage | undefined, b: QueryStateResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.js new file mode 100644 index 0000000..aac9540 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/query_pb.js @@ -0,0 +1,52 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/query.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Params, State } from "./vbank_pb.js"; + +/** + * QueryParamsRequest is the request type for the Query/Params RPC method. + * + * @generated from message agoric.vbank.QueryParamsRequest + */ +export const QueryParamsRequest = proto3.makeMessageType( + "agoric.vbank.QueryParamsRequest", + [], +); + +/** + * QueryParamsResponse is the response type for the Query/Params RPC method. + * + * @generated from message agoric.vbank.QueryParamsResponse + */ +export const QueryParamsResponse = proto3.makeMessageType( + "agoric.vbank.QueryParamsResponse", + () => [ + { no: 1, name: "params", kind: "message", T: Params }, + ], +); + +/** + * QueryStateRequest is the request type for the Query/State RPC method. + * + * @generated from message agoric.vbank.QueryStateRequest + */ +export const QueryStateRequest = proto3.makeMessageType( + "agoric.vbank.QueryStateRequest", + [], +); + +/** + * QueryStateResponse is the response type for the Query/State RPC method. + * + * @generated from message agoric.vbank.QueryStateResponse + */ +export const QueryStateResponse = proto3.makeMessageType( + "agoric.vbank.QueryStateResponse", + () => [ + { no: 1, name: "state", kind: "message", T: State }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.d.ts new file mode 100644 index 0000000..7f9e8f1 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.d.ts @@ -0,0 +1,107 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/vbank.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * The module governance/configuration parameters. + * + * @generated from message agoric.vbank.Params + */ +export declare class Params extends Message { + /** + * reward_epoch_duration_blocks is the length of a reward epoch, in blocks. + * A value of zero has the same meaning as a value of one: + * the full reward buffer should be distributed immediately. + * + * @generated from field: int64 reward_epoch_duration_blocks = 1; + */ + rewardEpochDurationBlocks: bigint; + + /** + * per_epoch_reward_fraction is a fraction of the reward pool to distrubute + * once every reward epoch. If less than zero, use approximately continuous + * per-block distribution. + * + * @generated from field: string per_epoch_reward_fraction = 2; + */ + perEpochRewardFraction: string; + + /** + * reward_smoothing_blocks is the number of blocks over which to distribute + * an epoch's rewards. If zero, use the same value as + * reward_epoch_duration_blocks. + * + * @generated from field: int64 reward_smoothing_blocks = 3; + */ + rewardSmoothingBlocks: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.Params"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Params; + + static fromJson(jsonValue: JsonValue, options?: Partial): Params; + + static fromJsonString(jsonString: string, options?: Partial): Params; + + static equals(a: Params | PlainMessage | undefined, b: Params | PlainMessage | undefined): boolean; +} + +/** + * The current state of the module. + * + * @generated from message agoric.vbank.State + */ +export declare class State extends Message { + /** + * rewardPool is the current balance of rewards in the module account. + * NOTE: Tracking manually since there is no bank call for getting a + * module account balance by name. + * + * @generated from field: repeated cosmos.base.v1beta1.Coin reward_pool = 1; + */ + rewardPool: Coin[]; + + /** + * reward_block_amount is the amount of reward, if available, to send to the + * fee collector module on every block. + * + * @generated from field: repeated cosmos.base.v1beta1.Coin reward_block_amount = 2; + */ + rewardBlockAmount: Coin[]; + + /** + * last_sequence is a sequence number for communicating with the VM. + * + * @generated from field: uint64 last_sequence = 3; + */ + lastSequence: bigint; + + /** + * @generated from field: int64 last_reward_distribution_block = 4; + */ + lastRewardDistributionBlock: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vbank.State"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): State; + + static fromJson(jsonValue: JsonValue, options?: Partial): State; + + static fromJsonString(jsonString: string, options?: Partial): State; + + static equals(a: State | PlainMessage | undefined, b: State | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.js new file mode 100644 index 0000000..dac5fbf --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vbank/vbank_pb.js @@ -0,0 +1,37 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vbank/vbank.proto (package agoric.vbank, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Coin } from "../../cosmos/base/v1beta1/coin_pb.js"; + +/** + * The module governance/configuration parameters. + * + * @generated from message agoric.vbank.Params + */ +export const Params = proto3.makeMessageType( + "agoric.vbank.Params", + () => [ + { no: 1, name: "reward_epoch_duration_blocks", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "per_epoch_reward_fraction", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "reward_smoothing_blocks", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * The current state of the module. + * + * @generated from message agoric.vbank.State + */ +export const State = proto3.makeMessageType( + "agoric.vbank.State", + () => [ + { no: 1, name: "reward_pool", kind: "message", T: Coin, repeated: true }, + { no: 2, name: "reward_block_amount", kind: "message", T: Coin, repeated: true }, + { no: 3, name: "last_sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 4, name: "last_reward_distribution_block", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.d.ts new file mode 100644 index 0000000..8b42d3f --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.d.ts @@ -0,0 +1,61 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vibc/msgs.proto (package agoric.vibc, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Packet } from "../../ibc/core/channel/v1/channel_pb.js"; + +/** + * MsgSendPacket is an SDK message for sending an outgoing IBC packet + * + * @generated from message agoric.vibc.MsgSendPacket + */ +export declare class MsgSendPacket extends Message { + /** + * @generated from field: ibc.core.channel.v1.Packet packet = 1; + */ + packet?: Packet; + + /** + * @generated from field: bytes sender = 2; + */ + sender: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vibc.MsgSendPacket"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgSendPacket; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgSendPacket; + + static fromJsonString(jsonString: string, options?: Partial): MsgSendPacket; + + static equals(a: MsgSendPacket | PlainMessage | undefined, b: MsgSendPacket | PlainMessage | undefined): boolean; +} + +/** + * Empty response for SendPacket. + * + * @generated from message agoric.vibc.MsgSendPacketResponse + */ +export declare class MsgSendPacketResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vibc.MsgSendPacketResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgSendPacketResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgSendPacketResponse; + + static fromJsonString(jsonString: string, options?: Partial): MsgSendPacketResponse; + + static equals(a: MsgSendPacketResponse | PlainMessage | undefined, b: MsgSendPacketResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.js new file mode 100644 index 0000000..e637f49 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vibc/msgs_pb.js @@ -0,0 +1,31 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vibc/msgs.proto (package agoric.vibc, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Packet } from "../../ibc/core/channel/v1/channel_pb.js"; + +/** + * MsgSendPacket is an SDK message for sending an outgoing IBC packet + * + * @generated from message agoric.vibc.MsgSendPacket + */ +export const MsgSendPacket = proto3.makeMessageType( + "agoric.vibc.MsgSendPacket", + () => [ + { no: 1, name: "packet", kind: "message", T: Packet }, + { no: 2, name: "sender", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * Empty response for SendPacket. + * + * @generated from message agoric.vibc.MsgSendPacketResponse + */ +export const MsgSendPacketResponse = proto3.makeMessageType( + "agoric.vibc.MsgSendPacketResponse", + [], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.d.ts new file mode 100644 index 0000000..708247e --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.d.ts @@ -0,0 +1,69 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/genesis.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * The initial or exported state. + * + * @generated from message agoric.vstorage.GenesisState + */ +export declare class GenesisState extends Message { + /** + * @generated from field: repeated agoric.vstorage.DataEntry data = 1; + */ + data: DataEntry[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.GenesisState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GenesisState; + + static fromJson(jsonValue: JsonValue, options?: Partial): GenesisState; + + static fromJsonString(jsonString: string, options?: Partial): GenesisState; + + static equals(a: GenesisState | PlainMessage | undefined, b: GenesisState | PlainMessage | undefined): boolean; +} + +/** + * A vstorage entry. The only necessary entries are those with data, as the + * ancestor nodes are reconstructed on import. + * + * @generated from message agoric.vstorage.DataEntry + */ +export declare class DataEntry extends Message { + /** + * A "."-separated path with individual path elements matching + * `[-_A-Za-z0-9]+` + * + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.DataEntry"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataEntry; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataEntry; + + static fromJsonString(jsonString: string, options?: Partial): DataEntry; + + static equals(a: DataEntry | PlainMessage | undefined, b: DataEntry | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.js new file mode 100644 index 0000000..4b0b4b4 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/genesis_pb.js @@ -0,0 +1,33 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/genesis.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * The initial or exported state. + * + * @generated from message agoric.vstorage.GenesisState + */ +export const GenesisState = proto3.makeMessageType( + "agoric.vstorage.GenesisState", + () => [ + { no: 1, name: "data", kind: "message", T: DataEntry, repeated: true }, + ], +); + +/** + * A vstorage entry. The only necessary entries are those with data, as the + * ancestor nodes are reconstructed on import. + * + * @generated from message agoric.vstorage.DataEntry + */ +export const DataEntry = proto3.makeMessageType( + "agoric.vstorage.DataEntry", + () => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.d.ts new file mode 100644 index 0000000..6c955a2 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.d.ts @@ -0,0 +1,211 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/query.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { PageRequest, PageResponse } from "../../cosmos/base/query/v1beta1/pagination_pb.js"; + +/** + * QueryDataRequest is the vstorage path data query. + * + * @generated from message agoric.vstorage.QueryDataRequest + */ +export declare class QueryDataRequest extends Message { + /** + * @generated from field: string path = 1; + */ + path: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryDataRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryDataRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryDataRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryDataRequest; + + static equals(a: QueryDataRequest | PlainMessage | undefined, b: QueryDataRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryDataResponse is the vstorage path data response. + * + * @generated from message agoric.vstorage.QueryDataResponse + */ +export declare class QueryDataResponse extends Message { + /** + * @generated from field: string value = 1; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryDataResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryDataResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryDataResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryDataResponse; + + static equals(a: QueryDataResponse | PlainMessage | undefined, b: QueryDataResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryCapDataRequest contains a path and formatting configuration. + * + * @generated from message agoric.vstorage.QueryCapDataRequest + */ +export declare class QueryCapDataRequest extends Message { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * mediaType must be an actual media type in the registry at + * https://www.iana.org/assignments/media-types/media-types.xhtml + * or a special value that does not conflict with the media type syntax. + * The only valid value is "JSON Lines", which is also the default. + * + * @generated from field: string media_type = 2; + */ + mediaType: string; + + /** + * itemFormat, if present, must be the special value "flat" to indicate that + * the deep structure of each item should be flattened into a single level + * with kebab-case keys (e.g., `{ "metrics": { "min": 0, "max": 88 } }` as + * `{ "metrics-min": 0, "metrics-max": 88 }`). + * + * @generated from field: string item_format = 3; + */ + itemFormat: string; + + /** + * remotableValueFormat indicates how to transform references to opaque but + * distinguishable Remotables into readable embedded representations. + * * "object" represents each Remotable as an `{ id, allegedName }` object, e.g. `{ "id": "board007", "allegedName": "IST brand" }`. + * * "string" represents each Remotable as a string with bracket-wrapped contents including its alleged name and id, e.g. "[Alleged: IST brand ]". + * + * @generated from field: string remotable_value_format = 10; + */ + remotableValueFormat: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryCapDataRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryCapDataRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryCapDataRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryCapDataRequest; + + static equals(a: QueryCapDataRequest | PlainMessage | undefined, b: QueryCapDataRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryCapDataResponse represents the result with the requested formatting, + * reserving space for future metadata such as media type. + * + * @generated from message agoric.vstorage.QueryCapDataResponse + */ +export declare class QueryCapDataResponse extends Message { + /** + * @generated from field: string block_height = 1; + */ + blockHeight: string; + + /** + * @generated from field: string value = 10; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryCapDataResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryCapDataResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryCapDataResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryCapDataResponse; + + static equals(a: QueryCapDataResponse | PlainMessage | undefined, b: QueryCapDataResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryChildrenRequest is the vstorage path children query. + * + * @generated from message agoric.vstorage.QueryChildrenRequest + */ +export declare class QueryChildrenRequest extends Message { + /** + * @generated from field: string path = 1; + */ + path: string; + + /** + * @generated from field: cosmos.base.query.v1beta1.PageRequest pagination = 2; + */ + pagination?: PageRequest; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryChildrenRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryChildrenRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryChildrenRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryChildrenRequest; + + static equals(a: QueryChildrenRequest | PlainMessage | undefined, b: QueryChildrenRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryChildrenResponse is the vstorage path children response. + * + * @generated from message agoric.vstorage.QueryChildrenResponse + */ +export declare class QueryChildrenResponse extends Message { + /** + * @generated from field: repeated string children = 1; + */ + children: string[]; + + /** + * @generated from field: cosmos.base.query.v1beta1.PageResponse pagination = 2; + */ + pagination?: PageResponse; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.QueryChildrenResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryChildrenResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryChildrenResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryChildrenResponse; + + static equals(a: QueryChildrenResponse | PlainMessage | undefined, b: QueryChildrenResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.js new file mode 100644 index 0000000..8a71577 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/query_pb.js @@ -0,0 +1,87 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/query.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { PageRequest, PageResponse } from "../../cosmos/base/query/v1beta1/pagination_pb.js"; + +/** + * QueryDataRequest is the vstorage path data query. + * + * @generated from message agoric.vstorage.QueryDataRequest + */ +export const QueryDataRequest = proto3.makeMessageType( + "agoric.vstorage.QueryDataRequest", + () => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * QueryDataResponse is the vstorage path data response. + * + * @generated from message agoric.vstorage.QueryDataResponse + */ +export const QueryDataResponse = proto3.makeMessageType( + "agoric.vstorage.QueryDataResponse", + () => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * QueryCapDataRequest contains a path and formatting configuration. + * + * @generated from message agoric.vstorage.QueryCapDataRequest + */ +export const QueryCapDataRequest = proto3.makeMessageType( + "agoric.vstorage.QueryCapDataRequest", + () => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "media_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "item_format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "remotable_value_format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * QueryCapDataResponse represents the result with the requested formatting, + * reserving space for future metadata such as media type. + * + * @generated from message agoric.vstorage.QueryCapDataResponse + */ +export const QueryCapDataResponse = proto3.makeMessageType( + "agoric.vstorage.QueryCapDataResponse", + () => [ + { no: 1, name: "block_height", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * QueryChildrenRequest is the vstorage path children query. + * + * @generated from message agoric.vstorage.QueryChildrenRequest + */ +export const QueryChildrenRequest = proto3.makeMessageType( + "agoric.vstorage.QueryChildrenRequest", + () => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "pagination", kind: "message", T: PageRequest }, + ], +); + +/** + * QueryChildrenResponse is the vstorage path children response. + * + * @generated from message agoric.vstorage.QueryChildrenResponse + */ +export const QueryChildrenResponse = proto3.makeMessageType( + "agoric.vstorage.QueryChildrenResponse", + () => [ + { no: 1, name: "children", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "pagination", kind: "message", T: PageResponse }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.d.ts b/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.d.ts new file mode 100644 index 0000000..60e4648 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.d.ts @@ -0,0 +1,61 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/vstorage.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * Data is the vstorage node data. + * + * @generated from message agoric.vstorage.Data + */ +export declare class Data extends Message { + /** + * @generated from field: string value = 1; + */ + value: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.Data"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Data; + + static fromJson(jsonValue: JsonValue, options?: Partial): Data; + + static fromJsonString(jsonString: string, options?: Partial): Data; + + static equals(a: Data | PlainMessage | undefined, b: Data | PlainMessage | undefined): boolean; +} + +/** + * Children are the immediate names (just one level deep) of subnodes leading to + * more data from a given vstorage node. + * + * @generated from message agoric.vstorage.Children + */ +export declare class Children extends Message { + /** + * @generated from field: repeated string children = 1; + */ + children: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "agoric.vstorage.Children"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Children; + + static fromJson(jsonValue: JsonValue, options?: Partial): Children; + + static fromJsonString(jsonString: string, options?: Partial): Children; + + static equals(a: Children | PlainMessage | undefined, b: Children | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.js b/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.js new file mode 100644 index 0000000..df6f78e --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/agoric/vstorage/vstorage_pb.js @@ -0,0 +1,32 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file agoric/vstorage/vstorage.proto (package agoric.vstorage, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * Data is the vstorage node data. + * + * @generated from message agoric.vstorage.Data + */ +export const Data = proto3.makeMessageType( + "agoric.vstorage.Data", + () => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * Children are the immediate names (just one level deep) of subnodes leading to + * more data from a given vstorage node. + * + * @generated from message agoric.vstorage.Children + */ +export const Children = proto3.makeMessageType( + "agoric.vstorage.Children", + () => [ + { no: 1, name: "children", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.d.ts b/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.d.ts new file mode 100644 index 0000000..f041f32 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.d.ts @@ -0,0 +1,121 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/base/query/v1beta1/pagination.proto (package cosmos.base.query.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * PageRequest is to be embedded in gRPC request messages for efficient + * pagination. Ex: + * + * message SomeRequest { + * Foo some_parameter = 1; + * PageRequest pagination = 2; + * } + * + * @generated from message cosmos.base.query.v1beta1.PageRequest + */ +export declare class PageRequest extends Message { + /** + * 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. + * + * @generated from field: bytes key = 1; + */ + key: Uint8Array; + + /** + * offset is a numeric offset that can be used when key is unavailable. + * It is less efficient than using key. Only one of offset or key should + * be set. + * + * @generated from field: uint64 offset = 2; + */ + offset: bigint; + + /** + * 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. + * + * @generated from field: uint64 limit = 3; + */ + limit: bigint; + + /** + * 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. + * + * @generated from field: bool count_total = 4; + */ + countTotal: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * @generated from field: bool reverse = 5; + */ + reverse: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.query.v1beta1.PageRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PageRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): PageRequest; + + static fromJsonString(jsonString: string, options?: Partial): PageRequest; + + static equals(a: PageRequest | PlainMessage | undefined, b: PageRequest | PlainMessage | undefined): 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; + * } + * + * @generated from message cosmos.base.query.v1beta1.PageResponse + */ +export declare class PageResponse extends Message { + /** + * next_key is the key to be passed to PageRequest.key to + * query the next page most efficiently + * + * @generated from field: bytes next_key = 1; + */ + nextKey: Uint8Array; + + /** + * total is total number of results available if PageRequest.count_total + * was set, its value is undefined otherwise + * + * @generated from field: uint64 total = 2; + */ + total: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.query.v1beta1.PageResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PageResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): PageResponse; + + static fromJsonString(jsonString: string, options?: Partial): PageResponse; + + static equals(a: PageResponse | PlainMessage | undefined, b: PageResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.js b/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.js new file mode 100644 index 0000000..5318cf1 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/base/query/v1beta1/pagination_pb.js @@ -0,0 +1,48 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/base/query/v1beta1/pagination.proto (package cosmos.base.query.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * PageRequest is to be embedded in gRPC request messages for efficient + * pagination. Ex: + * + * message SomeRequest { + * Foo some_parameter = 1; + * PageRequest pagination = 2; + * } + * + * @generated from message cosmos.base.query.v1beta1.PageRequest + */ +export const PageRequest = proto3.makeMessageType( + "cosmos.base.query.v1beta1.PageRequest", + () => [ + { no: 1, name: "key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "offset", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 3, name: "limit", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 4, name: "count_total", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "reverse", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * 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; + * } + * + * @generated from message cosmos.base.query.v1beta1.PageResponse + */ +export const PageResponse = proto3.makeMessageType( + "cosmos.base.query.v1beta1.PageResponse", + () => [ + { no: 1, name: "next_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "total", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.d.ts b/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.d.ts new file mode 100644 index 0000000..72109b1 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.d.ts @@ -0,0 +1,128 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/base/v1beta1/coin.proto (package cosmos.base.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * 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. + * + * @generated from message cosmos.base.v1beta1.Coin + */ +export declare class Coin extends Message { + /** + * @generated from field: string denom = 1; + */ + denom: string; + + /** + * @generated from field: string amount = 2; + */ + amount: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.v1beta1.Coin"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Coin; + + static fromJson(jsonValue: JsonValue, options?: Partial): Coin; + + static fromJsonString(jsonString: string, options?: Partial): Coin; + + static equals(a: Coin | PlainMessage | undefined, b: Coin | PlainMessage | undefined): boolean; +} + +/** + * 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. + * + * @generated from message cosmos.base.v1beta1.DecCoin + */ +export declare class DecCoin extends Message { + /** + * @generated from field: string denom = 1; + */ + denom: string; + + /** + * @generated from field: string amount = 2; + */ + amount: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.v1beta1.DecCoin"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DecCoin; + + static fromJson(jsonValue: JsonValue, options?: Partial): DecCoin; + + static fromJsonString(jsonString: string, options?: Partial): DecCoin; + + static equals(a: DecCoin | PlainMessage | undefined, b: DecCoin | PlainMessage | undefined): boolean; +} + +/** + * IntProto defines a Protobuf wrapper around an Int object. + * + * @generated from message cosmos.base.v1beta1.IntProto + */ +export declare class IntProto extends Message { + /** + * @generated from field: string int = 1; + */ + int: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.v1beta1.IntProto"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IntProto; + + static fromJson(jsonValue: JsonValue, options?: Partial): IntProto; + + static fromJsonString(jsonString: string, options?: Partial): IntProto; + + static equals(a: IntProto | PlainMessage | undefined, b: IntProto | PlainMessage | undefined): boolean; +} + +/** + * DecProto defines a Protobuf wrapper around a Dec object. + * + * @generated from message cosmos.base.v1beta1.DecProto + */ +export declare class DecProto extends Message { + /** + * @generated from field: string dec = 1; + */ + dec: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.base.v1beta1.DecProto"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DecProto; + + static fromJson(jsonValue: JsonValue, options?: Partial): DecProto; + + static fromJsonString(jsonString: string, options?: Partial): DecProto; + + static equals(a: DecProto | PlainMessage | undefined, b: DecProto | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.js b/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.js new file mode 100644 index 0000000..8d67570 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/base/v1beta1/coin_pb.js @@ -0,0 +1,63 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/base/v1beta1/coin.proto (package cosmos.base.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * 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. + * + * @generated from message cosmos.base.v1beta1.Coin + */ +export const Coin = proto3.makeMessageType( + "cosmos.base.v1beta1.Coin", + () => [ + { no: 1, name: "denom", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * DecCoin defines a token with a denomination and a decimal amount. + * + * NOTE: The amount field is an Dec which implements the custom method + * signatures required by gogoproto. + * + * @generated from message cosmos.base.v1beta1.DecCoin + */ +export const DecCoin = proto3.makeMessageType( + "cosmos.base.v1beta1.DecCoin", + () => [ + { no: 1, name: "denom", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * IntProto defines a Protobuf wrapper around an Int object. + * + * @generated from message cosmos.base.v1beta1.IntProto + */ +export const IntProto = proto3.makeMessageType( + "cosmos.base.v1beta1.IntProto", + () => [ + { no: 1, name: "int", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * DecProto defines a Protobuf wrapper around a Dec object. + * + * @generated from message cosmos.base.v1beta1.DecProto + */ +export const DecProto = proto3.makeMessageType( + "cosmos.base.v1beta1.DecProto", + () => [ + { no: 1, name: "dec", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.d.ts b/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.d.ts new file mode 100644 index 0000000..6b869ef --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.d.ts @@ -0,0 +1,182 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/upgrade/v1beta1/upgrade.proto (package cosmos.upgrade.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Timestamp } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * Plan specifies information about a planned upgrade and when it should occur. + * + * @generated from message cosmos.upgrade.v1beta1.Plan + */ +export declare class Plan extends Message { + /** + * Sets the name for the upgrade. This name will be used by the upgraded + * version of the software to apply any special "on-upgrade" commands during + * the first BeginBlock method after the upgrade is applied. It is also used + * to detect whether a software version can handle a given upgrade. If no + * upgrade handler with this name has been set in the software, it will be + * assumed that the software is out-of-date when the upgrade Time or Height is + * reached and the software will exit. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + * has been removed from the SDK. + * If this field is not empty, an error will be thrown. + * + * @generated from field: google.protobuf.Timestamp time = 2 [deprecated = true]; + * @deprecated + */ + time?: Timestamp; + + /** + * The height at which the upgrade must be performed. + * Only used if Time is not set. + * + * @generated from field: int64 height = 3; + */ + height: bigint; + + /** + * Any application specific upgrade info to be included on-chain + * such as a git commit that validators could automatically upgrade to + * + * @generated from field: string info = 4; + */ + info: string; + + /** + * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + * moved to the IBC module in the sub module 02-client. + * If this field is not empty, an error will be thrown. + * + * @generated from field: google.protobuf.Any upgraded_client_state = 5 [deprecated = true]; + * @deprecated + */ + upgradedClientState?: Any; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.upgrade.v1beta1.Plan"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Plan; + + static fromJson(jsonValue: JsonValue, options?: Partial): Plan; + + static fromJsonString(jsonString: string, options?: Partial): Plan; + + static equals(a: Plan | PlainMessage | undefined, b: Plan | PlainMessage | undefined): boolean; +} + +/** + * SoftwareUpgradeProposal is a gov Content type for initiating a software + * upgrade. + * + * @generated from message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + */ +export declare class SoftwareUpgradeProposal extends Message { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: cosmos.upgrade.v1beta1.Plan plan = 3; + */ + plan?: Plan; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SoftwareUpgradeProposal; + + static fromJson(jsonValue: JsonValue, options?: Partial): SoftwareUpgradeProposal; + + static fromJsonString(jsonString: string, options?: Partial): SoftwareUpgradeProposal; + + static equals(a: SoftwareUpgradeProposal | PlainMessage | undefined, b: SoftwareUpgradeProposal | PlainMessage | undefined): boolean; +} + +/** + * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software + * upgrade. + * + * @generated from message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + */ +export declare class CancelSoftwareUpgradeProposal extends Message { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CancelSoftwareUpgradeProposal; + + static fromJson(jsonValue: JsonValue, options?: Partial): CancelSoftwareUpgradeProposal; + + static fromJsonString(jsonString: string, options?: Partial): CancelSoftwareUpgradeProposal; + + static equals(a: CancelSoftwareUpgradeProposal | PlainMessage | undefined, b: CancelSoftwareUpgradeProposal | PlainMessage | undefined): boolean; +} + +/** + * ModuleVersion specifies a module and its consensus version. + * + * @generated from message cosmos.upgrade.v1beta1.ModuleVersion + */ +export declare class ModuleVersion extends Message { + /** + * name of the app module + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * consensus version of the app module + * + * @generated from field: uint64 version = 2; + */ + version: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "cosmos.upgrade.v1beta1.ModuleVersion"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ModuleVersion; + + static fromJson(jsonValue: JsonValue, options?: Partial): ModuleVersion; + + static fromJsonString(jsonString: string, options?: Partial): ModuleVersion; + + static equals(a: ModuleVersion | PlainMessage | undefined, b: ModuleVersion | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.js b/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.js new file mode 100644 index 0000000..7989ff5 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/cosmos/upgrade/v1beta1/upgrade_pb.js @@ -0,0 +1,65 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file cosmos/upgrade/v1beta1/upgrade.proto (package cosmos.upgrade.v1beta1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Any, proto3, Timestamp } from "@bufbuild/protobuf"; + +/** + * Plan specifies information about a planned upgrade and when it should occur. + * + * @generated from message cosmos.upgrade.v1beta1.Plan + */ +export const Plan = proto3.makeMessageType( + "cosmos.upgrade.v1beta1.Plan", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "time", kind: "message", T: Timestamp }, + { no: 3, name: "height", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "info", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "upgraded_client_state", kind: "message", T: Any }, + ], +); + +/** + * SoftwareUpgradeProposal is a gov Content type for initiating a software + * upgrade. + * + * @generated from message cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + */ +export const SoftwareUpgradeProposal = proto3.makeMessageType( + "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal", + () => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "plan", kind: "message", T: Plan }, + ], +); + +/** + * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software + * upgrade. + * + * @generated from message cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + */ +export const CancelSoftwareUpgradeProposal = proto3.makeMessageType( + "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal", + () => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * ModuleVersion specifies a module and its consensus version. + * + * @generated from message cosmos.upgrade.v1beta1.ModuleVersion + */ +export const ModuleVersion = proto3.makeMessageType( + "cosmos.upgrade.v1beta1.ModuleVersion", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "version", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/google/api/http_pb.d.ts b/packages/cosmic-proto-es/src/gen/google/api/http_pb.d.ts new file mode 100644 index 0000000..b64d6bd --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/api/http_pb.d.ts @@ -0,0 +1,435 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/api/http.proto (package google.api, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + * + * @generated from message google.api.Http + */ +export declare class Http extends Message { + /** + * A list of HTTP configuration rules that apply to individual API methods. + * + * **NOTE:** All service configuration rules follow "last one wins" order. + * + * @generated from field: repeated google.api.HttpRule rules = 1; + */ + rules: HttpRule[]; + + /** + * When set to true, URL path parmeters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where "%2F" will be + * left encoded. + * + * The default behavior is to not decode RFC 6570 reserved characters in multi + * segment matches. + * + * @generated from field: bool fully_decode_reserved_expansion = 2; + */ + fullyDecodeReservedExpansion: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "google.api.Http"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Http; + + static fromJson(jsonValue: JsonValue, options?: Partial): Http; + + static fromJsonString(jsonString: string, options?: Partial): Http; + + static equals(a: Http | PlainMessage | undefined, b: Http | PlainMessage | undefined): boolean; +} + +/** + * `HttpRule` defines the mapping of an RPC method to one or more HTTP + * REST API methods. The mapping specifies how different portions of the RPC + * request message are mapped to URL path, URL query parameters, and + * HTTP request body. The mapping is typically specified as an + * `google.api.http` annotation on the RPC method, + * see "google/api/annotations.proto" for details. + * + * The mapping consists of a field specifying the path template and + * method kind. The path template can refer to fields in the request + * message, as in the example below which describes a REST GET + * operation on a resource collection of messages: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * SubMessage sub = 2; // `sub.subfield` is url-mapped + * } + * message Message { + * string text = 1; // content of the resource + * } + * + * The same http annotation can alternatively be expressed inside the + * `GRPC API Configuration` YAML file. + * + * http: + * rules: + * - selector: .Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * This definition enables an automatic, bidrectional mapping of HTTP + * JSON to RPC. Example: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` + * + * In general, not only fields but also field paths can be referenced + * from a path pattern. Fields mapped to the path pattern cannot be + * repeated and must have a primitive (non-message) type. + * + * Any fields in the request message which are not bound by the path + * pattern automatically become (optional) HTTP query + * parameters. Assume the following definition of the request message: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * int64 revision = 2; // becomes a parameter + * SubMessage sub = 3; // `sub.subfield` becomes a parameter + * } + * + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + * + * Note that fields which are mapped to HTTP parameters must have a + * primitive type or a repeated primitive type. Message types are not + * allowed. In the case of a repeated type, the parameter can be + * repeated in the URL, as in `...?param=A¶m=B`. + * + * For HTTP method kinds which allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice of + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * + * This enables the following two alternative HTTP JSON to RPC + * mappings: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` + * + * # Rules for HTTP mapping + * + * The rules for mapping HTTP path, query parameters, and body fields + * to the request message are as follows: + * + * 1. The `body` field specifies either `*` or a field path, or is + * omitted. If omitted, it indicates there is no HTTP request body. + * 2. Leaf fields (recursive expansion of nested messages in the + * request) can be classified into three types: + * (a) Matched in the URL template. + * (b) Covered by body (if body is `*`, everything except (a) fields; + * else everything under the body field) + * (c) All other fields. + * 3. URL query parameters found in the HTTP request are mapped to (c) fields. + * 4. Any body sent with an HTTP request can contain only (b) fields. + * + * The syntax of the path template is as follows: + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single path segment. The syntax `**` matches zero + * or more path segments, which must be the last part of the path except the + * `Verb`. The syntax `LITERAL` matches literal text in the path. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path, all characters + * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the + * Discovery Document as `{var}`. + * + * If a variable contains one or more path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path, all + * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables + * show up in the Discovery Document as `{+var}`. + * + * NOTE: While the single segment variable matches the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 + * Simple String Expansion, the multi segment variable **does not** match + * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. + * + * NOTE: the field paths in variables and in the `body` must not refer to + * repeated fields or map fields. + * + * @generated from message google.api.HttpRule + */ +export declare class HttpRule extends Message { + /** + * Selects methods to which this rule applies. + * + * Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + * + * @generated from field: string selector = 1; + */ + selector: string; + + /** + * Determines the URL pattern is matched by this rules. This pattern can be + * used with any of the {get|put|post|delete|patch} methods. A custom method + * can be defined using the 'custom' field. + * + * @generated from oneof google.api.HttpRule.pattern + */ + pattern: { + /** + * Used for listing and getting information about resources. + * + * @generated from field: string get = 2; + */ + value: string; + case: "get"; + } | { + /** + * Used for updating a resource. + * + * @generated from field: string put = 3; + */ + value: string; + case: "put"; + } | { + /** + * Used for creating a resource. + * + * @generated from field: string post = 4; + */ + value: string; + case: "post"; + } | { + /** + * Used for deleting a resource. + * + * @generated from field: string delete = 5; + */ + value: string; + case: "delete"; + } | { + /** + * Used for updating a resource. + * + * @generated from field: string patch = 6; + */ + value: string; + case: "patch"; + } | { + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave the + * HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + * + * @generated from field: google.api.CustomHttpPattern custom = 8; + */ + value: CustomHttpPattern; + case: "custom"; + } | { case: undefined; value?: undefined }; + + /** + * The name of the request field whose value is mapped to the HTTP body, or + * `*` for mapping all fields not captured by the path pattern to the HTTP + * body. NOTE: the referred field must not be a repeated field and must be + * present at the top-level of request message type. + * + * @generated from field: string body = 7; + */ + body: string; + + /** + * Optional. The name of the response field whose value is mapped to the HTTP + * body of response. Other response fields are ignored. When + * not set, the response message will be used as HTTP body of response. + * + * @generated from field: string response_body = 12; + */ + responseBody: string; + + /** + * Additional HTTP bindings for the selector. Nested bindings must + * not contain an `additional_bindings` field themselves (that is, + * the nesting may only be one level deep). + * + * @generated from field: repeated google.api.HttpRule additional_bindings = 11; + */ + additionalBindings: HttpRule[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "google.api.HttpRule"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): HttpRule; + + static fromJson(jsonValue: JsonValue, options?: Partial): HttpRule; + + static fromJsonString(jsonString: string, options?: Partial): HttpRule; + + static equals(a: HttpRule | PlainMessage | undefined, b: HttpRule | PlainMessage | undefined): boolean; +} + +/** + * A custom pattern is used for defining custom HTTP verb. + * + * @generated from message google.api.CustomHttpPattern + */ +export declare class CustomHttpPattern extends Message { + /** + * The name of this custom HTTP verb. + * + * @generated from field: string kind = 1; + */ + kind: string; + + /** + * The path matched by this custom verb. + * + * @generated from field: string path = 2; + */ + path: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "google.api.CustomHttpPattern"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CustomHttpPattern; + + static fromJson(jsonValue: JsonValue, options?: Partial): CustomHttpPattern; + + static fromJsonString(jsonString: string, options?: Partial): CustomHttpPattern; + + static equals(a: CustomHttpPattern | PlainMessage | undefined, b: CustomHttpPattern | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/google/api/http_pb.js b/packages/cosmic-proto-es/src/gen/google/api/http_pb.js new file mode 100644 index 0000000..e4e4f27 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/api/http_pb.js @@ -0,0 +1,286 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/api/http.proto (package google.api, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * Defines the HTTP configuration for an API service. It contains a list of + * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method + * to one or more HTTP REST API methods. + * + * @generated from message google.api.Http + */ +export const Http = proto3.makeMessageType( + "google.api.Http", + () => [ + { no: 1, name: "rules", kind: "message", T: HttpRule, repeated: true }, + { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * `HttpRule` defines the mapping of an RPC method to one or more HTTP + * REST API methods. The mapping specifies how different portions of the RPC + * request message are mapped to URL path, URL query parameters, and + * HTTP request body. The mapping is typically specified as an + * `google.api.http` annotation on the RPC method, + * see "google/api/annotations.proto" for details. + * + * The mapping consists of a field specifying the path template and + * method kind. The path template can refer to fields in the request + * message, as in the example below which describes a REST GET + * operation on a resource collection of messages: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * SubMessage sub = 2; // `sub.subfield` is url-mapped + * } + * message Message { + * string text = 1; // content of the resource + * } + * + * The same http annotation can alternatively be expressed inside the + * `GRPC API Configuration` YAML file. + * + * http: + * rules: + * - selector: .Messaging.GetMessage + * get: /v1/messages/{message_id}/{sub.subfield} + * + * This definition enables an automatic, bidrectional mapping of HTTP + * JSON to RPC. Example: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` + * + * In general, not only fields but also field paths can be referenced + * from a path pattern. Fields mapped to the path pattern cannot be + * repeated and must have a primitive (non-message) type. + * + * Any fields in the request message which are not bound by the path + * pattern automatically become (optional) HTTP query + * parameters. Assume the following definition of the request message: + * + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http).get = "/v1/messages/{message_id}"; + * } + * } + * message GetMessageRequest { + * message SubMessage { + * string subfield = 1; + * } + * string message_id = 1; // mapped to the URL + * int64 revision = 2; // becomes a parameter + * SubMessage sub = 3; // `sub.subfield` becomes a parameter + * } + * + * + * This enables a HTTP JSON to RPC mapping as below: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + * + * Note that fields which are mapped to HTTP parameters must have a + * primitive type or a repeated primitive type. Message types are not + * allowed. In the case of a repeated type, the parameter can be + * repeated in the URL, as in `...?param=A¶m=B`. + * + * For HTTP method kinds which allow a request body, the `body` field + * specifies the mapping. Consider a REST update method on the + * message resource collection: + * + * + * service Messaging { + * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "message" + * }; + * } + * } + * message UpdateMessageRequest { + * string message_id = 1; // mapped to the URL + * Message message = 2; // mapped to the body + * } + * + * + * The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by + * protos JSON encoding: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` + * + * The special name `*` can be used in the body mapping to define that + * every field not bound by the path template should be mapped to the + * request body. This enables the following alternative definition of + * the update method: + * + * service Messaging { + * rpc UpdateMessage(Message) returns (Message) { + * option (google.api.http) = { + * put: "/v1/messages/{message_id}" + * body: "*" + * }; + * } + * } + * message Message { + * string message_id = 1; + * string text = 2; + * } + * + * + * The following HTTP JSON to RPC mapping is enabled: + * + * HTTP | RPC + * -----|----- + * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` + * + * Note that when using `*` in the body mapping, it is not possible to + * have HTTP parameters, as all fields not bound by the path end in + * the body. This makes this option more rarely used in practice of + * defining REST APIs. The common usage of `*` is in custom methods + * which don't use the URL at all for transferring data. + * + * It is possible to define multiple HTTP methods for one RPC by using + * the `additional_bindings` option. Example: + * + * service Messaging { + * rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { + * get: "/v1/messages/{message_id}" + * additional_bindings { + * get: "/v1/users/{user_id}/messages/{message_id}" + * } + * }; + * } + * } + * message GetMessageRequest { + * string message_id = 1; + * string user_id = 2; + * } + * + * + * This enables the following two alternative HTTP JSON to RPC + * mappings: + * + * HTTP | RPC + * -----|----- + * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` + * + * # Rules for HTTP mapping + * + * The rules for mapping HTTP path, query parameters, and body fields + * to the request message are as follows: + * + * 1. The `body` field specifies either `*` or a field path, or is + * omitted. If omitted, it indicates there is no HTTP request body. + * 2. Leaf fields (recursive expansion of nested messages in the + * request) can be classified into three types: + * (a) Matched in the URL template. + * (b) Covered by body (if body is `*`, everything except (a) fields; + * else everything under the body field) + * (c) All other fields. + * 3. URL query parameters found in the HTTP request are mapped to (c) fields. + * 4. Any body sent with an HTTP request can contain only (b) fields. + * + * The syntax of the path template is as follows: + * + * Template = "/" Segments [ Verb ] ; + * Segments = Segment { "/" Segment } ; + * Segment = "*" | "**" | LITERAL | Variable ; + * Variable = "{" FieldPath [ "=" Segments ] "}" ; + * FieldPath = IDENT { "." IDENT } ; + * Verb = ":" LITERAL ; + * + * The syntax `*` matches a single path segment. The syntax `**` matches zero + * or more path segments, which must be the last part of the path except the + * `Verb`. The syntax `LITERAL` matches literal text in the path. + * + * The syntax `Variable` matches part of the URL path as specified by its + * template. A variable template must not contain other variables. If a variable + * matches a single path segment, its template may be omitted, e.g. `{var}` + * is equivalent to `{var=*}`. + * + * If a variable contains exactly one path segment, such as `"{var}"` or + * `"{var=*}"`, when such a variable is expanded into a URL path, all characters + * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the + * Discovery Document as `{var}`. + * + * If a variable contains one or more path segments, such as `"{var=foo/*}"` + * or `"{var=**}"`, when such a variable is expanded into a URL path, all + * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables + * show up in the Discovery Document as `{+var}`. + * + * NOTE: While the single segment variable matches the semantics of + * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 + * Simple String Expansion, the multi segment variable **does not** match + * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead + * to invalid URLs. + * + * NOTE: the field paths in variables and in the `body` must not refer to + * repeated fields or map fields. + * + * @generated from message google.api.HttpRule + */ +export const HttpRule = proto3.makeMessageType( + "google.api.HttpRule", + () => [ + { no: 1, name: "selector", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "get", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" }, + { no: 3, name: "put", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" }, + { no: 4, name: "post", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" }, + { no: 5, name: "delete", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" }, + { no: 6, name: "patch", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" }, + { no: 8, name: "custom", kind: "message", T: CustomHttpPattern, oneof: "pattern" }, + { no: 7, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "response_body", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "additional_bindings", kind: "message", T: HttpRule, repeated: true }, + ], +); + +/** + * A custom pattern is used for defining custom HTTP verb. + * + * @generated from message google.api.CustomHttpPattern + */ +export const CustomHttpPattern = proto3.makeMessageType( + "google.api.CustomHttpPattern", + () => [ + { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.d.ts b/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.d.ts new file mode 100644 index 0000000..536c4fc --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.d.ts @@ -0,0 +1,104 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/api/httpbody.proto (package google.api, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * Message that represents an arbitrary HTTP body. It should only be used for + * payload formats that can't be represented as JSON, such as raw binary or + * an HTML page. + * + * + * This message can be used both in streaming and non-streaming API methods in + * the request as well as the response. + * + * It can be used as a top-level request field, which is convenient if one + * wants to extract parameters from either the URL or HTTP template into the + * request fields and also want access to the raw HTTP body. + * + * Example: + * + * message GetResourceRequest { + * // A unique request id. + * string request_id = 1; + * + * // The raw HTTP body is bound to this field. + * google.api.HttpBody http_body = 2; + * } + * + * service ResourceService { + * rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); + * rpc UpdateResource(google.api.HttpBody) returns + * (google.protobuf.Empty); + * } + * + * Example with streaming methods: + * + * service CaldavService { + * rpc GetCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * rpc UpdateCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * } + * + * Use of this type only changes how the request and response bodies are + * handled, all other features will continue to work unchanged. + * + * @generated from message google.api.HttpBody + */ +export declare class HttpBody extends Message { + /** + * The HTTP Content-Type header value specifying the content type of the body. + * + * @generated from field: string content_type = 1; + */ + contentType: string; + + /** + * The HTTP request/response body as raw binary. + * + * @generated from field: bytes data = 2; + */ + data: Uint8Array; + + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * + * @generated from field: repeated google.protobuf.Any extensions = 3; + */ + extensions: Any[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "google.api.HttpBody"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): HttpBody; + + static fromJson(jsonValue: JsonValue, options?: Partial): HttpBody; + + static fromJsonString(jsonString: string, options?: Partial): HttpBody; + + static equals(a: HttpBody | PlainMessage | undefined, b: HttpBody | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.js b/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.js new file mode 100644 index 0000000..746d2d0 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/api/httpbody_pb.js @@ -0,0 +1,74 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/api/httpbody.proto (package google.api, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Any, proto3 } from "@bufbuild/protobuf"; + +/** + * Message that represents an arbitrary HTTP body. It should only be used for + * payload formats that can't be represented as JSON, such as raw binary or + * an HTML page. + * + * + * This message can be used both in streaming and non-streaming API methods in + * the request as well as the response. + * + * It can be used as a top-level request field, which is convenient if one + * wants to extract parameters from either the URL or HTTP template into the + * request fields and also want access to the raw HTTP body. + * + * Example: + * + * message GetResourceRequest { + * // A unique request id. + * string request_id = 1; + * + * // The raw HTTP body is bound to this field. + * google.api.HttpBody http_body = 2; + * } + * + * service ResourceService { + * rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); + * rpc UpdateResource(google.api.HttpBody) returns + * (google.protobuf.Empty); + * } + * + * Example with streaming methods: + * + * service CaldavService { + * rpc GetCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * rpc UpdateCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * } + * + * Use of this type only changes how the request and response bodies are + * handled, all other features will continue to work unchanged. + * + * @generated from message google.api.HttpBody + */ +export const HttpBody = proto3.makeMessageType( + "google.api.HttpBody", + () => [ + { no: 1, name: "content_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "extensions", kind: "message", T: Any, repeated: true }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.d.ts b/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.d.ts new file mode 100644 index 0000000..5908d72 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.d.ts @@ -0,0 +1,193 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, IMessageTypeRegistry, JsonReadOptions, JsonValue, MessageType, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * + * @generated from message google.protobuf.Any + */ +export declare class Any extends Message { + /** + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a [google.protobuf.Type][] + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * + * @generated from field: string type_url = 1; + */ + typeUrl: string; + + /** + * Must be a valid serialized protocol buffer of the above specified type. + * + * @generated from field: bytes value = 2; + */ + value: Uint8Array; + + constructor(data?: PartialMessage); + + packFrom(message: Message): void; + + unpackTo(target: Message): boolean; + + unpack(registry: IMessageTypeRegistry): Message | undefined; + + is(type: MessageType | string): boolean; + + private typeNameToUrl(name: string): string; + + private typeUrlToName(url: string): string; + + static readonly runtime: typeof proto3; + static readonly typeName = "google.protobuf.Any"; + static readonly fields: FieldList; + + static pack(message: Message): Any; + + static fromBinary(bytes: Uint8Array, options?: Partial): Any; + + static fromJson(jsonValue: JsonValue, options?: Partial): Any; + + static fromJsonString(jsonString: string, options?: Partial): Any; + + static equals(a: Any | PlainMessage | undefined, b: Any | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.js b/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.js new file mode 100644 index 0000000..c7587bd --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/google/protobuf/any_pb.js @@ -0,0 +1,234 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// @generated by protoc-gen-es v1.5.0 +// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * + * @generated from message google.protobuf.Any + */ +export const Any = proto3.makeMessageType( + "google.protobuf.Any", + () => [ + { no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +Any.prototype.toJson = function toJson(options) { + if (this.typeUrl === "") { + return {}; + } + const typeName = this.typeUrlToName(this.typeUrl); + const messageType = options?.typeRegistry?.findMessage(typeName); + if (!messageType) { + throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`); + } + const message = messageType.fromBinary(this.value); + let json = message.toJson(options); + if (typeName.startsWith("google.protobuf.") || (json === null || Array.isArray(json) || typeof json !== "object")) { + json = {value: json}; + } + json["@type"] = this.typeUrl; + return json; +}; + +Any.prototype.fromJson = function fromJson(json, options) { + if (json === null || Array.isArray(json) || typeof json != "object") { + throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${json === null ? "null" : Array.isArray(json) ? "array" : typeof json}`); + } + if (Object.keys(json).length == 0) { + return this; + } + const typeUrl = json["@type"]; + if (typeof typeUrl != "string" || typeUrl == "") { + throw new Error(`cannot decode message google.protobuf.Any from JSON: "@type" is empty`); + } + const typeName = this.typeUrlToName(typeUrl), messageType = options?.typeRegistry?.findMessage(typeName); + if (!messageType) { + throw new Error(`cannot decode message google.protobuf.Any from JSON: ${typeUrl} is not in the type registry`); + } + let message; + if (typeName.startsWith("google.protobuf.") && Object.prototype.hasOwnProperty.call(json, "value")) { + message = messageType.fromJson(json["value"], options); + } else { + const copy = Object.assign({}, json); + delete copy["@type"]; + message = messageType.fromJson(copy, options); + } + this.packFrom(message); + return this; +}; + +Any.prototype.packFrom = function packFrom(message) { + this.value = message.toBinary(); + this.typeUrl = this.typeNameToUrl(message.getType().typeName); +}; + +Any.prototype.unpackTo = function unpackTo(target) { + if (!this.is(target.getType())) { + return false; + } + target.fromBinary(this.value); + return true; +}; + +Any.prototype.unpack = function unpack(registry) { + if (this.typeUrl === "") { + return undefined; + } + const messageType = registry.findMessage(this.typeUrlToName(this.typeUrl)); + if (!messageType) { + return undefined; + } + return messageType.fromBinary(this.value); + } + +Any.prototype.is = function is(type) { + if (this.typeUrl === '') { + return false; + } + const name = this.typeUrlToName(this.typeUrl); + let typeName = ''; + if (typeof type === 'string') { + typeName = type; + } else { + typeName = type.typeName; + } + return name === typeName; +}; + +Any.prototype.typeNameToUrl = function typeNameToUrl(name) { + return `type.googleapis.com/${name}`; +}; + +Any.prototype.typeUrlToName = function typeUrlToName(url) { + if (!url.length) { + throw new Error(`invalid type url: ${url}`); + } + const slash = url.lastIndexOf("/"); + const name = slash >= 0 ? url.substring(slash + 1) : url; + if (!name.length) { + throw new Error(`invalid type url: ${url}`); + } + return name; +}; + +Any.pack = function pack(message) { + const any = new Any(); + any.packFrom(message); + return any; +}; + diff --git a/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.d.ts b/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.d.ts new file mode 100644 index 0000000..52838de --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.d.ts @@ -0,0 +1,426 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file ibc/core/channel/v1/channel.proto (package ibc.core.channel.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Height } from "../../client/v1/client_pb.js"; + +/** + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * @generated from enum ibc.core.channel.v1.State + */ +export declare enum State { + /** + * Default State + * + * @generated from enum value: STATE_UNINITIALIZED_UNSPECIFIED = 0; + */ + UNINITIALIZED_UNSPECIFIED = 0, + + /** + * A channel has just started the opening handshake. + * + * @generated from enum value: STATE_INIT = 1; + */ + INIT = 1, + + /** + * A channel has acknowledged the handshake step on the counterparty chain. + * + * @generated from enum value: STATE_TRYOPEN = 2; + */ + TRYOPEN = 2, + + /** + * A channel has completed the handshake. Open channels are + * ready to send and receive packets. + * + * @generated from enum value: STATE_OPEN = 3; + */ + OPEN = 3, + + /** + * A channel has been closed and can no longer be used to send or receive + * packets. + * + * @generated from enum value: STATE_CLOSED = 4; + */ + CLOSED = 4, +} + +/** + * Order defines if a channel is ORDERED or UNORDERED + * + * @generated from enum ibc.core.channel.v1.Order + */ +export declare enum Order { + /** + * zero-value for channel ordering + * + * @generated from enum value: ORDER_NONE_UNSPECIFIED = 0; + */ + NONE_UNSPECIFIED = 0, + + /** + * packets can be delivered in any order, which may differ from the order in + * which they were sent. + * + * @generated from enum value: ORDER_UNORDERED = 1; + */ + UNORDERED = 1, + + /** + * packets are delivered exactly in the order which they were sent + * + * @generated from enum value: ORDER_ORDERED = 2; + */ + ORDERED = 2, +} + +/** + * 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. + * + * @generated from message ibc.core.channel.v1.Channel + */ +export declare class Channel extends Message { + /** + * current state of the channel end + * + * @generated from field: ibc.core.channel.v1.State state = 1; + */ + state: State; + + /** + * whether the channel is ordered or unordered + * + * @generated from field: ibc.core.channel.v1.Order ordering = 2; + */ + ordering: Order; + + /** + * counterparty channel end + * + * @generated from field: ibc.core.channel.v1.Counterparty counterparty = 3; + */ + counterparty?: Counterparty; + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + * + * @generated from field: repeated string connection_hops = 4; + */ + connectionHops: string[]; + + /** + * opaque channel version, which is agreed upon during the handshake + * + * @generated from field: string version = 5; + */ + version: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.Channel"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Channel; + + static fromJson(jsonValue: JsonValue, options?: Partial): Channel; + + static fromJsonString(jsonString: string, options?: Partial): Channel; + + static equals(a: Channel | PlainMessage | undefined, b: Channel | PlainMessage | undefined): boolean; +} + +/** + * IdentifiedChannel defines a channel with additional port and channel + * identifier fields. + * + * @generated from message ibc.core.channel.v1.IdentifiedChannel + */ +export declare class IdentifiedChannel extends Message { + /** + * current state of the channel end + * + * @generated from field: ibc.core.channel.v1.State state = 1; + */ + state: State; + + /** + * whether the channel is ordered or unordered + * + * @generated from field: ibc.core.channel.v1.Order ordering = 2; + */ + ordering: Order; + + /** + * counterparty channel end + * + * @generated from field: ibc.core.channel.v1.Counterparty counterparty = 3; + */ + counterparty?: Counterparty; + + /** + * list of connection identifiers, in order, along which packets sent on + * this channel will travel + * + * @generated from field: repeated string connection_hops = 4; + */ + connectionHops: string[]; + + /** + * opaque channel version, which is agreed upon during the handshake + * + * @generated from field: string version = 5; + */ + version: string; + + /** + * port identifier + * + * @generated from field: string port_id = 6; + */ + portId: string; + + /** + * channel identifier + * + * @generated from field: string channel_id = 7; + */ + channelId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.IdentifiedChannel"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IdentifiedChannel; + + static fromJson(jsonValue: JsonValue, options?: Partial): IdentifiedChannel; + + static fromJsonString(jsonString: string, options?: Partial): IdentifiedChannel; + + static equals(a: IdentifiedChannel | PlainMessage | undefined, b: IdentifiedChannel | PlainMessage | undefined): boolean; +} + +/** + * Counterparty defines a channel end counterparty + * + * @generated from message ibc.core.channel.v1.Counterparty + */ +export declare class Counterparty extends Message { + /** + * port on the counterparty chain which owns the other end of the channel. + * + * @generated from field: string port_id = 1; + */ + portId: string; + + /** + * channel end on the counterparty chain + * + * @generated from field: string channel_id = 2; + */ + channelId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.Counterparty"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Counterparty; + + static fromJson(jsonValue: JsonValue, options?: Partial): Counterparty; + + static fromJsonString(jsonString: string, options?: Partial): Counterparty; + + static equals(a: Counterparty | PlainMessage | undefined, b: Counterparty | PlainMessage | undefined): boolean; +} + +/** + * Packet defines a type that carries data across different chains through IBC + * + * @generated from message ibc.core.channel.v1.Packet + */ +export declare class Packet extends Message { + /** + * number corresponds to the order of sends and receives, where a Packet + * with an earlier sequence number must be sent and received before a Packet + * with a later sequence number. + * + * @generated from field: uint64 sequence = 1; + */ + sequence: bigint; + + /** + * identifies the port on the sending chain. + * + * @generated from field: string source_port = 2; + */ + sourcePort: string; + + /** + * identifies the channel end on the sending chain. + * + * @generated from field: string source_channel = 3; + */ + sourceChannel: string; + + /** + * identifies the port on the receiving chain. + * + * @generated from field: string destination_port = 4; + */ + destinationPort: string; + + /** + * identifies the channel end on the receiving chain. + * + * @generated from field: string destination_channel = 5; + */ + destinationChannel: string; + + /** + * actual opaque bytes transferred directly to the application module + * + * @generated from field: bytes data = 6; + */ + data: Uint8Array; + + /** + * block height after which the packet times out + * + * @generated from field: ibc.core.client.v1.Height timeout_height = 7; + */ + timeoutHeight?: Height; + + /** + * block timestamp (in nanoseconds) after which the packet times out + * + * @generated from field: uint64 timeout_timestamp = 8; + */ + timeoutTimestamp: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.Packet"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Packet; + + static fromJson(jsonValue: JsonValue, options?: Partial): Packet; + + static fromJsonString(jsonString: string, options?: Partial): Packet; + + static equals(a: Packet | PlainMessage | undefined, b: Packet | PlainMessage | undefined): boolean; +} + +/** + * 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. + * + * @generated from message ibc.core.channel.v1.PacketState + */ +export declare class PacketState extends Message { + /** + * channel port identifier. + * + * @generated from field: string port_id = 1; + */ + portId: string; + + /** + * channel unique identifier. + * + * @generated from field: string channel_id = 2; + */ + channelId: string; + + /** + * packet sequence. + * + * @generated from field: uint64 sequence = 3; + */ + sequence: bigint; + + /** + * embedded data that represents packet state. + * + * @generated from field: bytes data = 4; + */ + data: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.PacketState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PacketState; + + static fromJson(jsonValue: JsonValue, options?: Partial): PacketState; + + static fromJsonString(jsonString: string, options?: Partial): PacketState; + + static equals(a: PacketState | PlainMessage | undefined, b: PacketState | PlainMessage | undefined): boolean; +} + +/** + * Acknowledgement is the recommended acknowledgement format to be used by + * app-specific protocols. + * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental + * conflicts with other protobuf message formats used for acknowledgements. + * The first byte of any message with this format will be the non-ASCII values + * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: + * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope + * + * @generated from message ibc.core.channel.v1.Acknowledgement + */ +export declare class Acknowledgement extends Message { + /** + * response contains either a result or an error and must be non-empty + * + * @generated from oneof ibc.core.channel.v1.Acknowledgement.response + */ + response: { + /** + * @generated from field: bytes result = 21; + */ + value: Uint8Array; + case: "result"; + } | { + /** + * @generated from field: string error = 22; + */ + value: string; + case: "error"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.channel.v1.Acknowledgement"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Acknowledgement; + + static fromJson(jsonValue: JsonValue, options?: Partial): Acknowledgement; + + static fromJsonString(jsonString: string, options?: Partial): Acknowledgement; + + static equals(a: Acknowledgement | PlainMessage | undefined, b: Acknowledgement | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.js b/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.js new file mode 100644 index 0000000..adf79de --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/ibc/core/channel/v1/channel_pb.js @@ -0,0 +1,145 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file ibc/core/channel/v1/channel.proto (package ibc.core.channel.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { Height } from "../../client/v1/client_pb.js"; + +/** + * State defines if a channel is in one of the following states: + * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + * + * @generated from enum ibc.core.channel.v1.State + */ +export const State = proto3.makeEnum( + "ibc.core.channel.v1.State", + [ + {no: 0, name: "STATE_UNINITIALIZED_UNSPECIFIED", localName: "UNINITIALIZED_UNSPECIFIED"}, + {no: 1, name: "STATE_INIT", localName: "INIT"}, + {no: 2, name: "STATE_TRYOPEN", localName: "TRYOPEN"}, + {no: 3, name: "STATE_OPEN", localName: "OPEN"}, + {no: 4, name: "STATE_CLOSED", localName: "CLOSED"}, + ], +); + +/** + * Order defines if a channel is ORDERED or UNORDERED + * + * @generated from enum ibc.core.channel.v1.Order + */ +export const Order = proto3.makeEnum( + "ibc.core.channel.v1.Order", + [ + {no: 0, name: "ORDER_NONE_UNSPECIFIED", localName: "NONE_UNSPECIFIED"}, + {no: 1, name: "ORDER_UNORDERED", localName: "UNORDERED"}, + {no: 2, name: "ORDER_ORDERED", localName: "ORDERED"}, + ], +); + +/** + * 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. + * + * @generated from message ibc.core.channel.v1.Channel + */ +export const Channel = proto3.makeMessageType( + "ibc.core.channel.v1.Channel", + () => [ + { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(State) }, + { no: 2, name: "ordering", kind: "enum", T: proto3.getEnumType(Order) }, + { no: 3, name: "counterparty", kind: "message", T: Counterparty }, + { no: 4, name: "connection_hops", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * IdentifiedChannel defines a channel with additional port and channel + * identifier fields. + * + * @generated from message ibc.core.channel.v1.IdentifiedChannel + */ +export const IdentifiedChannel = proto3.makeMessageType( + "ibc.core.channel.v1.IdentifiedChannel", + () => [ + { no: 1, name: "state", kind: "enum", T: proto3.getEnumType(State) }, + { no: 2, name: "ordering", kind: "enum", T: proto3.getEnumType(Order) }, + { no: 3, name: "counterparty", kind: "message", T: Counterparty }, + { no: 4, name: "connection_hops", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "port_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "channel_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * Counterparty defines a channel end counterparty + * + * @generated from message ibc.core.channel.v1.Counterparty + */ +export const Counterparty = proto3.makeMessageType( + "ibc.core.channel.v1.Counterparty", + () => [ + { no: 1, name: "port_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "channel_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * Packet defines a type that carries data across different chains through IBC + * + * @generated from message ibc.core.channel.v1.Packet + */ +export const Packet = proto3.makeMessageType( + "ibc.core.channel.v1.Packet", + () => [ + { no: 1, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: "source_port", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "source_channel", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "destination_port", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "destination_channel", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 7, name: "timeout_height", kind: "message", T: Height }, + { no: 8, name: "timeout_timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ], +); + +/** + * 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. + * + * @generated from message ibc.core.channel.v1.PacketState + */ +export const PacketState = proto3.makeMessageType( + "ibc.core.channel.v1.PacketState", + () => [ + { no: 1, name: "port_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "channel_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 4, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * Acknowledgement is the recommended acknowledgement format to be used by + * app-specific protocols. + * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental + * conflicts with other protobuf message formats used for acknowledgements. + * The first byte of any message with this format will be the non-ASCII values + * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: + * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope + * + * @generated from message ibc.core.channel.v1.Acknowledgement + */ +export const Acknowledgement = proto3.makeMessageType( + "ibc.core.channel.v1.Acknowledgement", + () => [ + { no: 21, name: "result", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "response" }, + { no: 22, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "response" }, + ], +); + diff --git a/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.d.ts b/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.d.ts new file mode 100644 index 0000000..f4d4cee --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.d.ts @@ -0,0 +1,291 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file ibc/core/client/v1/client.proto (package ibc.core.client.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { Any, BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade_pb.js"; + +/** + * IdentifiedClientState defines a client state with an additional client + * identifier field. + * + * @generated from message ibc.core.client.v1.IdentifiedClientState + */ +export declare class IdentifiedClientState extends Message { + /** + * client identifier + * + * @generated from field: string client_id = 1; + */ + clientId: string; + + /** + * client state + * + * @generated from field: google.protobuf.Any client_state = 2; + */ + clientState?: Any; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.IdentifiedClientState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IdentifiedClientState; + + static fromJson(jsonValue: JsonValue, options?: Partial): IdentifiedClientState; + + static fromJsonString(jsonString: string, options?: Partial): IdentifiedClientState; + + static equals(a: IdentifiedClientState | PlainMessage | undefined, b: IdentifiedClientState | PlainMessage | undefined): boolean; +} + +/** + * ConsensusStateWithHeight defines a consensus state with an additional height + * field. + * + * @generated from message ibc.core.client.v1.ConsensusStateWithHeight + */ +export declare class ConsensusStateWithHeight extends Message { + /** + * consensus state height + * + * @generated from field: ibc.core.client.v1.Height height = 1; + */ + height?: Height; + + /** + * consensus state + * + * @generated from field: google.protobuf.Any consensus_state = 2; + */ + consensusState?: Any; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.ConsensusStateWithHeight"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConsensusStateWithHeight; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConsensusStateWithHeight; + + static fromJsonString(jsonString: string, options?: Partial): ConsensusStateWithHeight; + + static equals(a: ConsensusStateWithHeight | PlainMessage | undefined, b: ConsensusStateWithHeight | PlainMessage | undefined): boolean; +} + +/** + * ClientConsensusStates defines all the stored consensus states for a given + * client. + * + * @generated from message ibc.core.client.v1.ClientConsensusStates + */ +export declare class ClientConsensusStates extends Message { + /** + * client identifier + * + * @generated from field: string client_id = 1; + */ + clientId: string; + + /** + * consensus states and their heights associated with the client + * + * @generated from field: repeated ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2; + */ + consensusStates: ConsensusStateWithHeight[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.ClientConsensusStates"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientConsensusStates; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientConsensusStates; + + static fromJsonString(jsonString: string, options?: Partial): ClientConsensusStates; + + static equals(a: ClientConsensusStates | PlainMessage | undefined, b: ClientConsensusStates | PlainMessage | undefined): boolean; +} + +/** + * ClientUpdateProposal is a governance proposal. If it passes, the substitute + * client's latest consensus state is copied over to the subject client. The proposal + * handler may fail if the subject and the substitute do not match in client and + * chain parameters (with exception to latest height, frozen height, and chain-id). + * + * @generated from message ibc.core.client.v1.ClientUpdateProposal + */ +export declare class ClientUpdateProposal extends Message { + /** + * the title of the update proposal + * + * @generated from field: string title = 1; + */ + title: string; + + /** + * the description of the proposal + * + * @generated from field: string description = 2; + */ + description: string; + + /** + * the client identifier for the client to be updated if the proposal passes + * + * @generated from field: string subject_client_id = 3; + */ + subjectClientId: string; + + /** + * the substitute client identifier for the client standing in for the subject + * client + * + * @generated from field: string substitute_client_id = 4; + */ + substituteClientId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.ClientUpdateProposal"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientUpdateProposal; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientUpdateProposal; + + static fromJsonString(jsonString: string, options?: Partial): ClientUpdateProposal; + + static equals(a: ClientUpdateProposal | PlainMessage | undefined, b: ClientUpdateProposal | PlainMessage | undefined): boolean; +} + +/** + * UpgradeProposal is a gov Content type for initiating an IBC breaking + * upgrade. + * + * @generated from message ibc.core.client.v1.UpgradeProposal + */ +export declare class UpgradeProposal extends Message { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: cosmos.upgrade.v1beta1.Plan plan = 3; + */ + plan?: Plan; + + /** + * An UpgradedClientState must be provided to perform an IBC breaking upgrade. + * This will make the chain commit to the correct upgraded (self) client state + * before the upgrade occurs, so that connecting chains can verify that the + * new upgraded client is valid by verifying a proof on the previous version + * of the chain. This will allow IBC connections to persist smoothly across + * planned chain upgrades + * + * @generated from field: google.protobuf.Any upgraded_client_state = 4; + */ + upgradedClientState?: Any; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.UpgradeProposal"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpgradeProposal; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpgradeProposal; + + static fromJsonString(jsonString: string, options?: Partial): UpgradeProposal; + + static equals(a: UpgradeProposal | PlainMessage | undefined, b: UpgradeProposal | PlainMessage | undefined): boolean; +} + +/** + * Height is a monotonically increasing data type + * that can be compared against another Height for the purposes of updating and + * freezing clients + * + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + * + * @generated from message ibc.core.client.v1.Height + */ +export declare class Height extends Message { + /** + * the revision that the client is currently on + * + * @generated from field: uint64 revision_number = 1; + */ + revisionNumber: bigint; + + /** + * the height within the given revision + * + * @generated from field: uint64 revision_height = 2; + */ + revisionHeight: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.Height"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Height; + + static fromJson(jsonValue: JsonValue, options?: Partial): Height; + + static fromJsonString(jsonString: string, options?: Partial): Height; + + static equals(a: Height | PlainMessage | undefined, b: Height | PlainMessage | undefined): boolean; +} + +/** + * Params defines the set of IBC light client parameters. + * + * @generated from message ibc.core.client.v1.Params + */ +export declare class Params extends Message { + /** + * allowed_clients defines the list of allowed client state types. + * + * @generated from field: repeated string allowed_clients = 1; + */ + allowedClients: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "ibc.core.client.v1.Params"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Params; + + static fromJson(jsonValue: JsonValue, options?: Partial): Params; + + static fromJsonString(jsonString: string, options?: Partial): Params; + + static equals(a: Params | PlainMessage | undefined, b: Params | PlainMessage | undefined): boolean; +} + diff --git a/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.js b/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.js new file mode 100644 index 0000000..0511782 --- /dev/null +++ b/packages/cosmic-proto-es/src/gen/ibc/core/client/v1/client_pb.js @@ -0,0 +1,118 @@ +// @generated by protoc-gen-es v1.5.0 +// @generated from file ibc/core/client/v1/client.proto (package ibc.core.client.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Any, proto3 } from "@bufbuild/protobuf"; +import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade_pb.js"; + +/** + * IdentifiedClientState defines a client state with an additional client + * identifier field. + * + * @generated from message ibc.core.client.v1.IdentifiedClientState + */ +export const IdentifiedClientState = proto3.makeMessageType( + "ibc.core.client.v1.IdentifiedClientState", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "client_state", kind: "message", T: Any }, + ], +); + +/** + * ConsensusStateWithHeight defines a consensus state with an additional height + * field. + * + * @generated from message ibc.core.client.v1.ConsensusStateWithHeight + */ +export const ConsensusStateWithHeight = proto3.makeMessageType( + "ibc.core.client.v1.ConsensusStateWithHeight", + () => [ + { no: 1, name: "height", kind: "message", T: Height }, + { no: 2, name: "consensus_state", kind: "message", T: Any }, + ], +); + +/** + * ClientConsensusStates defines all the stored consensus states for a given + * client. + * + * @generated from message ibc.core.client.v1.ClientConsensusStates + */ +export const ClientConsensusStates = proto3.makeMessageType( + "ibc.core.client.v1.ClientConsensusStates", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "consensus_states", kind: "message", T: ConsensusStateWithHeight, repeated: true }, + ], +); + +/** + * ClientUpdateProposal is a governance proposal. If it passes, the substitute + * client's latest consensus state is copied over to the subject client. The proposal + * handler may fail if the subject and the substitute do not match in client and + * chain parameters (with exception to latest height, frozen height, and chain-id). + * + * @generated from message ibc.core.client.v1.ClientUpdateProposal + */ +export const ClientUpdateProposal = proto3.makeMessageType( + "ibc.core.client.v1.ClientUpdateProposal", + () => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "subject_client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "substitute_client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * UpgradeProposal is a gov Content type for initiating an IBC breaking + * upgrade. + * + * @generated from message ibc.core.client.v1.UpgradeProposal + */ +export const UpgradeProposal = proto3.makeMessageType( + "ibc.core.client.v1.UpgradeProposal", + () => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "plan", kind: "message", T: Plan }, + { no: 4, name: "upgraded_client_state", kind: "message", T: Any }, + ], +); + +/** + * Height is a monotonically increasing data type + * that can be compared against another Height for the purposes of updating and + * freezing clients + * + * Normally the RevisionHeight is incremented at each height while keeping + * RevisionNumber the same. However some consensus algorithms may choose to + * reset the height in certain conditions e.g. hard forks, state-machine + * breaking changes In these cases, the RevisionNumber is incremented so that + * height continues to be monitonically increasing even as the RevisionHeight + * gets reset + * + * @generated from message ibc.core.client.v1.Height + */ +export const Height = proto3.makeMessageType( + "ibc.core.client.v1.Height", + () => [ + { no: 1, name: "revision_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: "revision_height", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ], +); + +/** + * Params defines the set of IBC light client parameters. + * + * @generated from message ibc.core.client.v1.Params + */ +export const Params = proto3.makeMessageType( + "ibc.core.client.v1.Params", + () => [ + { no: 1, name: "allowed_clients", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + diff --git a/packages/cosmic-proto-es/test/sanity-test.js b/packages/cosmic-proto-es/test/sanity-test.js new file mode 100644 index 0000000..48ecdd7 --- /dev/null +++ b/packages/cosmic-proto-es/test/sanity-test.js @@ -0,0 +1,3 @@ +import 'cosmic-proto-es/swingset/msgs.js'; +import 'cosmic-proto-es/swingset/query.js'; +import 'cosmic-proto-es/vstorage/query.js'; diff --git a/packages/cosmic-proto-es/yarn.lock b/packages/cosmic-proto-es/yarn.lock new file mode 100644 index 0000000..8de0a70 --- /dev/null +++ b/packages/cosmic-proto-es/yarn.lock @@ -0,0 +1,91 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@bufbuild/buf-darwin-arm64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.28.1.tgz#ffe09c8b998d6cc714ab525999fe026b25c952e9" + integrity sha512-nAyvwKkcd8qQTExCZo5MtSRhXLK7e3vzKFKHjXfkveRakSUST2HFlFZAHfErZimN4wBrPTN0V0hNRU8PPjkMpQ== + +"@bufbuild/buf-darwin-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.28.1.tgz#03aa18f7961b651679e349a382f71f1bad3dadec" + integrity sha512-b0eT3xd3vX5a5lWAbo5h7FPuf9MsOJI4I39qs4TZnrlZ8BOuPfqzwzijiFf9UCwaX2vR1NQXexIoQ80Ci+fCHw== + +"@bufbuild/buf-linux-aarch64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.28.1.tgz#2af0683dd6a803bdaba7ea92148007393a058705" + integrity sha512-p5h9bZCVLMh8No9/7k7ulXzsFx5P7Lu6DiUMjSJ6aBXPMYo6Xl7r/6L2cQkpsZ53HMtIxCgMYS9a7zoS4K8wIw== + +"@bufbuild/buf-linux-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.28.1.tgz#dbac29d39fb4c0a509ebf49fb3a76d481aebe1e0" + integrity sha512-fVJ3DiRigIso06jgEl+JNp59Y5t2pxDHd10d3SA4r+14sXbZ2J7Gy/wBqVXPry4x/jW567KKlvmhg7M5ZBgCQQ== + +"@bufbuild/buf-win32-arm64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.28.1.tgz#69242d904c73368c2735aa9efc338dd1f5864bfa" + integrity sha512-KJiRJpugQRK/jXC46Xjlb68UydWhCZj2jHdWLIwNtgXd1WTJ3LngChZV7Y6pPK08pwBAVz0JYeVbD5IlTCD4TQ== + +"@bufbuild/buf-win32-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.28.1.tgz#5014fd87ed29fd26c1c6d2e97eba9ac7b8a14e51" + integrity sha512-vMnc+7OVCkmlRWQsgYHgUqiBPRIjD8XeoRyApJ07YZzGs7DkRH4LhvmacJbLd3wORylbn6gLz3pQa8J/M61mzg== + +"@bufbuild/buf@^1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf/-/buf-1.28.1.tgz#b107bd1b01a676040b1112de9eb94642bea48a08" + integrity sha512-WRDagrf0uBjfV9s5eyrSPJDcdI4A5Q7JMCA4aMrHRR8fo/TTjniDBjJprszhaguqsDkn/LS4QIu92HVFZCrl9A== + optionalDependencies: + "@bufbuild/buf-darwin-arm64" "1.28.1" + "@bufbuild/buf-darwin-x64" "1.28.1" + "@bufbuild/buf-linux-aarch64" "1.28.1" + "@bufbuild/buf-linux-x64" "1.28.1" + "@bufbuild/buf-win32-arm64" "1.28.1" + "@bufbuild/buf-win32-x64" "1.28.1" + +"@bufbuild/protobuf@1.5.0", "@bufbuild/protobuf@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.5.0.tgz#6d119e2a562da48aa8cd93f1c0297b9bb32a9c93" + integrity sha512-0Jg+B7Vl8YGCi7c3iZ8/38iTbZrwdU7or6QZlsA9lhSrhumaXOTMsGO8gqwDuus/THEkTiY3Uxn+PEJwgsLt0w== + +"@bufbuild/protoc-gen-es@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.5.0.tgz#cadf0ea2a43b356533c359d2571c147e6ff5e736" + integrity sha512-6dPFlw7jhKPNoJUb5+0MPDTMEEbym4AAQZP2sCo4/0J+T2SlAzq5kbuNx92x+SFkOI5V7/iNoPHrxr0TZZ9b2g== + dependencies: + "@bufbuild/protobuf" "^1.5.0" + "@bufbuild/protoplugin" "1.5.0" + +"@bufbuild/protoplugin@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protoplugin/-/protoplugin-1.5.0.tgz#5cee6c3071519a239f2f049ae4d8b99d73d0a426" + integrity sha512-b07uxUfWUHm91PrN7dMMSmO+2RH21kPo+EhczGDR3PDh2t80e4XCZhf3Z/6SM/+ajhVpbl/WNK+z645jsSnGPg== + dependencies: + "@bufbuild/protobuf" "1.5.0" + "@typescript/vfs" "^1.4.0" + typescript "4.5.2" + +"@typescript/vfs@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.5.0.tgz#ed942922724f9ace8c07c80b006c47e5e3833218" + integrity sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg== + dependencies: + debug "^4.1.1" + +debug@^4.1.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +typescript@4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998" + integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==