diff --git a/package.json b/package.json index 899ec32..9d682e2 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "@kyve/substrate", - "version": "0.1.3", + "version": "0.3.0", "license": "MIT", "scripts": { "build": "rimraf dist && tsc", - "build:binaries": "yarn build && rimraf out && pkg --no-bytecode --public-packages '*' --output out/kyve package.json && node ./node_modules/@kyve/core/dist/src/checksum.js", + "build:binaries": "yarn build && rimraf out && pkg --no-bytecode --public-packages '*' --output out/kyve package.json && node ./node_modules/@kyve/core/dist/src/scripts/checksum.js", "start": "node ./dist/src/index.js", "format": "prettier --write ." }, @@ -22,7 +22,7 @@ "singleQuote": true }, "dependencies": { - "@kyve/core": "1.2.3", + "@kyve/core": "1.3.0", "axios": "^0.27.2" }, "devDependencies": { diff --git a/src/index.ts b/src/index.ts index fadf7d7..7c224c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,64 +1,10 @@ -import KYVE, { Item } from '@kyve/core'; -import { Signature } from './types'; -import { fetchBlock, isHeightOutOfRange } from './utils'; -import { name, version } from '../package.json'; +import { Node, Arweave, Gzip, JsonFileCache } from '@kyve/core'; -process.env.KYVE_RUNTIME = name; -process.env.KYVE_VERSION = version; +import Substrate from './runtime'; -KYVE.metrics.register.setDefaultLabels({ - app: process.env.KYVE_RUNTIME, -}); - -class KyveSubstrate extends KYVE { - public async getDataItem(key: string): Promise { - let block; - - try { - block = await fetchBlock( - this.pool.config.rpc, - +key, - await this.getSignature() - ); - } catch (err) { - if (isHeightOutOfRange(err)) throw new Error(); - - this.logger.warn(`Failed to fetch block ${key}. Retrying ...`); - - throw err; - } - - return { key, value: block }; - } - - public async getNextKey(key: string): Promise { - if (key) { - return (parseInt(key) + 1).toString(); - } - - return '0'; - } - - public async formatValue(value: any): Promise { - return value.hash; - } - - private async getSignature(): Promise { - const address = await this.sdk.wallet.getAddress(); - const timestamp = new Date().valueOf().toString(); - - const message = `${address}//${this.poolId}//${timestamp}`; - - const { signature, pub_key } = await this.sdk.signString(message); - - return { - signature, - pubKey: pub_key.value, - poolId: this.poolId.toString(), - timestamp, - }; - } -} - -// noinspection JSIgnoredPromiseFromCall -new KyveSubstrate().start(); +new Node() + .addRuntime(new Substrate()) + .addStorageProvider(new Arweave()) + .addCompression(new Gzip()) + .addCache(new JsonFileCache()) + .start(); diff --git a/src/runtime.ts b/src/runtime.ts new file mode 100644 index 0000000..8c65a3c --- /dev/null +++ b/src/runtime.ts @@ -0,0 +1,51 @@ +import { DataItem, IRuntime, Node } from '@kyve/core'; +import { name, version } from '../package.json'; +import { fetchBlock, isHeightOutOfRange } from './utils'; + +export default class Substrate implements IRuntime { + public name = name; + public version = version; + + public async getDataItem(core: Node, key: string): Promise { + let block; + + const headers = await this.generateCoinbaseCloudHeaders(core); + + try { + block = await fetchBlock(core.poolConfig.rpc, +key, headers); + } catch (err) { + if (isHeightOutOfRange(err)) throw new Error(); + + throw err; + } + + return { key, value: block }; + } + + public async getNextKey(key: string): Promise { + return (parseInt(key) + 1).toString(); + } + + public async formatValue(value: any): Promise { + return value.hash; + } + + private async generateCoinbaseCloudHeaders(core: Node): Promise { + // requestSignature for coinbase cloud + const address = core.client.account.address; + const timestamp = new Date().valueOf().toString(); + const poolId = core.pool.id; + + const { signature, pub_key } = await core.client.signString( + `${address}//${poolId}//${timestamp}` + ); + + return { + 'Content-Type': 'application/json', + Signature: signature, + 'Public-Key': pub_key.value, + 'Pool-ID': poolId, + Timestamp: timestamp, + }; + } +} diff --git a/src/utils.ts b/src/utils.ts index 32a279a..7af7c99 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -4,9 +4,9 @@ import { Signature, UNABLE_TO_RETRIEVE } from './types'; export async function fetchBlock( endpoint: string, height: number, - signature: Signature + headers: any ) { - return await requestSidecarAPI(`${endpoint}/blocks/${height}`, signature); + return await requestSidecarAPI(`${endpoint}/blocks/${height}`, headers); } export function isHeightOutOfRange(err: any): boolean { @@ -23,15 +23,9 @@ export function isHeightOutOfRange(err: any): boolean { return false; } -async function requestSidecarAPI(endpoint: string, signature: Signature) { +async function requestSidecarAPI(endpoint: string, headers: any) { const { data } = await axios.get(endpoint, { - headers: { - 'Content-Type': 'application/json', - Signature: signature.signature, - 'Public-Key': signature.pubKey, - 'Pool-ID': signature.poolId, - Timestamp: signature.timestamp, - }, + headers, }); return data; diff --git a/yarn.lock b/yarn.lock index 6b9f0ca..bc90ef7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,24 +2,41 @@ # yarn lockfile v1 -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== - -"@babel/parser@7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" - integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== - -"@babel/types@7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" - integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== +"@babel/generator@7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== + dependencies: + "@babel/types" "^7.18.2" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + +"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + +"@babel/parser@7.18.4": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" + integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== + +"@babel/types@7.18.4": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" + integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== dependencies: "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.2": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" + integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@confio/ics23@^0.6.3", "@confio/ics23@^0.6.8": version "0.6.8" resolved "https://registry.yarnpkg.com/@confio/ics23/-/ics23-0.6.8.tgz#2a6b4f1f2b7b20a35d9a0745bb5a446e72930b3d" @@ -191,6 +208,19 @@ axios "^0.21.1" fast-deep-equal "^3.1.3" +"@cosmjs/launchpad@^0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/launchpad/-/launchpad-0.27.1.tgz#b6f1995748be96560f5f01e84d3ff907477dda77" + integrity sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw== + dependencies: + "@cosmjs/amino" "0.27.1" + "@cosmjs/crypto" "0.27.1" + "@cosmjs/encoding" "0.27.1" + "@cosmjs/math" "0.27.1" + "@cosmjs/utils" "0.27.1" + axios "^0.21.2" + fast-deep-equal "^3.1.3" + "@cosmjs/math@0.27.1": version "0.27.1" resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.27.1.tgz#be78857b008ffc6b1ed6fecaa1c4cd5bc38c07d7" @@ -384,6 +414,11 @@ resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.24.1.tgz#0adfefe63b7f17222bc2bc12f71296f35e7ad378" integrity sha512-VA3WFx1lMFb7esp9BqHWkDgMvHoA3D9w+uDRvWhVRpUpDc7RYHxMbWExASjz+gNblTCg556WJGzF64tXnf9tdQ== +"@cosmostation/extension-client@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@cosmostation/extension-client/-/extension-client-0.0.6.tgz#a04420c1c3d68b83d197e48e79787a3484fb8d2c" + integrity sha512-3N7NOz8JMOpJlVaGS++zha4AZoijJTnPkq8djEfpk/mJ6+laUNo4a1/mxANFm9i1KUZcU9HX6GKKx9v9nL/VDg== + "@iov/crypto@2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@iov/crypto/-/crypto-2.1.0.tgz#10e91b6692e154958c11626dfd096a80e8a481a4" @@ -426,6 +461,38 @@ resolved "https://registry.yarnpkg.com/@iov/utils/-/utils-2.0.2.tgz#3527f376d26100e07ac823bf87bebd0f24680d1c" integrity sha512-4D8MEvTcFc/DVy5q25vHxRItmgJyeX85dixMH+MxdKr+yy71h3sYk+sVBEIn70uqGP7VqAJkGOPNFs08/XYELw== +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@keplr-wallet/cosmos@0.9.16": version "0.9.16" resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.9.16.tgz#bfd1968e32bf7108b213c82c7c36e650f9963ce9" @@ -473,14 +540,15 @@ big-integer "^1.6.48" utility-types "^3.10.0" -"@kyve/core@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@kyve/core/-/core-1.2.1.tgz#cd47838662e060a0a42a0c7fc9226a6b92693823" - integrity sha512-WJylVG3kAfbhOCJBOH6D/v9sgfF1UqAkS95LLstCRNNaVH4fMGtaDI5WGpxmK3czqwVXy3opFVrG1NV3qWuaJw== +"@kyve/core@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@kyve/core/-/core-1.3.0.tgz#86d55df3172cdd9026833625e9d16c22729bde02" + integrity sha512-s0CnZkuQYT7YXy0/AUMgxecdDWEVyM3WGJPHSXATrwg5b/P+kU5EmJ6Xg+bx9tiKkZbeVjvq7+D2eps65ucXZg== dependencies: "@cosmjs/proto-signing" "^0.27.1" "@cosmjs/stargate" "^0.27.1" - "@kyve/sdk" "1.2.1" + "@kyve/proto" "1.0.0" + "@kyve/sdk" "2.0.0" "@types/cli-progress" "^3.9.2" "@types/jsonfile" "^6.0.1" arweave "^1.10.17" @@ -497,24 +565,36 @@ tslog "^3.2.2" unique-names-generator "^4.6.0" -"@kyve/sdk@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@kyve/sdk/-/sdk-1.2.1.tgz#5e066f5d4a731f21db90b678f52f896b63425621" - integrity sha512-ztB8BXwi03DSxltSx+KgQ/qUTn+vO1ljnZRflUOsm0rsmKafgIuGNIY2Mxn6Cex+Q8tCaRiYc5IFVLqQku4EPg== +"@kyve/proto@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@kyve/proto/-/proto-1.0.0.tgz#2ffc3a9e8ccf19616535584f2a2116328f274bde" + integrity sha512-oMJssPQtnmbtBsZZsXhU4MMFxupyQPmDaeKAiyZJpw9Nn4Dk3CyJoKlnOUhJ8U+gi3vthgdtoCtdg0vwBsQHnA== + dependencies: + "@protobufs/cosmos" "^0.0.9" + "@protobufs/gogoproto" "^0.0.9" + "@protobufs/google" "^0.0.9" + ts-proto "^1.115.4" + +"@kyve/sdk@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@kyve/sdk/-/sdk-2.0.0.tgz#1abf06223007b0eb8e6c0002600b11ed903c3f9d" + integrity sha512-3F1WL8BrlEGLGaT6YV75qGccooYbMNdLFHb0FjO4ZLorVFYS04H2vH/3HIPTZcy/aMemgdcNrlxDdvcSVtoR0g== dependencies: "@cosmjs/amino" "0.28.3" "@cosmjs/crypto" "0.27.1" "@cosmjs/encoding" "0.27.1" + "@cosmjs/launchpad" "^0.27.1" "@cosmjs/proto-signing" "0.28.0" "@cosmjs/stargate" "0.28.0" "@cosmjs/tendermint-rpc" "0.28.0" + "@cosmostation/extension-client" "^0.0.6" "@keplr-wallet/cosmos" "0.9.16" + "@kyve/proto" "1.0.0" axios "0.25.0" bech32 "2.0.0" bignumber.js "9.0.2" - cosmjs-types "^0.5.0" humanize-number "0.0.2" - protobufjs "6.11.2" + qs "^6.10.5" "@noble/hashes@^1", "@noble/hashes@^1.0.0": version "1.1.2" @@ -595,6 +675,43 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== +"@protobufs/cosmos@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@protobufs/cosmos/-/cosmos-0.0.9.tgz#af9bf950534e666395fce4e155e5ba4e9ae89176" + integrity sha512-nge92JbU4v1W5P34JX8G1Fr3jLLe6HGT6CDdVbwR90mlRQkAimElk0RLwoRNr5pQAKtjzAhz4Ss90SH17Thh9g== + dependencies: + "@protobufs/cosmos_proto" "^0.0.9" + "@protobufs/gogoproto" "^0.0.9" + "@protobufs/google" "^0.0.9" + "@protobufs/tendermint" "^0.0.9" + +"@protobufs/cosmos_proto@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@protobufs/cosmos_proto/-/cosmos_proto-0.0.9.tgz#3a6247a6fb4a4006927fa728453662709a1df8e1" + integrity sha512-N9SFLTudgNd5CEHAeluGgZ4GYChLD2grDatw7dpl96lL59v3zWKaSPC3yg7yQmNHU7RteyMoPvugEHwPeoMATg== + dependencies: + "@protobufs/google" "^0.0.9" + +"@protobufs/gogoproto@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@protobufs/gogoproto/-/gogoproto-0.0.9.tgz#408e7bdefd5a9ba983467ae3303dd6f9fefa4b58" + integrity sha512-HGDZFSUOH4jNQ5f1KKGImyj0OafxZvsN7NCsiCiJ0lc9xyVy+bqoFtP+qd/4lybmbdr8XfO06Sm/IPEWL9gFOA== + dependencies: + "@protobufs/google" "^0.0.9" + +"@protobufs/google@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@protobufs/google/-/google-0.0.9.tgz#4370c2314806c7b8696432a548b3c5c3e7c4cb57" + integrity sha512-u92EzAL5DPhKgOPocprdjXTNXNEzAMxzN28exaybb3fve2s/3Aa2rgydOjnM6rqEUa8K3+X3Kh/6HZiCv3ZwZQ== + +"@protobufs/tendermint@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@protobufs/tendermint/-/tendermint-0.0.9.tgz#a5417dd4843f895b614573679ea1573d347b5a1b" + integrity sha512-L6BsnzGHGGizW3dumxDUEtwDEJOgMVk1F8MBmQijx/0xDsocQ6AU7pT46dA5ODO7p2xKd7tq7CM/Rzq+05iAXg== + dependencies: + "@protobufs/gogoproto" "^0.0.9" + "@protobufs/google" "^0.0.9" + "@types/cli-progress@^3.9.2": version "3.11.0" resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.0.tgz#ec79df99b26757c3d1c7170af8422e0fc95eef7e" @@ -615,9 +732,9 @@ integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== "@types/node@*", "@types/node@>=13.7.0": - version "18.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" - integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== + version "18.0.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.3.tgz#463fc47f13ec0688a33aec75d078a0541a447199" + integrity sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ== "@types/node@10.12.18": version "10.12.18" @@ -634,6 +751,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7" integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ== +"@types/object-hash@^1.3.0": + version "1.3.4" + resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-1.3.4.tgz#079ba142be65833293673254831b5e3e847fe58b" + integrity sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -1012,14 +1134,6 @@ cosmjs-types@^0.4.0: long "^4.0.0" protobufjs "~6.11.2" -cosmjs-types@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.5.0.tgz#2497a2c5ddf62a8e8dea03e0725b8cd763d4ab4f" - integrity sha512-Qy2yxDp5HasBUnBV5OL9EOuTJw94LAbCWfiRb5QcW1sqh93KSSY5PpNMB3rTsxwuPcf/k3CNRY02DeQMjrsJuA== - dependencies: - long "^4.0.0" - protobufjs "~6.11.2" - create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -1058,6 +1172,11 @@ curve25519-js@0.0.4: resolved "https://registry.yarnpkg.com/curve25519-js/-/curve25519-js-0.0.4.tgz#e6ad967e8cd284590d657bbfc90d8b50e49ba060" integrity sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w== +dataloader@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8" + integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== + debug@4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1077,11 +1196,6 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -1180,33 +1294,6 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - expand-template@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" @@ -1233,11 +1320,6 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -1747,6 +1829,11 @@ js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + jsonfile@^6.0.1, jsonfile@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -1756,14 +1843,6 @@ jsonfile@^6.0.1, jsonfile@^6.1.0: optionalDependencies: graceful-fs "^4.1.6" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - libsodium-wrappers@^0.7.6: version "0.7.10" resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz#13ced44cacb0fc44d6ac9ce67d725956089ce733" @@ -1776,6 +1855,11 @@ libsodium@^0.7.0: resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.10.tgz#c2429a7e4c0836f879d701fec2c8a208af024159" integrity sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ== +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -1925,6 +2009,11 @@ object-assign@^4.1.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-hash@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== + object-hash@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" @@ -1957,18 +2046,6 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - p-is-promise@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" @@ -2010,10 +2087,10 @@ picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-fetch@3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.1.tgz#be68bb9f7fdb0f6ed995abc518ab2e35aa64d2fd" - integrity sha512-fS4cdayCa1r4jHkOKGPJKnS9PEs6OWZst+s+m0+CmhmPZObMnxoRnf9T9yUWl+lzM2b5aJF7cnQIySCT7Hq8Dg== +pkg-fetch@3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7" + integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA== dependencies: chalk "^4.1.2" fs-extra "^9.1.0" @@ -2025,21 +2102,21 @@ pkg-fetch@3.4.1: yargs "^16.2.0" pkg@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.7.0.tgz#6422df05e8aa147764be6ef912921d0fa719ea95" - integrity sha512-PTiAjNq/CGAtK5qUBR6pjheqnipTFjeecgSgIKEcAOJA4GpmZeOZC8pMOoT0rfes5vHsmcFo7wbSRTAmXQurrg== + version "5.8.0" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" + integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== dependencies: - "@babel/parser" "7.17.10" - "@babel/types" "7.17.10" + "@babel/generator" "7.18.2" + "@babel/parser" "7.18.4" + "@babel/types" "7.18.4" chalk "^4.1.2" - escodegen "^2.0.0" fs-extra "^9.1.0" globby "^11.1.0" into-stream "^6.0.0" is-core-module "2.9.0" minimist "^1.2.6" multistream "^4.1.0" - pkg-fetch "3.4.1" + pkg-fetch "3.4.2" prebuild-install "6.1.4" resolve "^1.22.0" stream-meter "^1.0.4" @@ -2068,12 +2145,7 @@ prebuild-install@6.1.4: tar-fs "^2.0.0" tunnel-agent "^0.6.0" -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - -prettier@^2.7.1: +prettier@^2.5.1, prettier@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -2095,26 +2167,7 @@ prom-client@^14.0.1: dependencies: tdigest "^0.1.1" -protobufjs@6.11.2: - version "6.11.2" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" - integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - -protobufjs@^6.10.2, protobufjs@^6.11.2, protobufjs@^6.8.8, protobufjs@~6.11.2: +protobufjs@^6.10.2, protobufjs@^6.11.2, protobufjs@^6.11.3, protobufjs@^6.8.8, protobufjs@~6.11.2: version "6.11.3" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== @@ -2160,6 +2213,13 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +qs@^6.10.5: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -2369,7 +2429,7 @@ source-map-support@^0.5.21: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@~0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -2523,6 +2583,34 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-poet@^4.15.0: + version "4.15.0" + resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-4.15.0.tgz#637145fa554d3b27c56541578df0ce08cd9eb328" + integrity sha512-sLLR8yQBvHzi9d4R1F4pd+AzQxBfzOSSjfxiJxQhkUoH5bL7RsAC6wgvtVUQdGqiCsyS9rT6/8X2FI7ipdir5g== + dependencies: + lodash "^4.17.15" + prettier "^2.5.1" + +ts-proto-descriptors@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ts-proto-descriptors/-/ts-proto-descriptors-1.7.1.tgz#685d00305b06adfa929fd5a016a419382cd64c50" + integrity sha512-oIKUh3K4Xts4v29USGLfUG+2mEk32MsqpgZAOUyUlkrcIdv34yE+k2oZ2Nzngm6cV/JgFdOxRCqeyvmWHuYAyw== + dependencies: + long "^4.0.0" + protobufjs "^6.8.8" + +ts-proto@^1.115.4: + version "1.117.0" + resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.117.0.tgz#9186c36b7d71153fd65dc8f18c28defe54be65d7" + integrity sha512-htGXhOsq1oZ7T13YeNjpm4xYxniTk+tsdEX2/KQVg+2ycTjMw1POk7gI4B2agp1ABxv+Qwe5/QuLIf8fQQ72dw== + dependencies: + "@types/object-hash" "^1.3.0" + dataloader "^1.4.0" + object-hash "^1.3.1" + protobufjs "^6.11.3" + ts-poet "^4.15.0" + ts-proto-descriptors "1.7.1" + tslog@^3.2.2: version "3.3.3" resolved "https://registry.yarnpkg.com/tslog/-/tslog-3.3.3.tgz#751a469e0d36841bd7e03676c27e53e7ffe9bc3d" @@ -2537,13 +2625,6 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - type-tagger@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/type-tagger/-/type-tagger-1.0.0.tgz#dc6297e52e17097c1b92b42c16816a18f631e7f4" @@ -2656,11 +2737,6 @@ wif@^2.0.6: dependencies: bs58check "<3.0.0" -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"