From 97d8b54833d50bee7eb1a6e17d61f71d81887a9d Mon Sep 17 00:00:00 2001 From: Troy Kessler <43882936+troykessler@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:36:10 +0200 Subject: [PATCH] feat: v1.5.x (#136) * feat: generated new types for v1.5 * chore: updated amino types for v1.5 * chore: completed 1.5 implementation * chore: updated types and sdk * feat: add end-key to pool (#133) * chore: generate new lcd/client * feat: skipUploaderRole when endKey is reached * chore: add tests * chore: properly implemented end key on protocol node * fix: yarn.lock --------- Co-authored-by: Troy Kessler * chore: moved v1 endpoints to correct path * chore: added flag for data availability check (#120) * chore: added flag for data availability check * chore: added better logs * chore: add property for injective * chore: removed unused deps * chore: removed more unused deps * fix: build * update: add merkle root to tendermint bundle summary (#137) * update: add merkle root to tendermint bundle summary * update: add merkle.ts to sdk * chore: kyvejs/sdk * fix: lint errors * chore: added merkle root summary to tendermint-bsync --------- Co-authored-by: Troy Kessler * fix: support cometbft v0.38 block_results schema (#130) * fix: support cometbft v0.38 block_results schema * chore: added strict checks for begin and finalize block events * chore: added check for mode attributes * chore: added comments --------- Co-authored-by: Raphael Co-authored-by: Christopher Brumm <97845034+christopherbrumm@users.noreply.github.com> --- common/protocol/package.json | 12 +- common/protocol/src/index.ts | 19 +- .../src/methods/checks/isDataAvailable.ts | 10 +- .../src/methods/checks/isPoolActive.ts | 3 + common/protocol/src/methods/main/runCache.ts | 14 +- common/protocol/src/methods/main/runNode.ts | 6 + .../validate/validateBundleProposal.ts | 13 + common/protocol/test/cache.test.ts | 188 +- .../test/checks/is_pool_active.test.ts | 14 +- common/protocol/test/mocks/constants.ts | 1 + common/protocol/test/vote_invalid.test.ts | 141 ++ common/protocol/test/vote_valid.test.ts | 310 +++ common/sdk/package.json | 22 +- common/sdk/src/amino/funders.amino.ts | 14 +- common/sdk/src/amino/stakers.amino.ts | 4 +- .../lcd-client/bundles/v1beta1/query.ts | 14 + common/sdk/src/clients/lcd-client/client.ts | 67 +- .../lcd-client/delegation/v1beta1/query.ts | 14 + .../lcd-client/funders/v1beta1/query.ts | 14 + .../lcd-client/global/v1beta1/query.ts | 14 + .../clients/lcd-client/pool/v1beta1/query.ts | 14 + .../clients/lcd-client/query/v1beta1/query.ts | 36 +- .../lcd-client/stakers/v1beta1/query.ts | 14 + .../clients/lcd-client/team/v1beta1/query.ts | 41 + .../clients/lcd-client/v1/bundles/query.ts | 54 + common/sdk/src/index.ts | 1 + common/sdk/src/merkle/merkle.ts | 41 + common/sdk/src/sdk.ts | 4 +- common/types/package.json | 2 +- common/types/scripts/proto-gen.sh | 3 +- common/types/src/client/amino/amino.ts | 6 + .../src/client/cosmos/app/v1alpha1/module.ts | 333 ++++ .../cosmos/base/query/v1beta1/pagination.ts | 18 +- .../src/client/cosmos/base/v1beta1/coin.ts | 16 +- common/types/src/client/cosmos/gov/v1/gov.ts | 233 ++- common/types/src/client/cosmos/gov/v1/tx.ts | 257 ++- common/types/src/client/cosmos/msg/v1/msg.ts | 6 + .../types/src/client/cosmos_proto/cosmos.ts | 6 + common/types/src/client/gogoproto/gogo.ts | 6 + .../src/client/google/api/annotations.ts | 6 + common/types/src/client/google/api/http.ts | 10 +- .../types/src/client/google/protobuf/any.ts | 10 +- .../src/client/google/protobuf/duration.ts | 6 + .../src/client/google/protobuf/timestamp.ts | 6 + .../src/client/kyve/bundles/module/module.ts | 89 + .../client/kyve/bundles/v1beta1/bundles.ts | 6 + .../src/client/kyve/bundles/v1beta1/events.ts | 140 +- .../client/kyve/bundles/v1beta1/genesis.ts | 6 + .../src/client/kyve/bundles/v1beta1/params.ts | 110 +- .../src/client/kyve/bundles/v1beta1/query.ts | 6 + .../src/client/kyve/bundles/v1beta1/tx.ts | 6 + .../client/kyve/delegation/module/module.ts | 89 + .../kyve/delegation/v1beta1/delegation.ts | 51 +- .../client/kyve/delegation/v1beta1/events.ts | 28 +- .../client/kyve/delegation/v1beta1/genesis.ts | 6 + .../client/kyve/delegation/v1beta1/params.ts | 6 + .../client/kyve/delegation/v1beta1/query.ts | 6 + .../src/client/kyve/delegation/v1beta1/tx.ts | 6 + .../src/client/kyve/funders/module/module.ts | 89 + .../src/client/kyve/funders/v1beta1/events.ts | 70 +- .../client/kyve/funders/v1beta1/funders.ts | 78 +- .../client/kyve/funders/v1beta1/genesis.ts | 6 + .../src/client/kyve/funders/v1beta1/params.ts | 211 +- .../src/client/kyve/funders/v1beta1/query.ts | 6 + .../src/client/kyve/funders/v1beta1/tx.ts | 84 +- .../src/client/kyve/global/module/module.ts | 89 + .../src/client/kyve/global/v1beta1/events.ts | 6 + .../src/client/kyve/global/v1beta1/genesis.ts | 6 + .../src/client/kyve/global/v1beta1/global.ts | 6 + .../src/client/kyve/global/v1beta1/query.ts | 6 + .../src/client/kyve/global/v1beta1/tx.ts | 6 + .../src/client/kyve/pool/module/module.ts | 89 + .../src/client/kyve/pool/v1beta1/events.ts | 59 +- .../src/client/kyve/pool/v1beta1/genesis.ts | 6 + .../src/client/kyve/pool/v1beta1/params.ts | 27 +- .../src/client/kyve/pool/v1beta1/pool.ts | 57 +- .../src/client/kyve/pool/v1beta1/query.ts | 6 + .../types/src/client/kyve/pool/v1beta1/tx.ts | 40 +- .../src/client/kyve/query/module/module.ts | 89 + .../src/client/kyve/query/v1beta1/account.ts | 79 +- .../src/client/kyve/query/v1beta1/bundles.ts | 293 ++- .../client/kyve/query/v1beta1/delegation.ts | 59 +- .../src/client/kyve/query/v1beta1/funders.ts | 191 +- .../src/client/kyve/query/v1beta1/params.ts | 6 + .../src/client/kyve/query/v1beta1/pools.ts | 29 +- .../src/client/kyve/query/v1beta1/query.ts | 73 +- .../src/client/kyve/query/v1beta1/stakers.ts | 6 + .../src/client/kyve/stakers/module/module.ts | 89 + .../src/client/kyve/stakers/v1beta1/events.ts | 28 +- .../client/kyve/stakers/v1beta1/genesis.ts | 6 + .../src/client/kyve/stakers/v1beta1/params.ts | 6 + .../src/client/kyve/stakers/v1beta1/query.ts | 6 + .../client/kyve/stakers/v1beta1/stakers.ts | 35 +- .../src/client/kyve/stakers/v1beta1/tx.ts | 29 +- .../src/client/kyve/team/module/module.ts | 89 + .../src/client/kyve/team/v1beta1/events.ts | 6 + .../src/client/kyve/team/v1beta1/genesis.ts | 6 + .../src/client/kyve/team/v1beta1/query.ts | 6 + .../src/client/kyve/team/v1beta1/team.ts | 6 + .../types/src/client/kyve/team/v1beta1/tx.ts | 6 + common/types/src/lcd/amino/amino.ts | 6 + .../src/lcd/cosmos/app/v1alpha1/module.ts | 333 ++++ .../cosmos/base/query/v1beta1/pagination.ts | 18 +- .../types/src/lcd/cosmos/base/v1beta1/coin.ts | 16 +- common/types/src/lcd/cosmos/gov/v1/gov.ts | 233 ++- common/types/src/lcd/cosmos/gov/v1/tx.ts | 257 ++- common/types/src/lcd/cosmos/msg/v1/msg.ts | 6 + common/types/src/lcd/cosmos_proto/cosmos.ts | 6 + common/types/src/lcd/gogoproto/gogo.ts | 6 + .../types/src/lcd/google/api/annotations.ts | 6 + common/types/src/lcd/google/api/http.ts | 10 +- common/types/src/lcd/google/protobuf/any.ts | 10 +- .../types/src/lcd/google/protobuf/duration.ts | 6 + .../src/lcd/google/protobuf/timestamp.ts | 6 + .../src/lcd/kyve/bundles/module/module.ts | 89 + .../src/lcd/kyve/bundles/v1beta1/bundles.ts | 6 + .../src/lcd/kyve/bundles/v1beta1/events.ts | 140 +- .../src/lcd/kyve/bundles/v1beta1/genesis.ts | 6 + .../src/lcd/kyve/bundles/v1beta1/params.ts | 110 +- .../src/lcd/kyve/bundles/v1beta1/query.ts | 6 + .../types/src/lcd/kyve/bundles/v1beta1/tx.ts | 6 + .../src/lcd/kyve/delegation/module/module.ts | 89 + .../lcd/kyve/delegation/v1beta1/delegation.ts | 51 +- .../src/lcd/kyve/delegation/v1beta1/events.ts | 28 +- .../lcd/kyve/delegation/v1beta1/genesis.ts | 6 + .../src/lcd/kyve/delegation/v1beta1/params.ts | 6 + .../src/lcd/kyve/delegation/v1beta1/query.ts | 6 + .../src/lcd/kyve/delegation/v1beta1/tx.ts | 6 + .../src/lcd/kyve/funders/module/module.ts | 89 + .../src/lcd/kyve/funders/v1beta1/events.ts | 70 +- .../src/lcd/kyve/funders/v1beta1/funders.ts | 78 +- .../src/lcd/kyve/funders/v1beta1/genesis.ts | 6 + .../src/lcd/kyve/funders/v1beta1/params.ts | 211 +- .../src/lcd/kyve/funders/v1beta1/query.ts | 6 + .../types/src/lcd/kyve/funders/v1beta1/tx.ts | 84 +- .../src/lcd/kyve/global/module/module.ts | 89 + .../src/lcd/kyve/global/v1beta1/events.ts | 6 + .../src/lcd/kyve/global/v1beta1/genesis.ts | 6 + .../src/lcd/kyve/global/v1beta1/global.ts | 6 + .../src/lcd/kyve/global/v1beta1/query.ts | 6 + .../types/src/lcd/kyve/global/v1beta1/tx.ts | 6 + .../types/src/lcd/kyve/pool/module/module.ts | 89 + .../types/src/lcd/kyve/pool/v1beta1/events.ts | 59 +- .../src/lcd/kyve/pool/v1beta1/genesis.ts | 6 + .../types/src/lcd/kyve/pool/v1beta1/params.ts | 27 +- .../types/src/lcd/kyve/pool/v1beta1/pool.ts | 59 +- .../types/src/lcd/kyve/pool/v1beta1/query.ts | 6 + common/types/src/lcd/kyve/pool/v1beta1/tx.ts | 40 +- .../types/src/lcd/kyve/query/module/module.ts | 89 + .../src/lcd/kyve/query/v1beta1/account.ts | 79 +- .../src/lcd/kyve/query/v1beta1/bundles.ts | 293 ++- .../src/lcd/kyve/query/v1beta1/delegation.ts | 59 +- .../src/lcd/kyve/query/v1beta1/funders.ts | 191 +- .../src/lcd/kyve/query/v1beta1/params.ts | 6 + .../types/src/lcd/kyve/query/v1beta1/pools.ts | 29 +- .../types/src/lcd/kyve/query/v1beta1/query.ts | 73 +- .../src/lcd/kyve/query/v1beta1/stakers.ts | 6 + .../src/lcd/kyve/stakers/module/module.ts | 89 + .../src/lcd/kyve/stakers/v1beta1/events.ts | 28 +- .../src/lcd/kyve/stakers/v1beta1/genesis.ts | 6 + .../src/lcd/kyve/stakers/v1beta1/params.ts | 6 + .../src/lcd/kyve/stakers/v1beta1/query.ts | 6 + .../src/lcd/kyve/stakers/v1beta1/stakers.ts | 35 +- .../types/src/lcd/kyve/stakers/v1beta1/tx.ts | 29 +- .../types/src/lcd/kyve/team/module/module.ts | 89 + .../types/src/lcd/kyve/team/v1beta1/events.ts | 6 + .../src/lcd/kyve/team/v1beta1/genesis.ts | 6 + .../types/src/lcd/kyve/team/v1beta1/query.ts | 6 + .../types/src/lcd/kyve/team/v1beta1/team.ts | 6 + common/types/src/lcd/kyve/team/v1beta1/tx.ts | 6 + common/types/src/version.ts | 2 +- integrations/tendermint-bsync/package.json | 1 + integrations/tendermint-bsync/src/runtime.ts | 10 +- .../tendermint-bsync/src/utils/merkle.ts | 30 + integrations/tendermint/package.json | 1 + integrations/tendermint/src/runtime.ts | 46 +- .../tendermint/src/schemas/block_result.json | 43 +- integrations/tendermint/src/utils/merkle.ts | 30 + package.json | 3 + tools/kysor/package.json | 4 +- tools/kysor/src/commands/init.ts | 2 +- tools/kysor/src/commands/valaccounts.ts | 2 +- tools/kysor/src/kysor.ts | 2 +- yarn.lock | 1721 ++--------------- 184 files changed, 7470 insertions(+), 2661 deletions(-) create mode 100644 common/sdk/src/clients/lcd-client/bundles/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/delegation/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/funders/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/global/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/pool/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/stakers/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/team/v1beta1/query.ts create mode 100644 common/sdk/src/clients/lcd-client/v1/bundles/query.ts create mode 100644 common/sdk/src/merkle/merkle.ts create mode 100644 common/types/src/client/cosmos/app/v1alpha1/module.ts create mode 100644 common/types/src/client/kyve/bundles/module/module.ts create mode 100644 common/types/src/client/kyve/delegation/module/module.ts create mode 100644 common/types/src/client/kyve/funders/module/module.ts create mode 100644 common/types/src/client/kyve/global/module/module.ts create mode 100644 common/types/src/client/kyve/pool/module/module.ts create mode 100644 common/types/src/client/kyve/query/module/module.ts create mode 100644 common/types/src/client/kyve/stakers/module/module.ts create mode 100644 common/types/src/client/kyve/team/module/module.ts create mode 100644 common/types/src/lcd/cosmos/app/v1alpha1/module.ts create mode 100644 common/types/src/lcd/kyve/bundles/module/module.ts create mode 100644 common/types/src/lcd/kyve/delegation/module/module.ts create mode 100644 common/types/src/lcd/kyve/funders/module/module.ts create mode 100644 common/types/src/lcd/kyve/global/module/module.ts create mode 100644 common/types/src/lcd/kyve/pool/module/module.ts create mode 100644 common/types/src/lcd/kyve/query/module/module.ts create mode 100644 common/types/src/lcd/kyve/stakers/module/module.ts create mode 100644 common/types/src/lcd/kyve/team/module/module.ts create mode 100644 integrations/tendermint-bsync/src/utils/merkle.ts create mode 100644 integrations/tendermint/src/utils/merkle.ts diff --git a/common/protocol/package.json b/common/protocol/package.json index 956524f1..0bb4ed21 100644 --- a/common/protocol/package.json +++ b/common/protocol/package.json @@ -19,14 +19,9 @@ "doc": "typedoc" }, "dependencies": { - "@aws-sdk/client-s3": "^3.370.0", "@bundlr-network/client": "^0.8.9", - "@cosmjs/proto-signing": "^0.27.1", - "@cosmjs/stargate": "^0.27.1", - "@kyvejs/sdk": "1.1.1", - "@kyvejs/types": "1.2.0", - "@types/cli-progress": "^3.9.2", - "@types/jsonfile": "^6.0.1", + "@kyvejs/sdk": "1.2.0", + "@kyvejs/types": "1.3.0", "arweave": "^1.10.17", "axios": "^0.27.2", "bignumber.js": "^9.1.2", @@ -35,10 +30,8 @@ "fs-extra": "^10.0.1", "jsonfile": "^6.1.0", "jszip": "^3.10.1", - "level": "^8.0.0", "prando": "^6.0.1", "prom-client": "^14.1.0", - "protobufjs": "^6.11.4", "seedrandom": "^3.0.5", "semver": "^7.5.3", "tslog": "^3.2.2", @@ -46,6 +39,7 @@ "uuid": "^9.0.0" }, "devDependencies": { + "@types/jsonfile": "^6.0.1", "@types/clone": "^2.1.1", "@types/diff": "^5.0.7", "@types/fs-extra": "^9.0.13", diff --git a/common/protocol/src/index.ts b/common/protocol/src/index.ts index 160c27fb..11bfcb47 100644 --- a/common/protocol/src/index.ts +++ b/common/protocol/src/index.ts @@ -274,6 +274,10 @@ export class Validator { "Specify the home directory of the node where logs and the cache should save their data. [default current directory]", "./" ) + .option( + "--skip-data-availability-check", + "Skip data availability check and join pool instantly without waiting for the data source. WARNING: Only use this if you know what you are doing since this can lead to timeout slashes" + ) .action((options) => { this.start(options); }); @@ -326,9 +330,13 @@ export class Validator { process.exit(1); } - // until data is not available we wait and idle - while (!(await this.isDataAvailable())) { - await sleep(IDLE_TIME); + // by default we check if the first data items are available + // to protect the node operator from timeout slashes due to + // misconfiguration of the data source + if (!options.skipDataAvailabilityCheck) { + while (!(await this.isDataAvailable())) { + await sleep(IDLE_TIME); + } } await this.setupValidator(); @@ -356,3 +364,8 @@ export * from "./types"; // export utils export * from "./utils"; + +// add this so we can JSON.stringify bignumbers +(BigInt.prototype as any).toJSON = function () { + return this.toString(); +}; diff --git a/common/protocol/src/methods/checks/isDataAvailable.ts b/common/protocol/src/methods/checks/isDataAvailable.ts index 478538d7..48a3e973 100644 --- a/common/protocol/src/methods/checks/isDataAvailable.ts +++ b/common/protocol/src/methods/checks/isDataAvailable.ts @@ -11,6 +11,8 @@ import { Validator, standardizeError } from "../.."; * @return {Promise} */ export async function isDataAvailable(this: Validator): Promise { + let nextKey = ""; + try { // log debug method if (this.pool.data!.current_key) { @@ -18,7 +20,7 @@ export async function isDataAvailable(this: Validator): Promise { } // get the next key to node has to fetch - const nextKey = this.pool.data!.current_key + nextKey = this.pool.data!.current_key ? await this.runtime.nextKey(this, this.pool.data!.current_key) : this.pool.data!.start_key; @@ -45,8 +47,10 @@ export async function isDataAvailable(this: Validator): Promise { return true; } catch (err) { - this.logger.warn(`Data not available for next key. Retrying in 60s ...`); - this.logger.debug(standardizeError(err)); + this.logger.warn( + `Data not available for next key ${nextKey}. Retrying in 60s ...` + ); + this.logger.warn(standardizeError(err)); return false; } diff --git a/common/protocol/src/methods/checks/isPoolActive.ts b/common/protocol/src/methods/checks/isPoolActive.ts index 0146ee34..3dfa7c07 100644 --- a/common/protocol/src/methods/checks/isPoolActive.ts +++ b/common/protocol/src/methods/checks/isPoolActive.ts @@ -37,6 +37,9 @@ export function isPoolActive(this: Validator): boolean { case PoolStatus.POOL_STATUS_UNSPECIFIED: this.logger.info("Pool status is currently unspecified. Idling ..."); return false; + case PoolStatus.POOL_STATUS_END_KEY_REACHED: + this.logger.info("End key reached. Idling ..."); + return false; default: this.logger.info("Pool status is currently unknown. Idling ..."); return false; diff --git a/common/protocol/src/methods/main/runCache.ts b/common/protocol/src/methods/main/runCache.ts index e73e262c..e3fed0e4 100644 --- a/common/protocol/src/methods/main/runCache.ts +++ b/common/protocol/src/methods/main/runCache.ts @@ -119,6 +119,15 @@ export async function runCache(this: Validator): Promise { this.m.cache_index_tail.set(Math.max(0, currentIndex - 1)); for (let i = currentIndex; i < targetIndex; i++) { + // if the end key is not empty and we have reached the end key of the pool + // we do not sync past this key + if (this.pool.data?.end_key && this.pool.data.end_key === key) { + this.logger.info( + `Reached pool end key "${key}", the node will not continue collecting data past this key.` + ); + break; + } + // check if data item was already collected. If it was // already collected we don't need to retrieve it again this.logger.debug(`this.cacheProvider.exists(${i.toString()})`); @@ -223,11 +232,6 @@ export async function runCache(this: Validator): Promise { key = nextKey; } - // indicate that current caching round is done - this.logger.debug( - `Finished caching from index ${currentIndex} to ${targetIndex}. Waiting for next round ...` - ); - // wait until a new bundle proposal is available. We don't need // to sync the pool here because the pool state already gets // synced in the other main function "runNode" so we only listen diff --git a/common/protocol/src/methods/main/runNode.ts b/common/protocol/src/methods/main/runNode.ts index 3b85718a..d9b8560b 100644 --- a/common/protocol/src/methods/main/runNode.ts +++ b/common/protocol/src/methods/main/runNode.ts @@ -1,3 +1,4 @@ +import { PoolStatus } from "@kyvejs/types/lcd/kyve/pool/v1beta1/pool"; import { Validator } from "../.."; import { IDLE_TIME, sleep } from "../../utils"; @@ -33,6 +34,11 @@ export async function runNode(this: Validator): Promise { process.exit(1); } + if (this.pool.status === PoolStatus.POOL_STATUS_END_KEY_REACHED) { + this.logger.info(`Reached pool end key. Shutting down node ...`); + process.exit(0); + } + // log warnings if storage provider balance is low await this.isStorageBalanceLow(); diff --git a/common/protocol/src/methods/validate/validateBundleProposal.ts b/common/protocol/src/methods/validate/validateBundleProposal.ts index 09495d7c..c2710b0d 100644 --- a/common/protocol/src/methods/validate/validateBundleProposal.ts +++ b/common/protocol/src/methods/validate/validateBundleProposal.ts @@ -234,6 +234,19 @@ export async function validateBundleProposal( // validate each data item in bundle with custom runtime validation for (let i = 0; i < proposedBundle.length; i++) { if (valid) { + // if the pool has an end key and we find out that a data item + // has the end key and it is not the last data item in the bundle + // we consider the bundle invalid + if (this.pool.data?.end_key) { + if ( + i < proposedBundle.length - 1 && + proposedBundle[i].key === this.pool.data?.end_key + ) { + valid = false; + break; + } + } + this.logger.debug( `this.runtime.validateDataItem($THIS, $PROPOSED_DATA_ITEM, $VALIDATION_DATA_ITEM)` ); diff --git a/common/protocol/test/cache.test.ts b/common/protocol/test/cache.test.ts index 3420a3eb..788dedb4 100644 --- a/common/protocol/test/cache.test.ts +++ b/common/protocol/test/cache.test.ts @@ -29,9 +29,7 @@ TEST CASES - cache tests * start caching from a pool where transformDataItem fails * start caching from a pool where nextKey fails once * start caching from a pool where cache methods fail -* TODO: test with pool config that has no source object -* TODO: test with pool config that has zero sources -* TODO: start caching from a pool where node has not cached anything yet +* start caching from a pool which has an endKey */ @@ -249,8 +247,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("start caching from a pool which has a bundle proposal ongoing", async () => { @@ -423,8 +419,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("continue caching from a pool which has a bundle proposal ongoing", async () => { @@ -602,8 +596,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("start caching from a pool where last bundle proposal was dropped", async () => { @@ -767,8 +759,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("start caching from a pool where getNextDataItem fails once", async () => { @@ -931,8 +921,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("start caching from a pool where getNextDataItem fails multiple times", async () => { @@ -1175,8 +1163,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test("start caching from a pool where transformDataItem fails", async () => { @@ -1407,8 +1393,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); - - // TODO: assert timeouts }); test.skip("start caching from a pool where nextKey fails once", async () => { @@ -1527,8 +1511,6 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(0); - - // TODO: assert timeouts }); test("start caching from a pool where cache methods fail", async () => { @@ -1665,7 +1647,173 @@ describe("cache tests", () => { // assert that only one round ran expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(0); + }); + + test("start caching from a pool which has an endKey", async () => { + // ARRANGE + v.pool = { + ...genesis_pool, + data: { + ...genesis_pool.data, + current_key: "99", + current_index: "100", + end_key: "152", + }, + bundle_proposal: { + ...genesis_pool.bundle_proposal, + storage_id: "test_storage_id", + uploader: "test_staker", + next_uploader: "test_staker", + data_size: "123456789", + data_hash: "test_bundle_hash", + bundle_size: "50", + from_key: "100", + to_key: "149", + bundle_summary: "test_summary", + updated_at: "0", + voters_valid: ["test_staker"], + }, + } as any; + + // ACT + await runCache.call(v); + + // ASSERT + const txs = v["client"][0].kyve.bundles.v1beta1; + const queries = v["lcd"][0].kyve.query.v1beta1; + const cacheProvider = v["cacheProvider"]; + const runtime = v["runtime"]; + + // ======================== + // ASSERT CLIENT INTERFACES + // ======================== + + expect(txs.claimUploaderRole).toHaveBeenCalledTimes(0); + + expect(txs.voteBundleProposal).toHaveBeenCalledTimes(0); + + expect(txs.submitBundleProposal).toHaveBeenCalledTimes(0); + + expect(txs.skipUploaderRole).toHaveBeenCalledTimes(0); + + // ===================== + // ASSERT LCD INTERFACES + // ===================== + + expect(queries.canVote).toHaveBeenCalledTimes(0); + + expect(queries.canPropose).toHaveBeenCalledTimes(0); + + // ========================= + // ASSERT STORAGE INTERFACES + // ========================= + + expect(storageProvider.saveBundle).toHaveBeenCalledTimes(0); + + expect(storageProvider.retrieveBundle).toHaveBeenCalledTimes(0); + + // ======================= + // ASSERT CACHE INTERFACES + // ======================= + + // we use 50 + 3 here because the current bundle is 50 items big + // and because of the end key we only index the next 3 items and stop + // afterwards + expect(cacheProvider.put).toHaveBeenCalledTimes(50 + 3); + + for (let n = 0; n < 50 + 3; n++) { + const item = { + key: (n + parseInt(genesis_pool.data.max_bundle_size)).toString(), + value: `${ + n + parseInt(genesis_pool.data.max_bundle_size) + }-value-transform`, + }; + expect(cacheProvider.put).toHaveBeenNthCalledWith( + n + 1, + (n + parseInt(genesis_pool.data.max_bundle_size)).toString(), + item + ); + } + + expect(cacheProvider.get).toHaveBeenCalledTimes(0); + + expect(cacheProvider.exists).toHaveBeenCalledTimes( + parseInt(genesis_pool.data.max_bundle_size) + 50 + 3 + ); + + for (let n = 0; n < parseInt(genesis_pool.data.max_bundle_size); n++) { + expect(cacheProvider.exists).toHaveBeenNthCalledWith(n + 1, n.toString()); + } + + for ( + let n = parseInt(genesis_pool.data.max_bundle_size); + n < parseInt(genesis_pool.data.max_bundle_size) + 50 + 3; + n++ + ) { + expect(cacheProvider.exists).toHaveBeenNthCalledWith(n + 1, n.toString()); + } + + expect(cacheProvider.del).toHaveBeenCalledTimes(0); + + expect(cacheProvider.drop).toHaveBeenCalledTimes(0); + + // ============================= + // ASSERT COMPRESSION INTERFACES + // ============================= + + expect(compression.compress).toHaveBeenCalledTimes(0); + + expect(compression.decompress).toHaveBeenCalledTimes(0); + + // ========================= + // ASSERT RUNTIME INTERFACES + // ========================= - // TODO: assert timeouts + expect(runtime.getDataItem).toHaveBeenCalledTimes(50 + 3); + + for (let n = 0; n < 50 + 3; n++) { + expect(runtime.getDataItem).toHaveBeenNthCalledWith( + n + 1, + v, + (n + parseInt(genesis_pool.data.max_bundle_size)).toString() + ); + } + + expect(runtime.transformDataItem).toHaveBeenCalledTimes(50 + 3); + + for (let n = 0; n < 50 + 3; n++) { + const item = { + key: (n + parseInt(genesis_pool.data.max_bundle_size)).toString(), + value: `${n + parseInt(genesis_pool.data.max_bundle_size)}-value`, + }; + expect(runtime.transformDataItem).toHaveBeenNthCalledWith( + n + 1, + expect.any(Validator), + item + ); + } + + expect(runtime.validateDataItem).toHaveBeenCalledTimes(0); + + expect(runtime.nextKey).toHaveBeenCalledTimes(50 + 3); + + // here we subtract the key - 1 because we start using the + // current key + for (let n = 0; n < 50 + 3; n++) { + expect(runtime.nextKey).toHaveBeenNthCalledWith( + n + 1, + expect.any(Validator), + (n + parseInt(genesis_pool.data.max_bundle_size) - 1).toString() + ); + } + + expect(runtime.summarizeDataBundle).toHaveBeenCalledTimes(0); + + // ======================== + // ASSERT NODEJS INTERFACES + // ======================== + + // assert that only one round ran + expect(v["waitForCacheContinuation"]).toHaveBeenCalledTimes(1); }); }); diff --git a/common/protocol/test/checks/is_pool_active.test.ts b/common/protocol/test/checks/is_pool_active.test.ts index e7b7ef32..5a30b6b6 100644 --- a/common/protocol/test/checks/is_pool_active.test.ts +++ b/common/protocol/test/checks/is_pool_active.test.ts @@ -1,6 +1,6 @@ import { Logger } from "tslog"; import { Validator } from "../../src/index"; -import { setupMetrics, isPoolActive } from "../../src/methods"; +import { isPoolActive, setupMetrics } from "../../src/methods"; import { register } from "prom-client"; import { TestRuntime } from "../mocks/runtime.mock"; import { genesis_pool } from "../mocks/constants"; @@ -13,6 +13,7 @@ TEST CASES - isPoolActive * assert if pool status is POOL_STATUS_ACTIVE * assert if pool status is POOL_STATUS_NO_FUNDS * assert if pool status is POOL_STATUS_DISABLED +* assert if pool status is POOL_STATUS_END_KEY_REACHED * assert if pool status is POOL_STATUS_NOT_ENOUGH_DELEGATION * assert if pool status is POOL_STATUS_UPGRADING * assert if pool status is POOL_STATUS_UNSPECIFIED @@ -80,6 +81,17 @@ describe("isPoolActive", () => { expect(result).toBeFalsy(); }); + test("assert if pool status is POOL_STATUS_END_KEY_REACHED", async () => { + // ARRANGE + v.pool.status = PoolStatus.POOL_STATUS_END_KEY_REACHED; + + // ACT + const result = isPoolActive.call(v); + + // ASSERT + expect(result).toBeFalsy(); + }); + test("assert if pool status is POOL_STATUS_NOT_ENOUGH_DELEGATION", async () => { // ARRANGE v.pool.status = PoolStatus.POOL_STATUS_NOT_ENOUGH_DELEGATION; diff --git a/common/protocol/test/mocks/constants.ts b/common/protocol/test/mocks/constants.ts index 8e4aa64c..45a9d4df 100644 --- a/common/protocol/test/mocks/constants.ts +++ b/common/protocol/test/mocks/constants.ts @@ -7,6 +7,7 @@ export const genesis_pool = { logo: "ar://9FJDam56yBbmvn8rlamEucATH5UcYqSBw468rlCXn8E", config: "ar://bYvlKiVLb1YY0Gx4mjUhpWBkztqmA4uEN97kTaZtBfY", start_key: "0", + end_key: "", current_key: "", current_summary: "", current_index: "0", diff --git a/common/protocol/test/vote_invalid.test.ts b/common/protocol/test/vote_invalid.test.ts index 134230e2..077afb8b 100644 --- a/common/protocol/test/vote_invalid.test.ts +++ b/common/protocol/test/vote_invalid.test.ts @@ -36,6 +36,7 @@ TEST CASES - invalid votes tests * vote invalid but bundle from storage provider could not be loaded in the first try * try to vote invalid where voteBundleProposal fails * vote invalid because bundle is empty +* vote invalid because there were items after the end key data item */ @@ -2043,4 +2044,144 @@ describe("invalid votes tests", () => { // assert that only one round ran expect(v["waitForNextBundleProposal"]).toHaveBeenCalledTimes(1); }); + + test("vote invalid because there were items after the end key data item ", async () => { + const bundle = [ + { key: "test_key_1", value: "test_value_1" }, + { key: "test_key_2", value: "test_value_2" }, + ]; + + const bundleBytes = bundleToBytes(bundle); + const compressedBundle = bundleBytes; // no compression + const dataSize = compressedBundle.byteLength.toString(); + const dataHash = sha256(bundleBytes); + + v["syncPoolState"] = jest.fn().mockImplementation(() => { + v.pool = { + ...genesis_pool, + data: { + ...genesis_pool.data, + end_key: "test_key_1", + }, + bundle_proposal: { + ...genesis_pool.bundle_proposal, + storage_id: "another_test_storage_id", + uploader: "another_test_staker", + next_uploader: "another_test_staker", + data_size: dataSize, + data_hash: dataHash, + bundle_size: "2", + from_key: "test_key_1", + to_key: "test_key_2", + bundle_summary: JSON.stringify(bundle), + updated_at: "0", + voters_valid: ["another_test_staker"], + }, + } as any; + }); + + v["cacheProvider"].get = jest + .fn() + .mockResolvedValueOnce({ + key: "test_key_1", + value: "test_value_1", + }) + .mockResolvedValueOnce({ + key: "test_key_2", + value: "test_value_2", + }); + + // ACT + await runNode.call(v); + + // ASSERT + const txs = v["client"][0].kyve.bundles.v1beta1; + const queries = v["lcd"][0].kyve.query.v1beta1; + const cacheProvider = v["cacheProvider"]; + const runtime = v["runtime"]; + + // ======================== + // ASSERT CLIENT INTERFACES + // ======================== + + expect(txs.claimUploaderRole).toHaveBeenCalledTimes(0); + + expect(txs.voteBundleProposal).toHaveBeenCalledTimes(1); + expect(txs.voteBundleProposal).toHaveBeenLastCalledWith( + { + staker: "test_staker", + pool_id: "0", + storage_id: "another_test_storage_id", + vote: VoteType.VOTE_TYPE_INVALID, + }, + { + fee: 1.6, + } + ); + + expect(txs.submitBundleProposal).toHaveBeenCalledTimes(0); + + expect(txs.skipUploaderRole).toHaveBeenCalledTimes(0); + + // ===================== + // ASSERT LCD INTERFACES + // ===================== + + expect(queries.canVote).toHaveBeenCalledTimes(1); + expect(queries.canVote).toHaveBeenLastCalledWith({ + staker: "test_staker", + pool_id: "0", + voter: "test_valaddress", + storage_id: "another_test_storage_id", + }); + + expect(queries.canPropose).toHaveBeenCalledTimes(0); + + // ========================= + // ASSERT STORAGE INTERFACES + // ========================= + + expect(storageProvider.saveBundle).toHaveBeenCalledTimes(0); + + expect(storageProvider.retrieveBundle).toHaveBeenCalledTimes(1); + expect(storageProvider.retrieveBundle).toHaveBeenLastCalledWith( + "another_test_storage_id", + (120 - 20) * 1000 + ); + + // ======================= + // ASSERT CACHE INTERFACES + // ======================= + + expect(cacheProvider.get).toHaveBeenCalledTimes(2); + expect(cacheProvider.get).toHaveBeenNthCalledWith(1, "0"); + expect(cacheProvider.get).toHaveBeenNthCalledWith(2, "1"); + + // ============================= + // ASSERT COMPRESSION INTERFACES + // ============================= + + expect(compression.compress).toHaveBeenCalledTimes(0); + + expect(compression.decompress).toHaveBeenCalledTimes(1); + expect(compression.decompress).toHaveBeenLastCalledWith(compressedBundle); + + // ============================= + // ASSERT INTEGRATION INTERFACES + // ============================= + + expect(runtime.summarizeDataBundle).toHaveBeenCalledTimes(0); + + expect(runtime.validateDataItem).toHaveBeenCalledTimes(0); + + // ======================== + // ASSERT NODEJS INTERFACES + // ======================== + + // assert that debug bundle was saved + expect(v["archiveDebugBundle"]).toHaveBeenCalledTimes(1); + + // assert that only one round ran + expect(v["waitForNextBundleProposal"]).toHaveBeenCalledTimes(1); + }); }); diff --git a/common/protocol/test/vote_valid.test.ts b/common/protocol/test/vote_valid.test.ts index 0915cb0d..d740a636 100644 --- a/common/protocol/test/vote_valid.test.ts +++ b/common/protocol/test/vote_valid.test.ts @@ -30,6 +30,8 @@ TEST CASES - vote valid tests * try to vote valid after validator has voted invalid before * try to vote valid after validator has voted valid before * try to vote valid where voteBundleProposal fails +* vote valid with the bundle being before the end key +* vote valid with the last data item containing the end key */ @@ -1207,4 +1209,312 @@ describe("vote valid tests", () => { // assert that only one round ran expect(v["waitForNextBundleProposal"]).toHaveBeenCalledTimes(1); }); + + test("vote valid with the bundle being before the end key", async () => { + // ARRANGE + const bundle = [ + { key: "test_key_1", value: "test_value_1" }, + { key: "test_key_2", value: "test_value_2" }, + ]; + + const bundleBytes = bundleToBytes(bundle); + const compressedBundle = bundleBytes; // no compression + const dataSize = compressedBundle.byteLength.toString(); + const dataHash = sha256(bundleBytes); + + v["syncPoolState"] = jest.fn().mockImplementation(() => { + v.pool = { + ...genesis_pool, + data: { + ...genesis_pool.data, + end_key: "test_key_6", + }, + bundle_proposal: { + ...genesis_pool.bundle_proposal, + storage_id: "another_test_storage_id", + uploader: "another_test_staker", + next_uploader: "another_test_staker", + data_size: dataSize, + data_hash: dataHash, + bundle_size: "2", + from_key: "test_key_1", + to_key: "test_key_2", + bundle_summary: JSON.stringify(bundle), + updated_at: "0", + voters_valid: ["another_test_staker"], + }, + } as any; + }); + + v["cacheProvider"].get = jest + .fn() + .mockResolvedValueOnce({ + key: "test_key_1", + value: "test_value_1", + }) + .mockResolvedValueOnce({ + key: "test_key_2", + value: "test_value_2", + }); + + // ACT + await runNode.call(v); + + // ASSERT + const txs = v["client"][0].kyve.bundles.v1beta1; + const queries = v["lcd"][0].kyve.query.v1beta1; + const cacheProvider = v["cacheProvider"]; + const runtime = v["runtime"]; + + // ======================== + // ASSERT CLIENT INTERFACES + // ======================== + + expect(txs.claimUploaderRole).toHaveBeenCalledTimes(0); + + expect(txs.voteBundleProposal).toHaveBeenCalledTimes(1); + expect(txs.voteBundleProposal).toHaveBeenLastCalledWith( + { + staker: "test_staker", + pool_id: "0", + storage_id: "another_test_storage_id", + vote: VoteType.VOTE_TYPE_VALID, + }, + { + fee: 1.6, + } + ); + + expect(txs.submitBundleProposal).toHaveBeenCalledTimes(0); + + expect(txs.skipUploaderRole).toHaveBeenCalledTimes(0); + + // ===================== + // ASSERT LCD INTERFACES + // ===================== + + expect(queries.canVote).toHaveBeenCalledTimes(1); + expect(queries.canVote).toHaveBeenLastCalledWith({ + staker: "test_staker", + pool_id: "0", + voter: "test_valaddress", + storage_id: "another_test_storage_id", + }); + + expect(queries.canPropose).toHaveBeenCalledTimes(0); + + // ========================= + // ASSERT STORAGE INTERFACES + // ========================= + + expect(storageProvider.saveBundle).toHaveBeenCalledTimes(0); + + expect(storageProvider.retrieveBundle).toHaveBeenCalledTimes(1); + expect(storageProvider.retrieveBundle).toHaveBeenLastCalledWith( + "another_test_storage_id", + (120 - 20) * 1000 + ); + + // ======================= + // ASSERT CACHE INTERFACES + // ======================= + + expect(cacheProvider.get).toHaveBeenCalledTimes(2); + expect(cacheProvider.get).toHaveBeenNthCalledWith(1, "0"); + expect(cacheProvider.get).toHaveBeenNthCalledWith(2, "1"); + + // ============================= + // ASSERT COMPRESSION INTERFACES + // ============================= + + expect(compression.compress).toHaveBeenCalledTimes(0); + + expect(compression.decompress).toHaveBeenCalledTimes(1); + expect(compression.decompress).toHaveBeenLastCalledWith(compressedBundle); + + // ============================= + // ASSERT INTEGRATION INTERFACES + // ============================= + + expect(runtime.summarizeDataBundle).toHaveBeenCalledTimes(1); + expect(runtime.summarizeDataBundle).toHaveBeenLastCalledWith( + expect.any(Validator), + bundle + ); + + expect(runtime.validateDataItem).toHaveBeenCalledTimes(bundle.length); + + for (let i = 0; i < bundle.length; i++) { + expect(runtime.validateDataItem).toHaveBeenNthCalledWith( + i + 1, + expect.any(Validator), + standardizeJSON(bundle[i]), + standardizeJSON(bundle[i]) + ); + } + + // ======================== + // ASSERT NODEJS INTERFACES + // ======================== + + // assert that debug bundle was saved + expect(v["archiveDebugBundle"]).toHaveBeenCalledTimes(0); + + // assert that only one round ran + expect(v["waitForNextBundleProposal"]).toHaveBeenCalledTimes(1); + }); + + test("vote valid with the last data item containing the end key", async () => { + // ARRANGE + const bundle = [ + { key: "test_key_1", value: "test_value_1" }, + { key: "test_key_2", value: "test_value_2" }, + ]; + + const bundleBytes = bundleToBytes(bundle); + const compressedBundle = bundleBytes; // no compression + const dataSize = compressedBundle.byteLength.toString(); + const dataHash = sha256(bundleBytes); + + v["syncPoolState"] = jest.fn().mockImplementation(() => { + v.pool = { + ...genesis_pool, + data: { + ...genesis_pool.data, + end_key: "test_key_2", + }, + bundle_proposal: { + ...genesis_pool.bundle_proposal, + storage_id: "another_test_storage_id", + uploader: "another_test_staker", + next_uploader: "another_test_staker", + data_size: dataSize, + data_hash: dataHash, + bundle_size: "2", + from_key: "test_key_1", + to_key: "test_key_2", + bundle_summary: JSON.stringify(bundle), + updated_at: "0", + voters_valid: ["another_test_staker"], + }, + } as any; + }); + + v["cacheProvider"].get = jest + .fn() + .mockResolvedValueOnce({ + key: "test_key_1", + value: "test_value_1", + }) + .mockResolvedValueOnce({ + key: "test_key_2", + value: "test_value_2", + }); + + // ACT + await runNode.call(v); + + // ASSERT + const txs = v["client"][0].kyve.bundles.v1beta1; + const queries = v["lcd"][0].kyve.query.v1beta1; + const cacheProvider = v["cacheProvider"]; + const runtime = v["runtime"]; + + // ======================== + // ASSERT CLIENT INTERFACES + // ======================== + + expect(txs.claimUploaderRole).toHaveBeenCalledTimes(0); + + expect(txs.voteBundleProposal).toHaveBeenCalledTimes(1); + expect(txs.voteBundleProposal).toHaveBeenLastCalledWith( + { + staker: "test_staker", + pool_id: "0", + storage_id: "another_test_storage_id", + vote: VoteType.VOTE_TYPE_VALID, + }, + { + fee: 1.6, + } + ); + + expect(txs.submitBundleProposal).toHaveBeenCalledTimes(0); + + expect(txs.skipUploaderRole).toHaveBeenCalledTimes(0); + + // ===================== + // ASSERT LCD INTERFACES + // ===================== + + expect(queries.canVote).toHaveBeenCalledTimes(1); + expect(queries.canVote).toHaveBeenLastCalledWith({ + staker: "test_staker", + pool_id: "0", + voter: "test_valaddress", + storage_id: "another_test_storage_id", + }); + + expect(queries.canPropose).toHaveBeenCalledTimes(0); + + // ========================= + // ASSERT STORAGE INTERFACES + // ========================= + + expect(storageProvider.saveBundle).toHaveBeenCalledTimes(0); + + expect(storageProvider.retrieveBundle).toHaveBeenCalledTimes(1); + expect(storageProvider.retrieveBundle).toHaveBeenLastCalledWith( + "another_test_storage_id", + (120 - 20) * 1000 + ); + + // ======================= + // ASSERT CACHE INTERFACES + // ======================= + + expect(cacheProvider.get).toHaveBeenCalledTimes(2); + expect(cacheProvider.get).toHaveBeenNthCalledWith(1, "0"); + expect(cacheProvider.get).toHaveBeenNthCalledWith(2, "1"); + + // ============================= + // ASSERT COMPRESSION INTERFACES + // ============================= + + expect(compression.compress).toHaveBeenCalledTimes(0); + + expect(compression.decompress).toHaveBeenCalledTimes(1); + expect(compression.decompress).toHaveBeenLastCalledWith(compressedBundle); + + // ============================= + // ASSERT INTEGRATION INTERFACES + // ============================= + + expect(runtime.summarizeDataBundle).toHaveBeenCalledTimes(1); + expect(runtime.summarizeDataBundle).toHaveBeenLastCalledWith( + expect.any(Validator), + bundle + ); + + expect(runtime.validateDataItem).toHaveBeenCalledTimes(bundle.length); + + for (let i = 0; i < bundle.length; i++) { + expect(runtime.validateDataItem).toHaveBeenNthCalledWith( + i + 1, + expect.any(Validator), + standardizeJSON(bundle[i]), + standardizeJSON(bundle[i]) + ); + } + + // ======================== + // ASSERT NODEJS INTERFACES + // ======================== + + // assert that debug bundle was saved + expect(v["archiveDebugBundle"]).toHaveBeenCalledTimes(0); + + // assert that only one round ran + expect(v["waitForNextBundleProposal"]).toHaveBeenCalledTimes(1); + }); }); diff --git a/common/sdk/package.json b/common/sdk/package.json index af0a849b..033e3609 100644 --- a/common/sdk/package.json +++ b/common/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@kyvejs/sdk", - "version": "1.1.1", + "version": "1.2.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ @@ -23,15 +23,14 @@ "lint:fix": "eslint --fix . --ignore-path ../../.eslintignore --ext ts --ext tsx --ext js --ext jsx" }, "dependencies": { - "@cosmjs/amino": "^0.31.3", - "@cosmjs/crypto": "^0.31.3", - "@cosmjs/encoding": "^0.31.3", - "@cosmjs/proto-signing": "^0.31.3", - "@cosmjs/stargate": "^0.31.3", - "@cosmjs/tendermint-rpc": "^0.31.3", - "@cosmostation/extension-client": "^0.0.6", - "@keplr-wallet/cosmos": "^0.12.44", - "@kyvejs/types": "1.2.0", + "@cosmjs/amino": "^0.32.3", + "@cosmjs/crypto": "^0.32.3", + "@cosmjs/encoding": "^0.32.3", + "@cosmjs/proto-signing": "^0.32.3", + "@cosmjs/stargate": "^0.32.3", + "@cosmostation/extension-client": "^0.1.15", + "@keplr-wallet/cosmos": "^0.12.96", + "@kyvejs/types": "1.3.0", "axios": "^0.27.2", "bech32": "2.0.0", "bignumber.js": "9.1.2", @@ -53,5 +52,8 @@ "typedoc": "^0.22.17", "typescript": "^4.5.5", "typescript-json-schema": "^0.53.1" + }, + "resolutions": { + "axios": "^0.27.2" } } diff --git a/common/sdk/src/amino/funders.amino.ts b/common/sdk/src/amino/funders.amino.ts index b44310c3..d97d8f3f 100644 --- a/common/sdk/src/amino/funders.amino.ts +++ b/common/sdk/src/amino/funders.amino.ts @@ -15,16 +15,14 @@ export const createFundersAminoConverters = (): AminoConverters => { toAmino: (msg: MsgFundPool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { pool_id: msg.pool_id }), - ...(isNotEmpty(msg.amount) && { amount: msg.amount }), - ...(isNotEmpty(msg.amount_per_bundle) && { - amount_per_bundle: msg.amount_per_bundle, - }), + amounts: [...msg.amounts], + amounts_per_bundle: [...msg.amounts_per_bundle], }), fromAmino: (msg): MsgFundPool => ({ creator: msg.creator, pool_id: msg.pool_id, - amount: msg.amount, - amount_per_bundle: msg.amount_per_bundle, + amounts: [...msg.amounts], + amounts_per_bundle: [...msg.amounts_per_bundle], }), }, "/kyve.funders.v1beta1.MsgDefundPool": { @@ -32,12 +30,12 @@ export const createFundersAminoConverters = (): AminoConverters => { toAmino: (msg: MsgDefundPool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { id: msg.pool_id }), - ...(isNotEmpty(msg.amount) && { amount: msg.amount }), + amounts: [...msg.amounts], }), fromAmino: (msg): MsgDefundPool => ({ creator: msg.creator, pool_id: msg.pool_id, - amount: msg.amount, + amounts: [...msg.amounts], }), }, "/kyve.funders.v1beta1.MsgCreateFunder": { diff --git a/common/sdk/src/amino/stakers.amino.ts b/common/sdk/src/amino/stakers.amino.ts index f55a0d2b..fd6c43b6 100644 --- a/common/sdk/src/amino/stakers.amino.ts +++ b/common/sdk/src/amino/stakers.amino.ts @@ -73,11 +73,11 @@ export const createStakersAminoConverters = (): AminoConverters => { aminoType: "kyve/stakers/MsgClaimCommissionRewards", toAmino: (msg: MsgClaimCommissionRewards) => ({ creator: msg.creator, - ...(isNotEmpty(msg.amount) && { amount: msg.amount }), + amounts: [...msg.amounts], }), fromAmino: (msg): MsgClaimCommissionRewards => ({ creator: msg.creator, - amount: msg.amount, + amounts: [...msg.amounts], }), }, "/kyve.stakers.v1beta1.MsgJoinPool": { diff --git a/common/sdk/src/clients/lcd-client/bundles/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/bundles/v1beta1/query.ts new file mode 100644 index 00000000..0bb4f655 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/bundles/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/bundles/v1beta1/params"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class BundlesModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/bundles/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/client.ts b/common/sdk/src/clients/lcd-client/client.ts index 307afe1a..88d7987c 100644 --- a/common/sdk/src/clients/lcd-client/client.ts +++ b/common/sdk/src/clients/lcd-client/client.ts @@ -1,15 +1,76 @@ -import { KyveRegistryLCDClient } from "./query/v1beta1/query"; +import { BundlesModuleLCDClient } from "./bundles/v1beta1/query"; +import { DelegationModuleLCDClient } from "./delegation/v1beta1/query"; +import { FundersModuleLCDClient } from "./funders/v1beta1/query"; +import { GlobalModuleLCDClient } from "./global/v1beta1/query"; +import { PoolModuleLCDClient } from "./pool/v1beta1/query"; +import { QueryModuleLCDClient } from "./query/v1beta1/query"; +import { StakersModuleLCDClient } from "./stakers/v1beta1/query"; +import { TeamModuleLCDClient } from "./team/v1beta1/query"; +import { V1BundlesLCDClient } from "./v1/bundles/query"; class KyveLCDClient { - public query: { v1beta1: KyveRegistryLCDClient }; + public v1: { + bundles: V1BundlesLCDClient; + }; + public bundles: { + v1beta1: BundlesModuleLCDClient; + }; + public delegation: { + v1beta1: DelegationModuleLCDClient; + }; + public funders: { + v1beta1: FundersModuleLCDClient; + }; + public global: { + v1beta1: GlobalModuleLCDClient; + }; + public pool: { + v1beta1: PoolModuleLCDClient; + }; + public query: { + v1beta1: QueryModuleLCDClient; + }; + public stakers: { + v1beta1: StakersModuleLCDClient; + }; + public team: { + v1beta1: TeamModuleLCDClient; + }; + constructor(restEndpoint: string) { + this.v1 = { + bundles: new V1BundlesLCDClient(restEndpoint), + }; + this.bundles = { + v1beta1: new BundlesModuleLCDClient(restEndpoint), + }; + this.delegation = { + v1beta1: new DelegationModuleLCDClient(restEndpoint), + }; + this.funders = { + v1beta1: new FundersModuleLCDClient(restEndpoint), + }; + this.global = { + v1beta1: new GlobalModuleLCDClient(restEndpoint), + }; + this.pool = { + v1beta1: new PoolModuleLCDClient(restEndpoint), + }; this.query = { - v1beta1: new KyveRegistryLCDClient(restEndpoint), + v1beta1: new QueryModuleLCDClient(restEndpoint), + }; + this.stakers = { + v1beta1: new StakersModuleLCDClient(restEndpoint), + }; + this.team = { + v1beta1: new TeamModuleLCDClient(restEndpoint), }; } } + export type KyveLCDClientType = { kyve: KyveLCDClient; }; + export function createKyveLCDClient(restEndpoint: string): KyveLCDClientType { return { kyve: new KyveLCDClient(restEndpoint), diff --git a/common/sdk/src/clients/lcd-client/delegation/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/delegation/v1beta1/query.ts new file mode 100644 index 00000000..534e9273 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/delegation/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/delegation/v1beta1/params"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class DelegationModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/delegation/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/funders/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/funders/v1beta1/query.ts new file mode 100644 index 00000000..f77102c6 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/funders/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/funders/v1beta1/params"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class FundersModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/funders/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/global/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/global/v1beta1/query.ts new file mode 100644 index 00000000..8f3a7c01 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/global/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/global/v1beta1/query"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class GlobalModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/global/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/pool/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/pool/v1beta1/query.ts new file mode 100644 index 00000000..eec6c36b --- /dev/null +++ b/common/sdk/src/clients/lcd-client/pool/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/pool/v1beta1/params"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class PoolModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/pool/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/query/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/query/v1beta1/query.ts index 8328525e..c1fc9cd2 100644 --- a/common/sdk/src/clients/lcd-client/query/v1beta1/query.ts +++ b/common/sdk/src/clients/lcd-client/query/v1beta1/query.ts @@ -51,7 +51,7 @@ type PaginationResponseTypeUtil = Overwrite< { pagination?: { next_key: string; total: string } } >; -export class KyveRegistryLCDClient extends AbstractKyveLCDClient { +export class QueryModuleLCDClient extends AbstractKyveLCDClient { constructor(restEndpoint: string) { super(restEndpoint); } @@ -126,41 +126,7 @@ export class KyveRegistryLCDClient extends AbstractKyveLCDClient { return await this.request(endpoint); } /** end stakers **/ - - // async finalizedBundles( - // params: PaginationPartialRequestUtilType - // ): Promise< - // PaginationResponseTypeUtil - // > { - // const parameters: Record = {}; - // - // if (typeof params?.pagination !== "undefined") { - // parameters.pagination = params.pagination; - // } - // const endpoint = `kyve/query/v1beta1/finalized_bundles/${params.pool_id}`; - // return await this.request(endpoint, parameters); - // } /** Bundles **/ - async finalizedBundle( - params: kyveQueryBundles.QueryFinalizedBundleRequest - ): Promise { - const endpoint = `/kyve/v1/bundles/${params.pool_id}/${params.id}`; - return await this.request(endpoint); - } - - async finalizedBundles( - params: PaginationPartialRequestUtilType - ): Promise< - PaginationResponseTypeUtil - > { - const parameters: Record = {}; - - if (typeof params?.pagination !== "undefined") { - parameters.pagination = params.pagination; - } - const endpoint = `/kyve/v1/bundles/${params.pool_id}`; - return await this.request(endpoint, parameters); - } async currentVoteStatus( params: kyveQueryBundles.QueryCurrentVoteStatusRequest ): Promise { diff --git a/common/sdk/src/clients/lcd-client/stakers/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/stakers/v1beta1/query.ts new file mode 100644 index 00000000..4740850a --- /dev/null +++ b/common/sdk/src/clients/lcd-client/stakers/v1beta1/query.ts @@ -0,0 +1,14 @@ +import paramsRes from "@kyvejs/types/lcd/kyve/stakers/v1beta1/params"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class StakersModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async params(): Promise { + const endpoint = `/kyve/stakers/v1beta1/params`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/team/v1beta1/query.ts b/common/sdk/src/clients/lcd-client/team/v1beta1/query.ts new file mode 100644 index 00000000..e09385c5 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/team/v1beta1/query.ts @@ -0,0 +1,41 @@ +import queryReq from "@kyvejs/types/client/kyve/team/v1beta1/query"; +import queryRes from "@kyvejs/types/lcd/kyve/team/v1beta1/query"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +export class TeamModuleLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async teamInfo(): Promise { + const endpoint = `/kyve/team/v1beta1/team_info`; + return await this.request(endpoint); + } + + async teamVestingAccounts(): Promise { + const endpoint = `/kyve/team/v1beta1/team_vesting_accounts`; + return await this.request(endpoint); + } + + async teamVestingAccount( + params: queryReq.QueryTeamVestingAccountRequest + ): Promise { + const endpoint = `/kyve/team/v1beta1/team_vesting_account/${params.id}`; + return await this.request(endpoint); + } + + async teamVestingStatus( + params: queryReq.QueryTeamVestingStatusRequest + ): Promise { + const endpoint = `/kyve/team/v1beta1/team_vesting_status/${params.id}`; + return await this.request(endpoint); + } + + async teamVestingStatusByTime( + params: queryReq.QueryTeamVestingStatusByTimeRequest + ): Promise { + const endpoint = `/kyve/team/v1beta1/team_vesting_status_by_time/${params.id}/${params.time}`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/clients/lcd-client/v1/bundles/query.ts b/common/sdk/src/clients/lcd-client/v1/bundles/query.ts new file mode 100644 index 00000000..44e042c2 --- /dev/null +++ b/common/sdk/src/clients/lcd-client/v1/bundles/query.ts @@ -0,0 +1,54 @@ +import paginationQuery from "@kyvejs/types/client/cosmos/base/query/v1beta1/pagination"; +import kyveQueryBundles from "@kyvejs/types/client/kyve/query/v1beta1/bundles"; +import kyveQueryBundlesRes from "@kyvejs/types/lcd/kyve/query/v1beta1/bundles"; + +import { AbstractKyveLCDClient } from "../../lcd-client.abstract"; + +type Overwrite = Pick> & U; +type PaginationRequestType = { + offset: string; + limit: string; + count_total: boolean; + reverse: boolean; + key: string; +}; +type PaginationPartialRequestUtilType< + T extends { pagination?: paginationQuery.PageRequest } +> = Overwrite }>; + +type PaginationResponseTypeUtil = Overwrite< + T, + { pagination?: { next_key: string; total: string } } +>; + +export class V1BundlesLCDClient extends AbstractKyveLCDClient { + constructor(restEndpoint: string) { + super(restEndpoint); + } + + async finalizedBundles( + params: PaginationPartialRequestUtilType + ): Promise< + PaginationResponseTypeUtil + > { + const parameters: Record = {}; + + if (typeof params?.pagination !== "undefined") { + parameters.pagination = params.pagination; + } + + if (typeof params.index !== "undefined") { + parameters.index = params.index; + } + + const endpoint = `/kyve/v1/bundles/${params.pool_id}`; + return await this.request(endpoint, parameters); + } + + async finalizedBundle( + params: kyveQueryBundles.QueryFinalizedBundleRequest + ): Promise { + const endpoint = `/kyve/v1/bundles/${params.pool_id}/${params.id}`; + return await this.request(endpoint); + } +} diff --git a/common/sdk/src/index.ts b/common/sdk/src/index.ts index 51d606d8..8b91239f 100644 --- a/common/sdk/src/index.ts +++ b/common/sdk/src/index.ts @@ -2,5 +2,6 @@ export * from "./clients/lcd-client/client"; export { default as KyveClient } from "./clients/rpc-client/client"; export { default as KyveWebClient } from "./clients/rpc-client/web.client"; export * as constants from "./constants"; +export { dataItemToSha256, generateMerkleRoot } from "./merkle/merkle"; export { registry } from "./registry/tx.registry"; export { KyveSDK as default } from "./sdk"; diff --git a/common/sdk/src/merkle/merkle.ts b/common/sdk/src/merkle/merkle.ts new file mode 100644 index 00000000..77868f20 --- /dev/null +++ b/common/sdk/src/merkle/merkle.ts @@ -0,0 +1,41 @@ +import * as crypto from "@cosmjs/crypto"; + +export function createHashesFromBundle(bundle: any[]): Uint8Array[] { + return bundle.map((dataItem) => dataItemToSha256(dataItem)); +} + +export function dataItemToSha256(data: any): Uint8Array { + // Encode the serialized object to UTF-8 + const encoded_obj: Uint8Array = Buffer.from(JSON.stringify(data), "utf-8"); + // Calculate the SHA-256 hash + return crypto.sha256(encoded_obj); +} + +export function generateMerkleRoot(hashes: Uint8Array[]): Uint8Array { + if (!hashes || hashes.length == 0) { + return Buffer.from(""); + } + + // Ensure number of hashes (leafs) are even by copying the + // last hash (the very right leaf) if the amount is odd + if (hashes.length % 2 !== 0) { + hashes.push(hashes[hashes.length - 1]); + } + + const combinedHashes: Uint8Array[] = []; + for (let i = 0; i < hashes.length; i += 2) { + const hashesConcatenated = new Uint8Array([ + ...Array.from(hashes[i]), + ...Array.from(hashes[i + 1]), + ]); + const hash = crypto.sha256(hashesConcatenated); + combinedHashes.push(hash); + } + + // If the combinedHashes length is 1, it means that we have the merkle root already, + // and we can return the hex representation + if (combinedHashes.length === 1) { + return combinedHashes[0]; + } + return generateMerkleRoot(combinedHashes); +} diff --git a/common/sdk/src/sdk.ts b/common/sdk/src/sdk.ts index 6cfb2aeb..d865640b 100644 --- a/common/sdk/src/sdk.ts +++ b/common/sdk/src/sdk.ts @@ -178,7 +178,9 @@ export class KyveSDK { await window.keplr.enable(this.config.chainId); - const signer = await window.keplr.getOfflineSignerAuto(this.config.chainId); + const signer: any = await window.keplr.getOfflineSignerAuto( + this.config.chainId + ); const walletName = (await window.keplr.getKey(this.config.chainId)).name; const keplr = window.keplr; const keplrAminoSigner = new KeplrAminoSigner(keplr, this.config); diff --git a/common/types/package.json b/common/types/package.json index 6c911ae0..f1022260 100644 --- a/common/types/package.json +++ b/common/types/package.json @@ -1,6 +1,6 @@ { "name": "@kyvejs/types", - "version": "1.2.0", + "version": "1.3.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "repository": { diff --git a/common/types/scripts/proto-gen.sh b/common/types/scripts/proto-gen.sh index 4c4c4b2d..3559fd9a 100755 --- a/common/types/scripts/proto-gen.sh +++ b/common/types/scripts/proto-gen.sh @@ -2,7 +2,7 @@ # Variables KYVE_CHAIN_REPO="git@github.com:KYVENetwork/chain.git" -KYVE_CHAIN_VERSION="v1.4.0" +KYVE_CHAIN_VERSION="main" echo "Cloning chain repo version ${KYVE_CHAIN_VERSION}" mkdir -p ./tmp @@ -45,4 +45,3 @@ git add ./src # Cleanup rm -rf ./tmp - diff --git a/common/types/src/client/amino/amino.ts b/common/types/src/client/amino/amino.ts index 54af2e62..804a46c0 100644 --- a/common/types/src/client/amino/amino.ts +++ b/common/types/src/client/amino/amino.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: amino/amino.proto + /* eslint-disable */ export const protobufPackage = "amino"; diff --git a/common/types/src/client/cosmos/app/v1alpha1/module.ts b/common/types/src/client/cosmos/app/v1alpha1/module.ts new file mode 100644 index 00000000..49b4ccc5 --- /dev/null +++ b/common/types/src/client/cosmos/app/v1alpha1/module.ts @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/app/v1alpha1/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.app.v1alpha1"; + +/** ModuleDescriptor describes an app module. */ +export interface ModuleDescriptor { + /** + * go_import names the package that should be imported by an app to load the + * module in the runtime module registry. It is required to make debugging + * of configuration errors easier for users. + */ + go_import: string; + /** + * use_package refers to a protobuf package that this module + * uses and exposes to the world. In an app, only one module should "use" + * or own a single protobuf package. It is assumed that the module uses + * all of the .proto files in a single package. + */ + use_package: PackageReference[]; + /** + * can_migrate_from defines which module versions this module can migrate + * state from. The framework will check that one module version is able to + * migrate from a previous module version before attempting to update its + * config. It is assumed that modules can transitively migrate from earlier + * versions. For instance if v3 declares it can migrate from v2, and v2 + * declares it can migrate from v1, the framework knows how to migrate + * from v1 to v3, assuming all 3 module versions are registered at runtime. + */ + can_migrate_from: MigrateFromInfo[]; +} + +/** PackageReference is a reference to a protobuf package used by a module. */ +export interface PackageReference { + /** name is the fully-qualified name of the package. */ + name: string; + /** + * revision is the optional revision of the package that is being used. + * Protobuf packages used in Cosmos should generally have a major version + * as the last part of the package name, ex. foo.bar.baz.v1. + * The revision of a package can be thought of as the minor version of a + * package which has additional backwards compatible definitions that weren't + * present in a previous version. + * + * A package should indicate its revision with a source code comment + * above the package declaration in one of its files containing the + * text "Revision N" where N is an integer revision. All packages start + * at revision 0 the first time they are released in a module. + * + * When a new version of a module is released and items are added to existing + * .proto files, these definitions should contain comments of the form + * "Since: Revision N" where N is an integer revision. + * + * When the module runtime starts up, it will check the pinned proto + * image and panic if there are runtime protobuf definitions that are not + * in the pinned descriptor which do not have + * a "Since Revision N" comment or have a "Since Revision N" comment where + * N is <= to the revision specified here. This indicates that the protobuf + * files have been updated, but the pinned file descriptor hasn't. + * + * If there are items in the pinned file descriptor with a revision + * greater than the value indicated here, this will also cause a panic + * as it may mean that the pinned descriptor for a legacy module has been + * improperly updated or that there is some other versioning discrepancy. + * Runtime protobuf definitions will also be checked for compatibility + * with pinned file descriptors to make sure there are no incompatible changes. + * + * This behavior ensures that: + * * pinned proto images are up-to-date + * * protobuf files are carefully annotated with revision comments which + * are important good client UX + * * protobuf files are changed in backwards and forwards compatible ways + */ + revision: number; +} + +/** + * MigrateFromInfo is information on a module version that a newer module + * can migrate from. + */ +export interface MigrateFromInfo { + /** + * module is the fully-qualified protobuf name of the module config object + * for the previous module version, ex: "cosmos.group.module.v1.Module". + */ + module: string; +} + +function createBaseModuleDescriptor(): ModuleDescriptor { + return { go_import: "", use_package: [], can_migrate_from: [] }; +} + +export const ModuleDescriptor = { + encode(message: ModuleDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.go_import !== "") { + writer.uint32(10).string(message.go_import); + } + for (const v of message.use_package) { + PackageReference.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.can_migrate_from) { + MigrateFromInfo.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ModuleDescriptor { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModuleDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.go_import = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.use_package.push(PackageReference.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.can_migrate_from.push(MigrateFromInfo.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModuleDescriptor { + return { + go_import: isSet(object.go_import) ? globalThis.String(object.go_import) : "", + use_package: globalThis.Array.isArray(object?.use_package) + ? object.use_package.map((e: any) => PackageReference.fromJSON(e)) + : [], + can_migrate_from: globalThis.Array.isArray(object?.can_migrate_from) + ? object.can_migrate_from.map((e: any) => MigrateFromInfo.fromJSON(e)) + : [], + }; + }, + + toJSON(message: ModuleDescriptor): unknown { + const obj: any = {}; + if (message.go_import !== "") { + obj.go_import = message.go_import; + } + if (message.use_package?.length) { + obj.use_package = message.use_package.map((e) => PackageReference.toJSON(e)); + } + if (message.can_migrate_from?.length) { + obj.can_migrate_from = message.can_migrate_from.map((e) => MigrateFromInfo.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): ModuleDescriptor { + return ModuleDescriptor.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModuleDescriptor { + const message = createBaseModuleDescriptor(); + message.go_import = object.go_import ?? ""; + message.use_package = object.use_package?.map((e) => PackageReference.fromPartial(e)) || []; + message.can_migrate_from = object.can_migrate_from?.map((e) => MigrateFromInfo.fromPartial(e)) || []; + return message; + }, +}; + +function createBasePackageReference(): PackageReference { + return { name: "", revision: 0 }; +} + +export const PackageReference = { + encode(message: PackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.revision !== 0) { + writer.uint32(16).uint32(message.revision); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): PackageReference { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePackageReference(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.revision = reader.uint32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): PackageReference { + return { + name: isSet(object.name) ? globalThis.String(object.name) : "", + revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0, + }; + }, + + toJSON(message: PackageReference): unknown { + const obj: any = {}; + if (message.name !== "") { + obj.name = message.name; + } + if (message.revision !== 0) { + obj.revision = Math.round(message.revision); + } + return obj; + }, + + create, I>>(base?: I): PackageReference { + return PackageReference.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PackageReference { + const message = createBasePackageReference(); + message.name = object.name ?? ""; + message.revision = object.revision ?? 0; + return message; + }, +}; + +function createBaseMigrateFromInfo(): MigrateFromInfo { + return { module: "" }; +} + +export const MigrateFromInfo = { + encode(message: MigrateFromInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.module !== "") { + writer.uint32(10).string(message.module); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MigrateFromInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMigrateFromInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.module = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MigrateFromInfo { + return { module: isSet(object.module) ? globalThis.String(object.module) : "" }; + }, + + toJSON(message: MigrateFromInfo): unknown { + const obj: any = {}; + if (message.module !== "") { + obj.module = message.module; + } + return obj; + }, + + create, I>>(base?: I): MigrateFromInfo { + return MigrateFromInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MigrateFromInfo { + const message = createBaseMigrateFromInfo(); + message.module = object.module ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/cosmos/base/query/v1beta1/pagination.ts b/common/types/src/client/cosmos/base/query/v1beta1/pagination.ts index 0c3902cf..2dd71f6b 100644 --- a/common/types/src/client/cosmos/base/query/v1beta1/pagination.ts +++ b/common/types/src/client/cosmos/base/query/v1beta1/pagination.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/base/query/v1beta1/pagination.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -84,10 +90,10 @@ export const PageRequest = { if (message.limit !== "0") { writer.uint32(24).uint64(message.limit); } - if (message.count_total === true) { + if (message.count_total !== false) { writer.uint32(32).bool(message.count_total); } - if (message.reverse === true) { + if (message.reverse !== false) { writer.uint32(40).bool(message.reverse); } return writer; @@ -165,10 +171,10 @@ export const PageRequest = { if (message.limit !== "0") { obj.limit = message.limit; } - if (message.count_total === true) { + if (message.count_total !== false) { obj.count_total = message.count_total; } - if (message.reverse === true) { + if (message.reverse !== false) { obj.reverse = message.reverse; } return obj; @@ -263,7 +269,7 @@ export const PageResponse = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); @@ -276,7 +282,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; diff --git a/common/types/src/client/cosmos/base/v1beta1/coin.ts b/common/types/src/client/cosmos/base/v1beta1/coin.ts index 70abf752..25ad32cf 100644 --- a/common/types/src/client/cosmos/base/v1beta1/coin.ts +++ b/common/types/src/client/cosmos/base/v1beta1/coin.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/base/v1beta1/coin.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -25,12 +31,18 @@ export interface DecCoin { amount: string; } -/** IntProto defines a Protobuf wrapper around an Int object. */ +/** + * IntProto defines a Protobuf wrapper around an Int object. + * Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. + */ export interface IntProto { int: string; } -/** DecProto defines a Protobuf wrapper around a Dec object. */ +/** + * DecProto defines a Protobuf wrapper around a Dec object. + * Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. + */ export interface DecProto { dec: string; } diff --git a/common/types/src/client/cosmos/gov/v1/gov.ts b/common/types/src/client/cosmos/gov/v1/gov.ts index 97cd84f2..9d021238 100644 --- a/common/types/src/client/cosmos/gov/v1/gov.ts +++ b/common/types/src/client/cosmos/gov/v1/gov.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/gov/v1/gov.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -201,7 +207,11 @@ export interface Proposal { voting_end_time?: | Date | undefined; - /** metadata is any arbitrary metadata attached to the proposal. */ + /** + * metadata is any arbitrary metadata attached to the proposal. + * the recommended format of the metadata is to be found here: + * https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + */ metadata: string; /** * title is the title of the proposal @@ -216,11 +226,23 @@ export interface Proposal { */ summary: string; /** - * Proposer is the address of the proposal sumbitter + * proposer is the address of the proposal sumbitter * * Since: cosmos-sdk 0.47 */ proposer: string; + /** + * expedited defines if the proposal is expedited + * + * Since: cosmos-sdk 0.50 + */ + expedited: boolean; + /** + * failed_reason defines the reason why the proposal failed + * + * Since: cosmos-sdk 0.50 + */ + failed_reason: string; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -246,11 +268,18 @@ export interface Vote { voter: string; /** options is the weighted vote options. */ options: WeightedVoteOption[]; - /** metadata is any arbitrary metadata to attached to the vote. */ + /** + * metadata is any arbitrary metadata attached to the vote. + * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 + */ metadata: string; } -/** DepositParams defines the params for deposits on governance proposals. */ +/** + * DepositParams defines the params for deposits on governance proposals. + * + * @deprecated + */ export interface DepositParams { /** Minimum deposit for a proposal to enter voting period. */ min_deposit: Coin[]; @@ -261,13 +290,21 @@ export interface DepositParams { max_deposit_period?: Duration | undefined; } -/** VotingParams defines the params for voting on governance proposals. */ +/** + * VotingParams defines the params for voting on governance proposals. + * + * @deprecated + */ export interface VotingParams { /** Duration of the voting period. */ voting_period?: Duration | undefined; } -/** TallyParams defines the params for tallying votes on governance proposals. */ +/** + * TallyParams defines the params for tallying votes on governance proposals. + * + * @deprecated + */ export interface TallyParams { /** * Minimum percentage of total stake needed to vote for a result to be @@ -316,12 +353,49 @@ export interface Params { veto_threshold: string; /** The ratio representing the proportion of the deposit value that must be paid at proposal submission. */ min_initial_deposit_ratio: string; + /** + * The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. + * + * Since: cosmos-sdk 0.50 + */ + proposal_cancel_ratio: string; + /** + * The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + * If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + * + * Since: cosmos-sdk 0.50 + */ + proposal_cancel_dest: string; + /** + * Duration of the voting period of an expedited proposal. + * + * Since: cosmos-sdk 0.50 + */ + expedited_voting_period?: + | Duration + | undefined; + /** + * Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. + * + * Since: cosmos-sdk 0.50 + */ + expedited_threshold: string; + /** Minimum expedited deposit for a proposal to enter voting period. */ + expedited_min_deposit: Coin[]; /** burn deposits if a proposal does not meet quorum */ burn_vote_quorum: boolean; /** burn deposits if the proposal does not enter voting period */ burn_proposal_deposit_prevote: boolean; /** burn deposits if quorum with vote type no_veto is met */ burn_vote_veto: boolean; + /** + * The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + * Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + * required. + * + * Since: cosmos-sdk 0.50 + */ + min_deposit_ratio: string; } function createBaseWeightedVoteOption(): WeightedVoteOption { @@ -502,6 +576,8 @@ function createBaseProposal(): Proposal { title: "", summary: "", proposer: "", + expedited: false, + failed_reason: "", }; } @@ -546,6 +622,12 @@ export const Proposal = { if (message.proposer !== "") { writer.uint32(106).string(message.proposer); } + if (message.expedited !== false) { + writer.uint32(112).bool(message.expedited); + } + if (message.failed_reason !== "") { + writer.uint32(122).string(message.failed_reason); + } return writer; }, @@ -647,6 +729,20 @@ export const Proposal = { message.proposer = reader.string(); continue; + case 14: + if (tag !== 112) { + break; + } + + message.expedited = reader.bool(); + continue; + case 15: + if (tag !== 122) { + break; + } + + message.failed_reason = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -675,6 +771,8 @@ export const Proposal = { title: isSet(object.title) ? globalThis.String(object.title) : "", summary: isSet(object.summary) ? globalThis.String(object.summary) : "", proposer: isSet(object.proposer) ? globalThis.String(object.proposer) : "", + expedited: isSet(object.expedited) ? globalThis.Boolean(object.expedited) : false, + failed_reason: isSet(object.failed_reason) ? globalThis.String(object.failed_reason) : "", }; }, @@ -719,6 +817,12 @@ export const Proposal = { if (message.proposer !== "") { obj.proposer = message.proposer; } + if (message.expedited !== false) { + obj.expedited = message.expedited; + } + if (message.failed_reason !== "") { + obj.failed_reason = message.failed_reason; + } return obj; }, @@ -742,6 +846,8 @@ export const Proposal = { message.title = object.title ?? ""; message.summary = object.summary ?? ""; message.proposer = object.proposer ?? ""; + message.expedited = object.expedited ?? false; + message.failed_reason = object.failed_reason ?? ""; return message; }, }; @@ -1191,9 +1297,15 @@ function createBaseParams(): Params { threshold: "", veto_threshold: "", min_initial_deposit_ratio: "", + proposal_cancel_ratio: "", + proposal_cancel_dest: "", + expedited_voting_period: undefined, + expedited_threshold: "", + expedited_min_deposit: [], burn_vote_quorum: false, burn_proposal_deposit_prevote: false, burn_vote_veto: false, + min_deposit_ratio: "", }; } @@ -1220,15 +1332,33 @@ export const Params = { if (message.min_initial_deposit_ratio !== "") { writer.uint32(58).string(message.min_initial_deposit_ratio); } - if (message.burn_vote_quorum === true) { + if (message.proposal_cancel_ratio !== "") { + writer.uint32(66).string(message.proposal_cancel_ratio); + } + if (message.proposal_cancel_dest !== "") { + writer.uint32(74).string(message.proposal_cancel_dest); + } + if (message.expedited_voting_period !== undefined) { + Duration.encode(message.expedited_voting_period, writer.uint32(82).fork()).ldelim(); + } + if (message.expedited_threshold !== "") { + writer.uint32(90).string(message.expedited_threshold); + } + for (const v of message.expedited_min_deposit) { + Coin.encode(v!, writer.uint32(98).fork()).ldelim(); + } + if (message.burn_vote_quorum !== false) { writer.uint32(104).bool(message.burn_vote_quorum); } - if (message.burn_proposal_deposit_prevote === true) { + if (message.burn_proposal_deposit_prevote !== false) { writer.uint32(112).bool(message.burn_proposal_deposit_prevote); } - if (message.burn_vote_veto === true) { + if (message.burn_vote_veto !== false) { writer.uint32(120).bool(message.burn_vote_veto); } + if (message.min_deposit_ratio !== "") { + writer.uint32(130).string(message.min_deposit_ratio); + } return writer; }, @@ -1288,6 +1418,41 @@ export const Params = { message.min_initial_deposit_ratio = reader.string(); continue; + case 8: + if (tag !== 66) { + break; + } + + message.proposal_cancel_ratio = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.proposal_cancel_dest = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.expedited_voting_period = Duration.decode(reader, reader.uint32()); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.expedited_threshold = reader.string(); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.expedited_min_deposit.push(Coin.decode(reader, reader.uint32())); + continue; case 13: if (tag !== 104) { break; @@ -1309,6 +1474,13 @@ export const Params = { message.burn_vote_veto = reader.bool(); continue; + case 16: + if (tag !== 130) { + break; + } + + message.min_deposit_ratio = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -1331,11 +1503,21 @@ export const Params = { min_initial_deposit_ratio: isSet(object.min_initial_deposit_ratio) ? globalThis.String(object.min_initial_deposit_ratio) : "", + proposal_cancel_ratio: isSet(object.proposal_cancel_ratio) ? globalThis.String(object.proposal_cancel_ratio) : "", + proposal_cancel_dest: isSet(object.proposal_cancel_dest) ? globalThis.String(object.proposal_cancel_dest) : "", + expedited_voting_period: isSet(object.expedited_voting_period) + ? Duration.fromJSON(object.expedited_voting_period) + : undefined, + expedited_threshold: isSet(object.expedited_threshold) ? globalThis.String(object.expedited_threshold) : "", + expedited_min_deposit: globalThis.Array.isArray(object?.expedited_min_deposit) + ? object.expedited_min_deposit.map((e: any) => Coin.fromJSON(e)) + : [], burn_vote_quorum: isSet(object.burn_vote_quorum) ? globalThis.Boolean(object.burn_vote_quorum) : false, burn_proposal_deposit_prevote: isSet(object.burn_proposal_deposit_prevote) ? globalThis.Boolean(object.burn_proposal_deposit_prevote) : false, burn_vote_veto: isSet(object.burn_vote_veto) ? globalThis.Boolean(object.burn_vote_veto) : false, + min_deposit_ratio: isSet(object.min_deposit_ratio) ? globalThis.String(object.min_deposit_ratio) : "", }; }, @@ -1362,15 +1544,33 @@ export const Params = { if (message.min_initial_deposit_ratio !== "") { obj.min_initial_deposit_ratio = message.min_initial_deposit_ratio; } - if (message.burn_vote_quorum === true) { + if (message.proposal_cancel_ratio !== "") { + obj.proposal_cancel_ratio = message.proposal_cancel_ratio; + } + if (message.proposal_cancel_dest !== "") { + obj.proposal_cancel_dest = message.proposal_cancel_dest; + } + if (message.expedited_voting_period !== undefined) { + obj.expedited_voting_period = Duration.toJSON(message.expedited_voting_period); + } + if (message.expedited_threshold !== "") { + obj.expedited_threshold = message.expedited_threshold; + } + if (message.expedited_min_deposit?.length) { + obj.expedited_min_deposit = message.expedited_min_deposit.map((e) => Coin.toJSON(e)); + } + if (message.burn_vote_quorum !== false) { obj.burn_vote_quorum = message.burn_vote_quorum; } - if (message.burn_proposal_deposit_prevote === true) { + if (message.burn_proposal_deposit_prevote !== false) { obj.burn_proposal_deposit_prevote = message.burn_proposal_deposit_prevote; } - if (message.burn_vote_veto === true) { + if (message.burn_vote_veto !== false) { obj.burn_vote_veto = message.burn_vote_veto; } + if (message.min_deposit_ratio !== "") { + obj.min_deposit_ratio = message.min_deposit_ratio; + } return obj; }, @@ -1390,9 +1590,18 @@ export const Params = { message.threshold = object.threshold ?? ""; message.veto_threshold = object.veto_threshold ?? ""; message.min_initial_deposit_ratio = object.min_initial_deposit_ratio ?? ""; + message.proposal_cancel_ratio = object.proposal_cancel_ratio ?? ""; + message.proposal_cancel_dest = object.proposal_cancel_dest ?? ""; + message.expedited_voting_period = + (object.expedited_voting_period !== undefined && object.expedited_voting_period !== null) + ? Duration.fromPartial(object.expedited_voting_period) + : undefined; + message.expedited_threshold = object.expedited_threshold ?? ""; + message.expedited_min_deposit = object.expedited_min_deposit?.map((e) => Coin.fromPartial(e)) || []; message.burn_vote_quorum = object.burn_vote_quorum ?? false; message.burn_proposal_deposit_prevote = object.burn_proposal_deposit_prevote ?? false; message.burn_vote_veto = object.burn_vote_veto ?? false; + message.min_deposit_ratio = object.min_deposit_ratio ?? ""; return message; }, }; diff --git a/common/types/src/client/cosmos/gov/v1/tx.ts b/common/types/src/client/cosmos/gov/v1/tx.ts index 810893d8..0737790e 100644 --- a/common/types/src/client/cosmos/gov/v1/tx.ts +++ b/common/types/src/client/cosmos/gov/v1/tx.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/gov/v1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; +import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin } from "../../base/v1beta1/coin"; import { Params, VoteOption, voteOptionFromJSON, voteOptionToJSON, WeightedVoteOption } from "./gov"; @@ -34,6 +41,12 @@ export interface MsgSubmitProposal { * Since: cosmos-sdk 0.47 */ summary: string; + /** + * expedited defines if the proposal is expedited or not + * + * Since: cosmos-sdk 0.50 + */ + expedited: boolean; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -130,8 +143,37 @@ export interface MsgUpdateParams { export interface MsgUpdateParamsResponse { } +/** + * MsgCancelProposal is the Msg/CancelProposal request type. + * + * Since: cosmos-sdk 0.50 + */ +export interface MsgCancelProposal { + /** proposal_id defines the unique id of the proposal. */ + proposal_id: string; + /** proposer is the account address of the proposer. */ + proposer: string; +} + +/** + * MsgCancelProposalResponse defines the response structure for executing a + * MsgCancelProposal message. + * + * Since: cosmos-sdk 0.50 + */ +export interface MsgCancelProposalResponse { + /** proposal_id defines the unique id of the proposal. */ + proposal_id: string; + /** canceled_time is the time when proposal is canceled. */ + canceled_time?: + | Date + | undefined; + /** canceled_height defines the block height at which the proposal is canceled. */ + canceled_height: string; +} + function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { messages: [], initial_deposit: [], proposer: "", metadata: "", title: "", summary: "" }; + return { messages: [], initial_deposit: [], proposer: "", metadata: "", title: "", summary: "", expedited: false }; } export const MsgSubmitProposal = { @@ -154,6 +196,9 @@ export const MsgSubmitProposal = { if (message.summary !== "") { writer.uint32(50).string(message.summary); } + if (message.expedited !== false) { + writer.uint32(56).bool(message.expedited); + } return writer; }, @@ -206,6 +251,13 @@ export const MsgSubmitProposal = { message.summary = reader.string(); continue; + case 7: + if (tag !== 56) { + break; + } + + message.expedited = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -225,6 +277,7 @@ export const MsgSubmitProposal = { metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", summary: isSet(object.summary) ? globalThis.String(object.summary) : "", + expedited: isSet(object.expedited) ? globalThis.Boolean(object.expedited) : false, }; }, @@ -248,6 +301,9 @@ export const MsgSubmitProposal = { if (message.summary !== "") { obj.summary = message.summary; } + if (message.expedited !== false) { + obj.expedited = message.expedited; + } return obj; }, @@ -262,6 +318,7 @@ export const MsgSubmitProposal = { message.metadata = object.metadata ?? ""; message.title = object.title ?? ""; message.summary = object.summary ?? ""; + message.expedited = object.expedited ?? false; return message; }, }; @@ -989,6 +1046,169 @@ export const MsgUpdateParamsResponse = { }, }; +function createBaseMsgCancelProposal(): MsgCancelProposal { + return { proposal_id: "0", proposer: "" }; +} + +export const MsgCancelProposal = { + encode(message: MsgCancelProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proposal_id !== "0") { + writer.uint32(8).uint64(message.proposal_id); + } + if (message.proposer !== "") { + writer.uint32(18).string(message.proposer); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCancelProposal { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCancelProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.proposal_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.proposer = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MsgCancelProposal { + return { + proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", + proposer: isSet(object.proposer) ? globalThis.String(object.proposer) : "", + }; + }, + + toJSON(message: MsgCancelProposal): unknown { + const obj: any = {}; + if (message.proposal_id !== "0") { + obj.proposal_id = message.proposal_id; + } + if (message.proposer !== "") { + obj.proposer = message.proposer; + } + return obj; + }, + + create, I>>(base?: I): MsgCancelProposal { + return MsgCancelProposal.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MsgCancelProposal { + const message = createBaseMsgCancelProposal(); + message.proposal_id = object.proposal_id ?? "0"; + message.proposer = object.proposer ?? ""; + return message; + }, +}; + +function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { + return { proposal_id: "0", canceled_time: undefined, canceled_height: "0" }; +} + +export const MsgCancelProposalResponse = { + encode(message: MsgCancelProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proposal_id !== "0") { + writer.uint32(8).uint64(message.proposal_id); + } + if (message.canceled_time !== undefined) { + Timestamp.encode(toTimestamp(message.canceled_time), writer.uint32(18).fork()).ldelim(); + } + if (message.canceled_height !== "0") { + writer.uint32(24).uint64(message.canceled_height); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCancelProposalResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCancelProposalResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.proposal_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.canceled_time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.canceled_height = longToString(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MsgCancelProposalResponse { + return { + proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", + canceled_time: isSet(object.canceled_time) ? fromJsonTimestamp(object.canceled_time) : undefined, + canceled_height: isSet(object.canceled_height) ? globalThis.String(object.canceled_height) : "0", + }; + }, + + toJSON(message: MsgCancelProposalResponse): unknown { + const obj: any = {}; + if (message.proposal_id !== "0") { + obj.proposal_id = message.proposal_id; + } + if (message.canceled_time !== undefined) { + obj.canceled_time = message.canceled_time.toISOString(); + } + if (message.canceled_height !== "0") { + obj.canceled_height = message.canceled_height; + } + return obj; + }, + + create, I>>(base?: I): MsgCancelProposalResponse { + return MsgCancelProposalResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MsgCancelProposalResponse { + const message = createBaseMsgCancelProposalResponse(); + message.proposal_id = object.proposal_id ?? "0"; + message.canceled_time = object.canceled_time ?? undefined; + message.canceled_height = object.canceled_height ?? "0"; + return message; + }, +}; + /** Msg defines the gov Msg service. */ export interface Msg { /** SubmitProposal defines a method to create new proposal given the messages. */ @@ -1011,6 +1231,12 @@ export interface Msg { * Since: cosmos-sdk 0.47 */ UpdateParams(request: MsgUpdateParams): Promise; + /** + * CancelProposal defines a method to cancel governance proposal + * + * Since: cosmos-sdk 0.50 + */ + CancelProposal(request: MsgCancelProposal): Promise; } export const MsgServiceName = "cosmos.gov.v1.Msg"; @@ -1026,6 +1252,7 @@ export class MsgClientImpl implements Msg { this.VoteWeighted = this.VoteWeighted.bind(this); this.Deposit = this.Deposit.bind(this); this.UpdateParams = this.UpdateParams.bind(this); + this.CancelProposal = this.CancelProposal.bind(this); } SubmitProposal(request: MsgSubmitProposal): Promise { const data = MsgSubmitProposal.encode(request).finish(); @@ -1062,6 +1289,12 @@ export class MsgClientImpl implements Msg { const promise = this.rpc.request(this.service, "UpdateParams", data); return promise.then((data) => MsgUpdateParamsResponse.decode(_m0.Reader.create(data))); } + + CancelProposal(request: MsgCancelProposal): Promise { + const data = MsgCancelProposal.encode(request).finish(); + const promise = this.rpc.request(this.service, "CancelProposal", data); + return promise.then((data) => MsgCancelProposalResponse.decode(_m0.Reader.create(data))); + } } interface Rpc { @@ -1080,6 +1313,28 @@ type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; +function toTimestamp(date: Date): Timestamp { + const seconds = Math.trunc(date.getTime() / 1_000).toString(); + const nanos = (date.getTime() % 1_000) * 1_000_000; + return { seconds, nanos }; +} + +function fromTimestamp(t: Timestamp): Date { + let millis = (globalThis.Number(t.seconds) || 0) * 1_000; + millis += (t.nanos || 0) / 1_000_000; + return new globalThis.Date(millis); +} + +function fromJsonTimestamp(o: any): Date { + if (o instanceof globalThis.Date) { + return o; + } else if (typeof o === "string") { + return new globalThis.Date(o); + } else { + return fromTimestamp(Timestamp.fromJSON(o)); + } +} + function longToString(long: Long) { return long.toString(); } diff --git a/common/types/src/client/cosmos/msg/v1/msg.ts b/common/types/src/client/cosmos/msg/v1/msg.ts index 093dfbba..7012edff 100644 --- a/common/types/src/client/cosmos/msg/v1/msg.ts +++ b/common/types/src/client/cosmos/msg/v1/msg.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/msg/v1/msg.proto + /* eslint-disable */ export const protobufPackage = "cosmos.msg.v1"; diff --git a/common/types/src/client/cosmos_proto/cosmos.ts b/common/types/src/client/cosmos_proto/cosmos.ts index 43670f8a..75fa23b3 100644 --- a/common/types/src/client/cosmos_proto/cosmos.ts +++ b/common/types/src/client/cosmos_proto/cosmos.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos_proto/cosmos.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/gogoproto/gogo.ts b/common/types/src/client/gogoproto/gogo.ts index ecf800e0..edd73fe6 100644 --- a/common/types/src/client/gogoproto/gogo.ts +++ b/common/types/src/client/gogoproto/gogo.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: gogoproto/gogo.proto + /* eslint-disable */ export const protobufPackage = "gogoproto"; diff --git a/common/types/src/client/google/api/annotations.ts b/common/types/src/client/google/api/annotations.ts index c2161053..1d1b2d5f 100644 --- a/common/types/src/client/google/api/annotations.ts +++ b/common/types/src/client/google/api/annotations.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/api/annotations.proto + /* eslint-disable */ export const protobufPackage = "google.api"; diff --git a/common/types/src/client/google/api/http.ts b/common/types/src/client/google/api/http.ts index 18b91749..0b105734 100644 --- a/common/types/src/client/google/api/http.ts +++ b/common/types/src/client/google/api/http.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/api/http.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -382,7 +388,7 @@ export const Http = { for (const v of message.rules) { HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.fully_decode_reserved_expansion === true) { + if (message.fully_decode_reserved_expansion !== false) { writer.uint32(16).bool(message.fully_decode_reserved_expansion); } return writer; @@ -432,7 +438,7 @@ export const Http = { if (message.rules?.length) { obj.rules = message.rules.map((e) => HttpRule.toJSON(e)); } - if (message.fully_decode_reserved_expansion === true) { + if (message.fully_decode_reserved_expansion !== false) { obj.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; } return obj; diff --git a/common/types/src/client/google/protobuf/any.ts b/common/types/src/client/google/protobuf/any.ts index d7319f6a..69bacf8e 100644 --- a/common/types/src/client/google/protobuf/any.ts +++ b/common/types/src/client/google/protobuf/any.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/any.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -201,7 +207,7 @@ export const Any = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); @@ -214,7 +220,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; diff --git a/common/types/src/client/google/protobuf/duration.ts b/common/types/src/client/google/protobuf/duration.ts index 00080d2e..68f69d05 100644 --- a/common/types/src/client/google/protobuf/duration.ts +++ b/common/types/src/client/google/protobuf/duration.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/duration.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/google/protobuf/timestamp.ts b/common/types/src/client/google/protobuf/timestamp.ts index 83d40f44..84095fd4 100644 --- a/common/types/src/client/google/protobuf/timestamp.ts +++ b/common/types/src/client/google/protobuf/timestamp.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/timestamp.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/bundles/module/module.ts b/common/types/src/client/kyve/bundles/module/module.ts new file mode 100644 index 00000000..f025fd37 --- /dev/null +++ b/common/types/src/client/kyve/bundles/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.bundles.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/bundles/v1beta1/bundles.ts b/common/types/src/client/kyve/bundles/v1beta1/bundles.ts index b3ce1c3b..2e6c6b5e 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/bundles.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/bundles.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/bundles.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/bundles/v1beta1/events.ts b/common/types/src/client/kyve/bundles/v1beta1/events.ts index 988dcb99..17b0285a 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/events.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -105,15 +111,18 @@ export interface EventBundleFinalized { total: string; /** status of the finalized bundle */ status: BundleStatus; - /** amount which funders provided to the total bundle reward (in ukyve) */ + /** amount which funders provided to the total bundle reward */ funders_payout: string; /** amount which the inflation pool provided to the total reward (in ukyve) */ inflation_payout: string; - /** rewards transferred to treasury (in ukyve) */ + /** rewards transferred to treasury */ reward_treasury: string; - /** rewardUploader rewards directly transferred to uploader (in ukyve) */ + /** + * reward_uploader are the total rewards (commission + storage cost) + * the uploader received + */ reward_uploader: string; - /** rewardDelegation rewards distributed among all delegators (in ukyve) */ + /** rewardDelegation rewards distributed among all delegators */ reward_delegation: string; /** rewardTotal the total bundle reward */ reward_total: string; @@ -123,6 +132,13 @@ export interface EventBundleFinalized { uploader: string; /** next_uploader the address of the next uploader after this bundle */ next_uploader: string; + /** reward_uploader_storage_cost are the storage cost rewards for the uploader */ + reward_uploader_storage_cost: string; + /** + * reward_uploader_commission are the commission rewards of the uploader. + * if the uploader has no delegations the delegation rewards are included here + */ + reward_uploader_commission: string; } /** @@ -655,15 +671,17 @@ function createBaseEventBundleFinalized(): EventBundleFinalized { abstain: "0", total: "0", status: 0, - funders_payout: "0", + funders_payout: "", inflation_payout: "0", - reward_treasury: "0", - reward_uploader: "0", - reward_delegation: "0", - reward_total: "0", + reward_treasury: "", + reward_uploader: "", + reward_delegation: "", + reward_total: "", finalized_at: "0", uploader: "", next_uploader: "", + reward_uploader_storage_cost: "", + reward_uploader_commission: "", }; } @@ -690,23 +708,23 @@ export const EventBundleFinalized = { if (message.status !== 0) { writer.uint32(56).int32(message.status); } - if (message.funders_payout !== "0") { - writer.uint32(64).uint64(message.funders_payout); + if (message.funders_payout !== "") { + writer.uint32(66).string(message.funders_payout); } if (message.inflation_payout !== "0") { writer.uint32(72).uint64(message.inflation_payout); } - if (message.reward_treasury !== "0") { - writer.uint32(80).uint64(message.reward_treasury); + if (message.reward_treasury !== "") { + writer.uint32(82).string(message.reward_treasury); } - if (message.reward_uploader !== "0") { - writer.uint32(88).uint64(message.reward_uploader); + if (message.reward_uploader !== "") { + writer.uint32(90).string(message.reward_uploader); } - if (message.reward_delegation !== "0") { - writer.uint32(96).uint64(message.reward_delegation); + if (message.reward_delegation !== "") { + writer.uint32(98).string(message.reward_delegation); } - if (message.reward_total !== "0") { - writer.uint32(104).uint64(message.reward_total); + if (message.reward_total !== "") { + writer.uint32(106).string(message.reward_total); } if (message.finalized_at !== "0") { writer.uint32(112).uint64(message.finalized_at); @@ -717,6 +735,12 @@ export const EventBundleFinalized = { if (message.next_uploader !== "") { writer.uint32(130).string(message.next_uploader); } + if (message.reward_uploader_storage_cost !== "") { + writer.uint32(138).string(message.reward_uploader_storage_cost); + } + if (message.reward_uploader_commission !== "") { + writer.uint32(146).string(message.reward_uploader_commission); + } return writer; }, @@ -777,11 +801,11 @@ export const EventBundleFinalized = { message.status = reader.int32() as any; continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.funders_payout = longToString(reader.uint64() as Long); + message.funders_payout = reader.string(); continue; case 9: if (tag !== 72) { @@ -791,32 +815,32 @@ export const EventBundleFinalized = { message.inflation_payout = longToString(reader.uint64() as Long); continue; case 10: - if (tag !== 80) { + if (tag !== 82) { break; } - message.reward_treasury = longToString(reader.uint64() as Long); + message.reward_treasury = reader.string(); continue; case 11: - if (tag !== 88) { + if (tag !== 90) { break; } - message.reward_uploader = longToString(reader.uint64() as Long); + message.reward_uploader = reader.string(); continue; case 12: - if (tag !== 96) { + if (tag !== 98) { break; } - message.reward_delegation = longToString(reader.uint64() as Long); + message.reward_delegation = reader.string(); continue; case 13: - if (tag !== 104) { + if (tag !== 106) { break; } - message.reward_total = longToString(reader.uint64() as Long); + message.reward_total = reader.string(); continue; case 14: if (tag !== 112) { @@ -839,6 +863,20 @@ export const EventBundleFinalized = { message.next_uploader = reader.string(); continue; + case 17: + if (tag !== 138) { + break; + } + + message.reward_uploader_storage_cost = reader.string(); + continue; + case 18: + if (tag !== 146) { + break; + } + + message.reward_uploader_commission = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -857,15 +895,21 @@ export const EventBundleFinalized = { abstain: isSet(object.abstain) ? globalThis.String(object.abstain) : "0", total: isSet(object.total) ? globalThis.String(object.total) : "0", status: isSet(object.status) ? bundleStatusFromJSON(object.status) : 0, - funders_payout: isSet(object.funders_payout) ? globalThis.String(object.funders_payout) : "0", + funders_payout: isSet(object.funders_payout) ? globalThis.String(object.funders_payout) : "", inflation_payout: isSet(object.inflation_payout) ? globalThis.String(object.inflation_payout) : "0", - reward_treasury: isSet(object.reward_treasury) ? globalThis.String(object.reward_treasury) : "0", - reward_uploader: isSet(object.reward_uploader) ? globalThis.String(object.reward_uploader) : "0", - reward_delegation: isSet(object.reward_delegation) ? globalThis.String(object.reward_delegation) : "0", - reward_total: isSet(object.reward_total) ? globalThis.String(object.reward_total) : "0", + reward_treasury: isSet(object.reward_treasury) ? globalThis.String(object.reward_treasury) : "", + reward_uploader: isSet(object.reward_uploader) ? globalThis.String(object.reward_uploader) : "", + reward_delegation: isSet(object.reward_delegation) ? globalThis.String(object.reward_delegation) : "", + reward_total: isSet(object.reward_total) ? globalThis.String(object.reward_total) : "", finalized_at: isSet(object.finalized_at) ? globalThis.String(object.finalized_at) : "0", uploader: isSet(object.uploader) ? globalThis.String(object.uploader) : "", next_uploader: isSet(object.next_uploader) ? globalThis.String(object.next_uploader) : "", + reward_uploader_storage_cost: isSet(object.reward_uploader_storage_cost) + ? globalThis.String(object.reward_uploader_storage_cost) + : "", + reward_uploader_commission: isSet(object.reward_uploader_commission) + ? globalThis.String(object.reward_uploader_commission) + : "", }; }, @@ -892,22 +936,22 @@ export const EventBundleFinalized = { if (message.status !== 0) { obj.status = bundleStatusToJSON(message.status); } - if (message.funders_payout !== "0") { + if (message.funders_payout !== "") { obj.funders_payout = message.funders_payout; } if (message.inflation_payout !== "0") { obj.inflation_payout = message.inflation_payout; } - if (message.reward_treasury !== "0") { + if (message.reward_treasury !== "") { obj.reward_treasury = message.reward_treasury; } - if (message.reward_uploader !== "0") { + if (message.reward_uploader !== "") { obj.reward_uploader = message.reward_uploader; } - if (message.reward_delegation !== "0") { + if (message.reward_delegation !== "") { obj.reward_delegation = message.reward_delegation; } - if (message.reward_total !== "0") { + if (message.reward_total !== "") { obj.reward_total = message.reward_total; } if (message.finalized_at !== "0") { @@ -919,6 +963,12 @@ export const EventBundleFinalized = { if (message.next_uploader !== "") { obj.next_uploader = message.next_uploader; } + if (message.reward_uploader_storage_cost !== "") { + obj.reward_uploader_storage_cost = message.reward_uploader_storage_cost; + } + if (message.reward_uploader_commission !== "") { + obj.reward_uploader_commission = message.reward_uploader_commission; + } return obj; }, @@ -934,15 +984,17 @@ export const EventBundleFinalized = { message.abstain = object.abstain ?? "0"; message.total = object.total ?? "0"; message.status = object.status ?? 0; - message.funders_payout = object.funders_payout ?? "0"; + message.funders_payout = object.funders_payout ?? ""; message.inflation_payout = object.inflation_payout ?? "0"; - message.reward_treasury = object.reward_treasury ?? "0"; - message.reward_uploader = object.reward_uploader ?? "0"; - message.reward_delegation = object.reward_delegation ?? "0"; - message.reward_total = object.reward_total ?? "0"; + message.reward_treasury = object.reward_treasury ?? ""; + message.reward_uploader = object.reward_uploader ?? ""; + message.reward_delegation = object.reward_delegation ?? ""; + message.reward_total = object.reward_total ?? ""; message.finalized_at = object.finalized_at ?? "0"; message.uploader = object.uploader ?? ""; message.next_uploader = object.next_uploader ?? ""; + message.reward_uploader_storage_cost = object.reward_uploader_storage_cost ?? ""; + message.reward_uploader_commission = object.reward_uploader_commission ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/bundles/v1beta1/genesis.ts b/common/types/src/client/kyve/bundles/v1beta1/genesis.ts index 4be66c46..8cdf9ace 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { BundleProposal, BundleVersionMap, FinalizedBundle, RoundRobinProgress } from "./bundles"; diff --git a/common/types/src/client/kyve/bundles/v1beta1/params.ts b/common/types/src/client/kyve/bundles/v1beta1/params.ts index f9f18d1a..6194f7eb 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/params.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/params.ts @@ -1,23 +1,111 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; export const protobufPackage = "kyve.bundles.v1beta1"; +/** StorageCost defines the cost for storage providers */ +export interface StorageCost { + /** storage_provider_id is a unique identifier for each storage provider, such as Arweave, Irys, Filecoin, etc. */ + storage_provider_id: number; + /** cost is the amount in USD to store one byte on the storage provider. This value should be kept up-to-date. */ + cost: string; +} + /** Params defines the bundles module parameters. */ export interface Params { /** upload_timeout ... */ upload_timeout: string; - /** storage_cost ... */ - storage_cost: string; + /** storage_costs ... */ + storage_costs: StorageCost[]; /** network_fee ... */ network_fee: string; /** max_points ... */ max_points: string; } +function createBaseStorageCost(): StorageCost { + return { storage_provider_id: 0, cost: "" }; +} + +export const StorageCost = { + encode(message: StorageCost, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.storage_provider_id !== 0) { + writer.uint32(8).uint32(message.storage_provider_id); + } + if (message.cost !== "") { + writer.uint32(18).string(message.cost); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): StorageCost { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStorageCost(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.storage_provider_id = reader.uint32(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.cost = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): StorageCost { + return { + storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, + cost: isSet(object.cost) ? globalThis.String(object.cost) : "", + }; + }, + + toJSON(message: StorageCost): unknown { + const obj: any = {}; + if (message.storage_provider_id !== 0) { + obj.storage_provider_id = Math.round(message.storage_provider_id); + } + if (message.cost !== "") { + obj.cost = message.cost; + } + return obj; + }, + + create, I>>(base?: I): StorageCost { + return StorageCost.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): StorageCost { + const message = createBaseStorageCost(); + message.storage_provider_id = object.storage_provider_id ?? 0; + message.cost = object.cost ?? ""; + return message; + }, +}; + function createBaseParams(): Params { - return { upload_timeout: "0", storage_cost: "", network_fee: "", max_points: "0" }; + return { upload_timeout: "0", storage_costs: [], network_fee: "", max_points: "0" }; } export const Params = { @@ -25,8 +113,8 @@ export const Params = { if (message.upload_timeout !== "0") { writer.uint32(8).uint64(message.upload_timeout); } - if (message.storage_cost !== "") { - writer.uint32(18).string(message.storage_cost); + for (const v of message.storage_costs) { + StorageCost.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.network_fee !== "") { writer.uint32(26).string(message.network_fee); @@ -56,7 +144,7 @@ export const Params = { break; } - message.storage_cost = reader.string(); + message.storage_costs.push(StorageCost.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { @@ -84,7 +172,9 @@ export const Params = { fromJSON(object: any): Params { return { upload_timeout: isSet(object.upload_timeout) ? globalThis.String(object.upload_timeout) : "0", - storage_cost: isSet(object.storage_cost) ? globalThis.String(object.storage_cost) : "", + storage_costs: globalThis.Array.isArray(object?.storage_costs) + ? object.storage_costs.map((e: any) => StorageCost.fromJSON(e)) + : [], network_fee: isSet(object.network_fee) ? globalThis.String(object.network_fee) : "", max_points: isSet(object.max_points) ? globalThis.String(object.max_points) : "0", }; @@ -95,8 +185,8 @@ export const Params = { if (message.upload_timeout !== "0") { obj.upload_timeout = message.upload_timeout; } - if (message.storage_cost !== "") { - obj.storage_cost = message.storage_cost; + if (message.storage_costs?.length) { + obj.storage_costs = message.storage_costs.map((e) => StorageCost.toJSON(e)); } if (message.network_fee !== "") { obj.network_fee = message.network_fee; @@ -113,7 +203,7 @@ export const Params = { fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.upload_timeout = object.upload_timeout ?? "0"; - message.storage_cost = object.storage_cost ?? ""; + message.storage_costs = object.storage_costs?.map((e) => StorageCost.fromPartial(e)) || []; message.network_fee = object.network_fee ?? ""; message.max_points = object.max_points ?? "0"; return message; diff --git a/common/types/src/client/kyve/bundles/v1beta1/query.ts b/common/types/src/client/kyve/bundles/v1beta1/query.ts index ddd88889..9d07008b 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/query.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/bundles/v1beta1/tx.ts b/common/types/src/client/kyve/bundles/v1beta1/tx.ts index faf47153..d2fef630 100644 --- a/common/types/src/client/kyve/bundles/v1beta1/tx.ts +++ b/common/types/src/client/kyve/bundles/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/delegation/module/module.ts b/common/types/src/client/kyve/delegation/module/module.ts new file mode 100644 index 00000000..5e1a934d --- /dev/null +++ b/common/types/src/client/kyve/delegation/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.delegation.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/delegation/v1beta1/delegation.ts b/common/types/src/client/kyve/delegation/v1beta1/delegation.ts index d111c081..96461ad8 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/delegation.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/delegation.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/delegation.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.delegation.v1beta1"; @@ -85,7 +92,7 @@ export interface DelegationEntry { /** k_index is the of the period this entry ends */ k_index: string; /** value is the quotient of collected rewards and total stake according to F1-distribution */ - value: string; + value: DecCoin[]; } /** DelegationPoolData stores general delegation information for every staker */ @@ -93,7 +100,7 @@ export interface DelegationData { /** Every staker has one DelegationData */ staker: string; /** current_rewards ... */ - current_rewards: string; + current_rewards: Coin[]; /** total_delegation ... */ total_delegation: string; /** latest_index_k ... */ @@ -253,7 +260,7 @@ export const Delegator = { }; function createBaseDelegationEntry(): DelegationEntry { - return { staker: "", k_index: "0", value: "" }; + return { staker: "", k_index: "0", value: [] }; } export const DelegationEntry = { @@ -264,8 +271,8 @@ export const DelegationEntry = { if (message.k_index !== "0") { writer.uint32(16).uint64(message.k_index); } - if (message.value !== "") { - writer.uint32(26).string(message.value); + for (const v of message.value) { + DecCoin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, @@ -296,7 +303,7 @@ export const DelegationEntry = { break; } - message.value = reader.string(); + message.value.push(DecCoin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -311,7 +318,7 @@ export const DelegationEntry = { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", k_index: isSet(object.k_index) ? globalThis.String(object.k_index) : "0", - value: isSet(object.value) ? globalThis.String(object.value) : "", + value: globalThis.Array.isArray(object?.value) ? object.value.map((e: any) => DecCoin.fromJSON(e)) : [], }; }, @@ -323,8 +330,8 @@ export const DelegationEntry = { if (message.k_index !== "0") { obj.k_index = message.k_index; } - if (message.value !== "") { - obj.value = message.value; + if (message.value?.length) { + obj.value = message.value.map((e) => DecCoin.toJSON(e)); } return obj; }, @@ -336,7 +343,7 @@ export const DelegationEntry = { const message = createBaseDelegationEntry(); message.staker = object.staker ?? ""; message.k_index = object.k_index ?? "0"; - message.value = object.value ?? ""; + message.value = object.value?.map((e) => DecCoin.fromPartial(e)) || []; return message; }, }; @@ -344,7 +351,7 @@ export const DelegationEntry = { function createBaseDelegationData(): DelegationData { return { staker: "", - current_rewards: "0", + current_rewards: [], total_delegation: "0", latest_index_k: "0", delegator_count: "0", @@ -357,8 +364,8 @@ export const DelegationData = { if (message.staker !== "") { writer.uint32(10).string(message.staker); } - if (message.current_rewards !== "0") { - writer.uint32(16).uint64(message.current_rewards); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.total_delegation !== "0") { writer.uint32(24).uint64(message.total_delegation); @@ -369,7 +376,7 @@ export const DelegationData = { if (message.delegator_count !== "0") { writer.uint32(40).uint64(message.delegator_count); } - if (message.latest_index_was_undelegation === true) { + if (message.latest_index_was_undelegation !== false) { writer.uint32(48).bool(message.latest_index_was_undelegation); } return writer; @@ -390,11 +397,11 @@ export const DelegationData = { message.staker = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.current_rewards = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -436,7 +443,9 @@ export const DelegationData = { fromJSON(object: any): DelegationData { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - current_rewards: isSet(object.current_rewards) ? globalThis.String(object.current_rewards) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], total_delegation: isSet(object.total_delegation) ? globalThis.String(object.total_delegation) : "0", latest_index_k: isSet(object.latest_index_k) ? globalThis.String(object.latest_index_k) : "0", delegator_count: isSet(object.delegator_count) ? globalThis.String(object.delegator_count) : "0", @@ -451,8 +460,8 @@ export const DelegationData = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.current_rewards !== "0") { - obj.current_rewards = message.current_rewards; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.total_delegation !== "0") { obj.total_delegation = message.total_delegation; @@ -463,7 +472,7 @@ export const DelegationData = { if (message.delegator_count !== "0") { obj.delegator_count = message.delegator_count; } - if (message.latest_index_was_undelegation === true) { + if (message.latest_index_was_undelegation !== false) { obj.latest_index_was_undelegation = message.latest_index_was_undelegation; } return obj; @@ -475,7 +484,7 @@ export const DelegationData = { fromPartial, I>>(object: I): DelegationData { const message = createBaseDelegationData(); message.staker = object.staker ?? ""; - message.current_rewards = object.current_rewards ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.total_delegation = object.total_delegation ?? "0"; message.latest_index_k = object.latest_index_k ?? "0"; message.delegator_count = object.delegator_count ?? "0"; diff --git a/common/types/src/client/kyve/delegation/v1beta1/events.ts b/common/types/src/client/kyve/delegation/v1beta1/events.ts index 031b7c43..f58938b0 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/events.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -91,8 +97,8 @@ export interface EventWithdrawRewards { address: string; /** staker is the account address of the protocol node the users withdraws from. */ staker: string; - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: string; } /** @@ -592,7 +598,7 @@ export const EventRedelegate = { }; function createBaseEventWithdrawRewards(): EventWithdrawRewards { - return { address: "", staker: "", amount: "0" }; + return { address: "", staker: "", amounts: "" }; } export const EventWithdrawRewards = { @@ -603,8 +609,8 @@ export const EventWithdrawRewards = { if (message.staker !== "") { writer.uint32(18).string(message.staker); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } return writer; }, @@ -631,11 +637,11 @@ export const EventWithdrawRewards = { message.staker = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -650,7 +656,7 @@ export const EventWithdrawRewards = { return { address: isSet(object.address) ? globalThis.String(object.address) : "", staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -662,8 +668,8 @@ export const EventWithdrawRewards = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -675,7 +681,7 @@ export const EventWithdrawRewards = { const message = createBaseEventWithdrawRewards(); message.address = object.address ?? ""; message.staker = object.staker ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/delegation/v1beta1/genesis.ts b/common/types/src/client/kyve/delegation/v1beta1/genesis.ts index 26474063..88f9492a 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { diff --git a/common/types/src/client/kyve/delegation/v1beta1/params.ts b/common/types/src/client/kyve/delegation/v1beta1/params.ts index 9d495c1f..eaa8393c 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/params.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/delegation/v1beta1/query.ts b/common/types/src/client/kyve/delegation/v1beta1/query.ts index fa3a3652..51787f12 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/query.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/delegation/v1beta1/tx.ts b/common/types/src/client/kyve/delegation/v1beta1/tx.ts index 12cbf4c9..52c7b68b 100644 --- a/common/types/src/client/kyve/delegation/v1beta1/tx.ts +++ b/common/types/src/client/kyve/delegation/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/funders/module/module.ts b/common/types/src/client/kyve/funders/module/module.ts new file mode 100644 index 00000000..66639f77 --- /dev/null +++ b/common/types/src/client/kyve/funders/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.funders.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/funders/v1beta1/events.ts b/common/types/src/client/kyve/funders/v1beta1/events.ts index ab37613d..6711aa41 100644 --- a/common/types/src/client/kyve/funders/v1beta1/events.ts +++ b/common/types/src/client/kyve/funders/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -69,10 +75,10 @@ export interface EventFundPool { pool_id: string; /** address is the account address of the pool funder. */ address: string; - /** amount is the amount in ukyve the funder has funded */ - amount: string; - /** amount_per_bundle is the amount in ukyve the funder has funded per bundle */ - amount_per_bundle: string; + /** amounts is a list of coins the funder has funded */ + amounts: string; + /** amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle */ + amounts_per_bundle: string; } /** @@ -84,8 +90,8 @@ export interface EventDefundPool { pool_id: string; /** address is the account address of the pool funder. */ address: string; - /** amount is the amount in ukyve the funder has defunded */ - amount: string; + /** amounts is a list of coins that the funder wants to defund */ + amounts: string; } /** @@ -459,7 +465,7 @@ export const EventUpdateFunder = { }; function createBaseEventFundPool(): EventFundPool { - return { pool_id: "0", address: "", amount: "0", amount_per_bundle: "0" }; + return { pool_id: "0", address: "", amounts: "", amounts_per_bundle: "" }; } export const EventFundPool = { @@ -470,11 +476,11 @@ export const EventFundPool = { if (message.address !== "") { writer.uint32(18).string(message.address); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + if (message.amounts_per_bundle !== "") { + writer.uint32(34).string(message.amounts_per_bundle); } return writer; }, @@ -501,18 +507,18 @@ export const EventFundPool = { message.address = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -527,8 +533,8 @@ export const EventFundPool = { return { pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", address: isSet(object.address) ? globalThis.String(object.address) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", + amounts_per_bundle: isSet(object.amounts_per_bundle) ? globalThis.String(object.amounts_per_bundle) : "", }; }, @@ -540,11 +546,11 @@ export const EventFundPool = { if (message.address !== "") { obj.address = message.address; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle !== "") { + obj.amounts_per_bundle = message.amounts_per_bundle; } return obj; }, @@ -556,14 +562,14 @@ export const EventFundPool = { const message = createBaseEventFundPool(); message.pool_id = object.pool_id ?? "0"; message.address = object.address ?? ""; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; + message.amounts = object.amounts ?? ""; + message.amounts_per_bundle = object.amounts_per_bundle ?? ""; return message; }, }; function createBaseEventDefundPool(): EventDefundPool { - return { pool_id: "0", address: "", amount: "0" }; + return { pool_id: "0", address: "", amounts: "" }; } export const EventDefundPool = { @@ -574,8 +580,8 @@ export const EventDefundPool = { if (message.address !== "") { writer.uint32(18).string(message.address); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } return writer; }, @@ -602,11 +608,11 @@ export const EventDefundPool = { message.address = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -621,7 +627,7 @@ export const EventDefundPool = { return { pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", address: isSet(object.address) ? globalThis.String(object.address) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -633,8 +639,8 @@ export const EventDefundPool = { if (message.address !== "") { obj.address = message.address; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -646,7 +652,7 @@ export const EventDefundPool = { const message = createBaseEventDefundPool(); message.pool_id = object.pool_id ?? "0"; message.address = object.address ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/funders/v1beta1/funders.ts b/common/types/src/client/kyve/funders/v1beta1/funders.ts index f608aca4..c8305c68 100644 --- a/common/types/src/client/kyve/funders/v1beta1/funders.ts +++ b/common/types/src/client/kyve/funders/v1beta1/funders.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/funders.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.funders.v1beta1"; @@ -27,16 +34,19 @@ export interface Funder { * by each funder once. However, a funder can update the amount of funds. */ export interface Funding { - /** funder_id is the id of the funder */ + /** funder_address is the address of the funder */ funder_address: string; /** pool_id is the id of the pool this funding is for */ pool_id: string; - /** amount is the amount of funds in ukyve the funder has left */ - amount: string; - /** amount_per_bundle is the amount of funds in ukyve the funder pays per bundle */ - amount_per_bundle: string; - /** total_funded is the total amount of funds in ukyve the funder has funded */ - total_funded: string; + /** amounts is a list of coins the funder wants to fund the pool with */ + amounts: Coin[]; + /** + * amounts_per_bundle defines the amount of each coin that are distributed + * per finalized bundle + */ + amounts_per_bundle: Coin[]; + /** total_funded is the total amount of coins that the funder has funded */ + total_funded: Coin[]; } /** FundingState is the object which holds info about the funding state of a pool */ @@ -182,7 +192,7 @@ export const Funder = { }; function createBaseFunding(): Funding { - return { funder_address: "", pool_id: "0", amount: "0", amount_per_bundle: "0", total_funded: "0" }; + return { funder_address: "", pool_id: "0", amounts: [], amounts_per_bundle: [], total_funded: [] }; } export const Funding = { @@ -193,14 +203,14 @@ export const Funding = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.total_funded !== "0") { - writer.uint32(40).uint64(message.total_funded); + for (const v of message.total_funded) { + Coin.encode(v!, writer.uint32(42).fork()).ldelim(); } return writer; }, @@ -227,25 +237,25 @@ export const Funding = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.total_funded = longToString(reader.uint64() as Long); + message.total_funded.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -260,9 +270,13 @@ export const Funding = { return { funder_address: isSet(object.funder_address) ? globalThis.String(object.funder_address) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", - total_funded: isSet(object.total_funded) ? globalThis.String(object.total_funded) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], + total_funded: globalThis.Array.isArray(object?.total_funded) + ? object.total_funded.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -274,14 +288,14 @@ export const Funding = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } - if (message.total_funded !== "0") { - obj.total_funded = message.total_funded; + if (message.total_funded?.length) { + obj.total_funded = message.total_funded.map((e) => Coin.toJSON(e)); } return obj; }, @@ -293,9 +307,9 @@ export const Funding = { const message = createBaseFunding(); message.funder_address = object.funder_address ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; - message.total_funded = object.total_funded ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; + message.total_funded = object.total_funded?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/client/kyve/funders/v1beta1/genesis.ts b/common/types/src/client/kyve/funders/v1beta1/genesis.ts index d20082de..5ba62375 100644 --- a/common/types/src/client/kyve/funders/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/funders/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Funder, Funding, FundingState } from "./funders"; diff --git a/common/types/src/client/kyve/funders/v1beta1/params.ts b/common/types/src/client/kyve/funders/v1beta1/params.ts index 6c494a7c..e1f1b19d 100644 --- a/common/types/src/client/kyve/funders/v1beta1/params.ts +++ b/common/types/src/client/kyve/funders/v1beta1/params.ts @@ -1,68 +1,129 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; export const protobufPackage = "kyve.funders.v1beta1"; -/** Params defines the funders module parameters. */ -export interface Params { - /** Minimum amount of tokens that can be funded. */ +/** + * WhitelistCoinEntry is an object containing information around a coin which + * is allowed to be funded in pools + */ +export interface WhitelistCoinEntry { + /** + * coin_denom is the denom of a coin which is allowed to be funded, this value + * needs to be unique + */ + coin_denom: string; + /** coin_decimals are the decimals of the coin */ + coin_decimals: number; + /** + * min_funding_amount is the minimum required amount of this denom that needs + * to be funded. It is of type math.Int since a uint64 is not sufficient for a + * coin with 18 decimals + */ min_funding_amount: string; - /** Minimum amount of tokens that can be funded per bundle. */ + /** + * min_funding_amount_per_bundle is the minimum required amount of this denom + * that needs to be funded per bundle. It is of type math.Int since a uint64 + * is not sufficient for a coin with 18 decimals + */ min_funding_amount_per_bundle: string; + /** + * coin_weight is a factor used to sort funders after their funding amounts. + * This should be the market price of the coin in USD/coin. This value should be kept up-to-date. + */ + coin_weight: string; +} + +/** Params defines the funders module parameters. */ +export interface Params { + /** coin_whitelist is a list of coins that are allowed to fund a pool */ + coin_whitelist: WhitelistCoinEntry[]; /** * Minimum ratio between the funded amount and the amount_per_bundle. - * In other words this param ensures, that a funder provides at least funding for - * `min_funding_multiple` bundles. + * In other words this param ensures, that a funder provides at least + * funding for `min_funding_multiple` bundles. */ min_funding_multiple: string; } -function createBaseParams(): Params { - return { min_funding_amount: "0", min_funding_amount_per_bundle: "0", min_funding_multiple: "0" }; +function createBaseWhitelistCoinEntry(): WhitelistCoinEntry { + return { + coin_denom: "", + coin_decimals: 0, + min_funding_amount: "", + min_funding_amount_per_bundle: "", + coin_weight: "", + }; } -export const Params = { - encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.min_funding_amount !== "0") { - writer.uint32(8).uint64(message.min_funding_amount); +export const WhitelistCoinEntry = { + encode(message: WhitelistCoinEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.coin_denom !== "") { + writer.uint32(10).string(message.coin_denom); } - if (message.min_funding_amount_per_bundle !== "0") { - writer.uint32(16).uint64(message.min_funding_amount_per_bundle); + if (message.coin_decimals !== 0) { + writer.uint32(16).uint32(message.coin_decimals); } - if (message.min_funding_multiple !== "0") { - writer.uint32(24).uint64(message.min_funding_multiple); + if (message.min_funding_amount !== "") { + writer.uint32(26).string(message.min_funding_amount); + } + if (message.min_funding_amount_per_bundle !== "") { + writer.uint32(34).string(message.min_funding_amount_per_bundle); + } + if (message.coin_weight !== "") { + writer.uint32(42).string(message.coin_weight); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Params { + decode(input: _m0.Reader | Uint8Array, length?: number): WhitelistCoinEntry { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); + const message = createBaseWhitelistCoinEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 8) { + if (tag !== 10) { break; } - message.min_funding_amount = longToString(reader.uint64() as Long); + message.coin_denom = reader.string(); continue; case 2: if (tag !== 16) { break; } - message.min_funding_amount_per_bundle = longToString(reader.uint64() as Long); + message.coin_decimals = reader.uint32(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.min_funding_multiple = longToString(reader.uint64() as Long); + message.min_funding_amount = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.min_funding_amount_per_bundle = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.coin_weight = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -73,24 +134,111 @@ export const Params = { return message; }, - fromJSON(object: any): Params { + fromJSON(object: any): WhitelistCoinEntry { return { - min_funding_amount: isSet(object.min_funding_amount) ? globalThis.String(object.min_funding_amount) : "0", + coin_denom: isSet(object.coin_denom) ? globalThis.String(object.coin_denom) : "", + coin_decimals: isSet(object.coin_decimals) ? globalThis.Number(object.coin_decimals) : 0, + min_funding_amount: isSet(object.min_funding_amount) ? globalThis.String(object.min_funding_amount) : "", min_funding_amount_per_bundle: isSet(object.min_funding_amount_per_bundle) ? globalThis.String(object.min_funding_amount_per_bundle) - : "0", - min_funding_multiple: isSet(object.min_funding_multiple) ? globalThis.String(object.min_funding_multiple) : "0", + : "", + coin_weight: isSet(object.coin_weight) ? globalThis.String(object.coin_weight) : "", }; }, - toJSON(message: Params): unknown { + toJSON(message: WhitelistCoinEntry): unknown { const obj: any = {}; - if (message.min_funding_amount !== "0") { + if (message.coin_denom !== "") { + obj.coin_denom = message.coin_denom; + } + if (message.coin_decimals !== 0) { + obj.coin_decimals = Math.round(message.coin_decimals); + } + if (message.min_funding_amount !== "") { obj.min_funding_amount = message.min_funding_amount; } - if (message.min_funding_amount_per_bundle !== "0") { + if (message.min_funding_amount_per_bundle !== "") { obj.min_funding_amount_per_bundle = message.min_funding_amount_per_bundle; } + if (message.coin_weight !== "") { + obj.coin_weight = message.coin_weight; + } + return obj; + }, + + create, I>>(base?: I): WhitelistCoinEntry { + return WhitelistCoinEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): WhitelistCoinEntry { + const message = createBaseWhitelistCoinEntry(); + message.coin_denom = object.coin_denom ?? ""; + message.coin_decimals = object.coin_decimals ?? 0; + message.min_funding_amount = object.min_funding_amount ?? ""; + message.min_funding_amount_per_bundle = object.min_funding_amount_per_bundle ?? ""; + message.coin_weight = object.coin_weight ?? ""; + return message; + }, +}; + +function createBaseParams(): Params { + return { coin_whitelist: [], min_funding_multiple: "0" }; +} + +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.coin_whitelist) { + WhitelistCoinEntry.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.min_funding_multiple !== "0") { + writer.uint32(16).uint64(message.min_funding_multiple); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseParams(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.coin_whitelist.push(WhitelistCoinEntry.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.min_funding_multiple = longToString(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Params { + return { + coin_whitelist: globalThis.Array.isArray(object?.coin_whitelist) + ? object.coin_whitelist.map((e: any) => WhitelistCoinEntry.fromJSON(e)) + : [], + min_funding_multiple: isSet(object.min_funding_multiple) ? globalThis.String(object.min_funding_multiple) : "0", + }; + }, + + toJSON(message: Params): unknown { + const obj: any = {}; + if (message.coin_whitelist?.length) { + obj.coin_whitelist = message.coin_whitelist.map((e) => WhitelistCoinEntry.toJSON(e)); + } if (message.min_funding_multiple !== "0") { obj.min_funding_multiple = message.min_funding_multiple; } @@ -102,8 +250,7 @@ export const Params = { }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.min_funding_amount = object.min_funding_amount ?? "0"; - message.min_funding_amount_per_bundle = object.min_funding_amount_per_bundle ?? "0"; + message.coin_whitelist = object.coin_whitelist?.map((e) => WhitelistCoinEntry.fromPartial(e)) || []; message.min_funding_multiple = object.min_funding_multiple ?? "0"; return message; }, diff --git a/common/types/src/client/kyve/funders/v1beta1/query.ts b/common/types/src/client/kyve/funders/v1beta1/query.ts index 7c6d4bbc..0d1319bc 100644 --- a/common/types/src/client/kyve/funders/v1beta1/query.ts +++ b/common/types/src/client/kyve/funders/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/funders/v1beta1/tx.ts b/common/types/src/client/kyve/funders/v1beta1/tx.ts index 320d9934..9ed8ce6a 100644 --- a/common/types/src/client/kyve/funders/v1beta1/tx.ts +++ b/common/types/src/client/kyve/funders/v1beta1/tx.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.funders.v1beta1"; @@ -46,14 +53,17 @@ export interface MsgUpdateFunderResponse { /** MsgFundPool defines a SDK message for funding a pool. */ export interface MsgFundPool { - /** creator ... */ + /** creator is the funder of the pool */ creator: string; - /** id ... */ + /** pool_id is the identifier of the pool */ pool_id: string; - /** amount is the total amount available for distribution */ - amount: string; - /** amount_per_bundle defines the amount of tokens that are distributed per submitted bundle */ - amount_per_bundle: string; + /** amounts is a list of coins the creator wants to fund */ + amounts: Coin[]; + /** + * amounts_per_bundle is a list of coins the creator wants to distribute + * per finalized bundle + */ + amounts_per_bundle: Coin[]; } /** MsgFundPoolResponse defines the Msg/DefundPool response type. */ @@ -62,12 +72,12 @@ export interface MsgFundPoolResponse { /** MsgDefundPool defines a SDK message for defunding a pool. */ export interface MsgDefundPool { - /** creator ... */ + /** creator is the funder of the pool who wants to defund now */ creator: string; - /** id ... */ + /** pool_id is the identifier of the pool */ pool_id: string; - /** amount ... */ - amount: string; + /** amounts is a list of coins the creator wants to defund from the pool */ + amounts: Coin[]; } /** MsgDefundPoolResponse defines the Msg/DefundPool response type. */ @@ -441,7 +451,7 @@ export const MsgUpdateFunderResponse = { }; function createBaseMsgFundPool(): MsgFundPool { - return { creator: "", pool_id: "0", amount: "0", amount_per_bundle: "0" }; + return { creator: "", pool_id: "0", amounts: [], amounts_per_bundle: [] }; } export const MsgFundPool = { @@ -452,11 +462,11 @@ export const MsgFundPool = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } return writer; }, @@ -483,18 +493,18 @@ export const MsgFundPool = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -509,8 +519,10 @@ export const MsgFundPool = { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -522,11 +534,11 @@ export const MsgFundPool = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } return obj; }, @@ -538,8 +550,8 @@ export const MsgFundPool = { const message = createBaseMsgFundPool(); message.creator = object.creator ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -588,7 +600,7 @@ export const MsgFundPoolResponse = { }; function createBaseMsgDefundPool(): MsgDefundPool { - return { creator: "", pool_id: "0", amount: "0" }; + return { creator: "", pool_id: "0", amounts: [] }; } export const MsgDefundPool = { @@ -599,8 +611,8 @@ export const MsgDefundPool = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, @@ -627,11 +639,11 @@ export const MsgDefundPool = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -646,7 +658,7 @@ export const MsgDefundPool = { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -658,8 +670,8 @@ export const MsgDefundPool = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } return obj; }, @@ -671,7 +683,7 @@ export const MsgDefundPool = { const message = createBaseMsgDefundPool(); message.creator = object.creator ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/client/kyve/global/module/module.ts b/common/types/src/client/kyve/global/module/module.ts new file mode 100644 index 00000000..94447ab1 --- /dev/null +++ b/common/types/src/client/kyve/global/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.global.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/global/v1beta1/events.ts b/common/types/src/client/kyve/global/v1beta1/events.ts index 0bdef677..cecb3965 100644 --- a/common/types/src/client/kyve/global/v1beta1/events.ts +++ b/common/types/src/client/kyve/global/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/events.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/client/kyve/global/v1beta1/genesis.ts b/common/types/src/client/kyve/global/v1beta1/genesis.ts index b71700a5..0209aa89 100644 --- a/common/types/src/client/kyve/global/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/global/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/client/kyve/global/v1beta1/global.ts b/common/types/src/client/kyve/global/v1beta1/global.ts index 2255ca35..3f6befde 100644 --- a/common/types/src/client/kyve/global/v1beta1/global.ts +++ b/common/types/src/client/kyve/global/v1beta1/global.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/global.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/global/v1beta1/query.ts b/common/types/src/client/kyve/global/v1beta1/query.ts index 21b07e42..5aa88f4a 100644 --- a/common/types/src/client/kyve/global/v1beta1/query.ts +++ b/common/types/src/client/kyve/global/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/client/kyve/global/v1beta1/tx.ts b/common/types/src/client/kyve/global/v1beta1/tx.ts index 054f931a..0170c465 100644 --- a/common/types/src/client/kyve/global/v1beta1/tx.ts +++ b/common/types/src/client/kyve/global/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/tx.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/pool/module/module.ts b/common/types/src/client/kyve/pool/module/module.ts new file mode 100644 index 00000000..8733c748 --- /dev/null +++ b/common/types/src/client/kyve/pool/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.pool.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/pool/v1beta1/events.ts b/common/types/src/client/kyve/pool/v1beta1/events.ts index 0335bbc4..41176232 100644 --- a/common/types/src/client/kyve/pool/v1beta1/events.ts +++ b/common/types/src/client/kyve/pool/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -79,6 +85,11 @@ export interface EventCreatePool { * get compressed with */ compression_id: number; + /** + * end_key is the last key before the pool should stop indexing, it is + * inclusive + */ + end_key: string; } /** @@ -303,13 +314,14 @@ function createBaseEventCreatePool(): EventCreatePool { config: "", start_key: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", version: "", binaries: "", storage_provider_id: 0, compression_id: 0, + end_key: "", }; } @@ -336,8 +348,8 @@ export const EventCreatePool = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -357,6 +369,9 @@ export const EventCreatePool = { if (message.compression_id !== 0) { writer.uint32(112).uint32(message.compression_id); } + if (message.end_key !== "") { + writer.uint32(122).string(message.end_key); + } return writer; }, @@ -417,11 +432,11 @@ export const EventCreatePool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -465,6 +480,13 @@ export const EventCreatePool = { message.compression_id = reader.uint32(); continue; + case 15: + if (tag !== 122) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -485,13 +507,14 @@ export const EventCreatePool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", version: isSet(object.version) ? globalThis.String(object.version) : "", binaries: isSet(object.binaries) ? globalThis.String(object.binaries) : "", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, compression_id: isSet(object.compression_id) ? globalThis.Number(object.compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -518,7 +541,7 @@ export const EventCreatePool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -539,6 +562,9 @@ export const EventCreatePool = { if (message.compression_id !== 0) { obj.compression_id = Math.round(message.compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -554,13 +580,14 @@ export const EventCreatePool = { message.config = object.config ?? ""; message.start_key = object.start_key ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.version = object.version ?? ""; message.binaries = object.binaries ?? ""; message.storage_provider_id = object.storage_provider_id ?? 0; message.compression_id = object.compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; @@ -924,7 +951,7 @@ function createBaseEventPoolUpdated(): EventPoolUpdated { logo: "", config: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", storage_provider_id: 0, @@ -955,8 +982,8 @@ export const EventPoolUpdated = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -1030,11 +1057,11 @@ export const EventPoolUpdated = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -1084,7 +1111,7 @@ export const EventPoolUpdated = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, @@ -1115,7 +1142,7 @@ export const EventPoolUpdated = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -1145,7 +1172,7 @@ export const EventPoolUpdated = { message.logo = object.logo ?? ""; message.config = object.config ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.storage_provider_id = object.storage_provider_id ?? 0; diff --git a/common/types/src/client/kyve/pool/v1beta1/genesis.ts b/common/types/src/client/kyve/pool/v1beta1/genesis.ts index 10b7383f..9c6e5893 100644 --- a/common/types/src/client/kyve/pool/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/pool/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/genesis.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/pool/v1beta1/params.ts b/common/types/src/client/kyve/pool/v1beta1/params.ts index 67eb92d7..8c995e04 100644 --- a/common/types/src/client/kyve/pool/v1beta1/params.ts +++ b/common/types/src/client/kyve/pool/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/params.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -9,10 +15,12 @@ export interface Params { protocol_inflation_share: string; /** pool_inflation_payout_rate ... */ pool_inflation_payout_rate: string; + /** max_voting_power_per_pool ... */ + max_voting_power_per_pool: string; } function createBaseParams(): Params { - return { protocol_inflation_share: "", pool_inflation_payout_rate: "" }; + return { protocol_inflation_share: "", pool_inflation_payout_rate: "", max_voting_power_per_pool: "" }; } export const Params = { @@ -23,6 +31,9 @@ export const Params = { if (message.pool_inflation_payout_rate !== "") { writer.uint32(18).string(message.pool_inflation_payout_rate); } + if (message.max_voting_power_per_pool !== "") { + writer.uint32(26).string(message.max_voting_power_per_pool); + } return writer; }, @@ -47,6 +58,13 @@ export const Params = { message.pool_inflation_payout_rate = reader.string(); continue; + case 3: + if (tag !== 26) { + break; + } + + message.max_voting_power_per_pool = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -64,6 +82,9 @@ export const Params = { pool_inflation_payout_rate: isSet(object.pool_inflation_payout_rate) ? globalThis.String(object.pool_inflation_payout_rate) : "", + max_voting_power_per_pool: isSet(object.max_voting_power_per_pool) + ? globalThis.String(object.max_voting_power_per_pool) + : "", }; }, @@ -75,6 +96,9 @@ export const Params = { if (message.pool_inflation_payout_rate !== "") { obj.pool_inflation_payout_rate = message.pool_inflation_payout_rate; } + if (message.max_voting_power_per_pool !== "") { + obj.max_voting_power_per_pool = message.max_voting_power_per_pool; + } return obj; }, @@ -85,6 +109,7 @@ export const Params = { const message = createBaseParams(); message.protocol_inflation_share = object.protocol_inflation_share ?? ""; message.pool_inflation_payout_rate = object.pool_inflation_payout_rate ?? ""; + message.max_voting_power_per_pool = object.max_voting_power_per_pool ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/pool/v1beta1/pool.ts b/common/types/src/client/kyve/pool/v1beta1/pool.ts index 2d9c378b..cbcfbe10 100644 --- a/common/types/src/client/kyve/pool/v1beta1/pool.ts +++ b/common/types/src/client/kyve/pool/v1beta1/pool.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/pool.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -42,6 +48,11 @@ export enum PoolStatus { * has more than 50% voting power and that the pool is halted */ POOL_STATUS_VOTING_POWER_TOO_HIGH = 6, + /** + * POOL_STATUS_END_KEY_REACHED - POOL_STATUS_END_KEY_REACHED indicates, that the end key has been + * reached and that the pool is halted + */ + POOL_STATUS_END_KEY_REACHED = 7, UNRECOGNIZED = -1, } @@ -68,6 +79,9 @@ export function poolStatusFromJSON(object: any): PoolStatus { case 6: case "POOL_STATUS_VOTING_POWER_TOO_HIGH": return PoolStatus.POOL_STATUS_VOTING_POWER_TOO_HIGH; + case 7: + case "POOL_STATUS_END_KEY_REACHED": + return PoolStatus.POOL_STATUS_END_KEY_REACHED; case -1: case "UNRECOGNIZED": default: @@ -91,6 +105,8 @@ export function poolStatusToJSON(object: PoolStatus): string { return "POOL_STATUS_UPGRADING"; case PoolStatus.POOL_STATUS_VOTING_POWER_TOO_HIGH: return "POOL_STATUS_VOTING_POWER_TOO_HIGH"; + case PoolStatus.POOL_STATUS_END_KEY_REACHED: + return "POOL_STATUS_END_KEY_REACHED"; case PoolStatus.UNRECOGNIZED: default: return "UNRECOGNIZED"; @@ -182,6 +198,11 @@ export interface Pool { current_storage_provider_id: number; /** compression_id ... */ current_compression_id: number; + /** + * end_key is the last key before the pool should stop indexing, it is + * inclusive + */ + end_key: string; } function createBaseProtocol(): Protocol { @@ -390,7 +411,7 @@ function createBasePool(): Pool { current_index: "0", total_bundles: "0", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", disabled: false, @@ -398,6 +419,7 @@ function createBasePool(): Pool { upgrade_plan: undefined, current_storage_provider_id: 0, current_compression_id: 0, + end_key: "", }; } @@ -436,8 +458,8 @@ export const Pool = { if (message.upload_interval !== "0") { writer.uint32(88).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(96).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(98).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(104).uint64(message.min_delegation); @@ -445,7 +467,7 @@ export const Pool = { if (message.max_bundle_size !== "0") { writer.uint32(112).uint64(message.max_bundle_size); } - if (message.disabled === true) { + if (message.disabled !== false) { writer.uint32(120).bool(message.disabled); } if (message.protocol !== undefined) { @@ -460,6 +482,9 @@ export const Pool = { if (message.current_compression_id !== 0) { writer.uint32(152).uint32(message.current_compression_id); } + if (message.end_key !== "") { + writer.uint32(162).string(message.end_key); + } return writer; }, @@ -548,11 +573,11 @@ export const Pool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 12: - if (tag !== 96) { + if (tag !== 98) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 13: if (tag !== 104) { @@ -603,6 +628,13 @@ export const Pool = { message.current_compression_id = reader.uint32(); continue; + case 20: + if (tag !== 162) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -627,7 +659,7 @@ export const Pool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false, @@ -639,6 +671,7 @@ export const Pool = { current_compression_id: isSet(object.current_compression_id) ? globalThis.Number(object.current_compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -677,7 +710,7 @@ export const Pool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -686,7 +719,7 @@ export const Pool = { if (message.max_bundle_size !== "0") { obj.max_bundle_size = message.max_bundle_size; } - if (message.disabled === true) { + if (message.disabled !== false) { obj.disabled = message.disabled; } if (message.protocol !== undefined) { @@ -701,6 +734,9 @@ export const Pool = { if (message.current_compression_id !== 0) { obj.current_compression_id = Math.round(message.current_compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -720,7 +756,7 @@ export const Pool = { message.current_index = object.current_index ?? "0"; message.total_bundles = object.total_bundles ?? "0"; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.disabled = object.disabled ?? false; @@ -732,6 +768,7 @@ export const Pool = { : undefined; message.current_storage_provider_id = object.current_storage_provider_id ?? 0; message.current_compression_id = object.current_compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/pool/v1beta1/query.ts b/common/types/src/client/kyve/pool/v1beta1/query.ts index 07d65355..82da8405 100644 --- a/common/types/src/client/kyve/pool/v1beta1/query.ts +++ b/common/types/src/client/kyve/pool/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/pool/v1beta1/tx.ts b/common/types/src/client/kyve/pool/v1beta1/tx.ts index 427b58fa..dd808ef7 100644 --- a/common/types/src/client/kyve/pool/v1beta1/tx.ts +++ b/common/types/src/client/kyve/pool/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -34,6 +40,8 @@ export interface MsgCreatePool { storage_provider_id: number; /** compression_id ... */ compression_id: number; + /** end_key ... */ + end_key: string; } /** MsgCreatePoolResponse defines the Msg/CreatePool response type. */ @@ -131,13 +139,14 @@ function createBaseMsgCreatePool(): MsgCreatePool { config: "", start_key: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", version: "", binaries: "", storage_provider_id: 0, compression_id: 0, + end_key: "", }; } @@ -164,8 +173,8 @@ export const MsgCreatePool = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -185,6 +194,9 @@ export const MsgCreatePool = { if (message.compression_id !== 0) { writer.uint32(112).uint32(message.compression_id); } + if (message.end_key !== "") { + writer.uint32(122).string(message.end_key); + } return writer; }, @@ -245,11 +257,11 @@ export const MsgCreatePool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -293,6 +305,13 @@ export const MsgCreatePool = { message.compression_id = reader.uint32(); continue; + case 15: + if (tag !== 122) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -313,13 +332,14 @@ export const MsgCreatePool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", version: isSet(object.version) ? globalThis.String(object.version) : "", binaries: isSet(object.binaries) ? globalThis.String(object.binaries) : "", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, compression_id: isSet(object.compression_id) ? globalThis.Number(object.compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -346,7 +366,7 @@ export const MsgCreatePool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -367,6 +387,9 @@ export const MsgCreatePool = { if (message.compression_id !== 0) { obj.compression_id = Math.round(message.compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -382,13 +405,14 @@ export const MsgCreatePool = { message.config = object.config ?? ""; message.start_key = object.start_key ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.version = object.version ?? ""; message.binaries = object.binaries ?? ""; message.storage_provider_id = object.storage_provider_id ?? 0; message.compression_id = object.compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/query/module/module.ts b/common/types/src/client/kyve/query/module/module.ts new file mode 100644 index 00000000..38ab6ab9 --- /dev/null +++ b/common/types/src/client/kyve/query/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.query.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/query/v1beta1/account.ts b/common/types/src/client/kyve/query/v1beta1/account.ts index b58d92db..87e2b5be 100644 --- a/common/types/src/client/kyve/query/v1beta1/account.ts +++ b/common/types/src/client/kyve/query/v1beta1/account.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/account.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { BasicPool, FullStaker } from "./query"; export const protobufPackage = "kyve.query.v1beta1"; @@ -18,16 +25,16 @@ export interface QueryAccountAssetsResponse { balance: string; /** protocol_staking ... */ protocol_self_delegation: string; - /** protocol_staking_unbonding */ + /** protocol_staking_unbonding ... */ protocol_self_delegation_unbonding: string; /** protocol_delegation ... */ protocol_delegation: string; - /** protocol_delegation_unbonding */ + /** protocol_delegation_unbonding ... */ protocol_delegation_unbonding: string; /** protocol_rewards ... */ - protocol_rewards: string; + protocol_rewards: Coin[]; /** protocol_funding ... */ - protocol_funding: string; + protocol_funding: Coin[]; } /** QueryAccountFundedListRequest ... */ @@ -72,8 +79,8 @@ export interface QueryAccountFundedListResponse { /** Funded ... */ export interface Funded { - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: Coin[]; /** pool ... */ pool?: BasicPool | undefined; } @@ -164,8 +171,8 @@ function createBaseQueryAccountAssetsResponse(): QueryAccountAssetsResponse { protocol_self_delegation_unbonding: "0", protocol_delegation: "0", protocol_delegation_unbonding: "0", - protocol_rewards: "0", - protocol_funding: "0", + protocol_rewards: [], + protocol_funding: [], }; } @@ -186,11 +193,11 @@ export const QueryAccountAssetsResponse = { if (message.protocol_delegation_unbonding !== "0") { writer.uint32(40).uint64(message.protocol_delegation_unbonding); } - if (message.protocol_rewards !== "0") { - writer.uint32(48).uint64(message.protocol_rewards); + for (const v of message.protocol_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } - if (message.protocol_funding !== "0") { - writer.uint32(56).uint64(message.protocol_funding); + for (const v of message.protocol_funding) { + Coin.encode(v!, writer.uint32(58).fork()).ldelim(); } return writer; }, @@ -238,18 +245,18 @@ export const QueryAccountAssetsResponse = { message.protocol_delegation_unbonding = longToString(reader.uint64() as Long); continue; case 6: - if (tag !== 48) { + if (tag !== 50) { break; } - message.protocol_rewards = longToString(reader.uint64() as Long); + message.protocol_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 7: - if (tag !== 56) { + if (tag !== 58) { break; } - message.protocol_funding = longToString(reader.uint64() as Long); + message.protocol_funding.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -273,8 +280,12 @@ export const QueryAccountAssetsResponse = { protocol_delegation_unbonding: isSet(object.protocol_delegation_unbonding) ? globalThis.String(object.protocol_delegation_unbonding) : "0", - protocol_rewards: isSet(object.protocol_rewards) ? globalThis.String(object.protocol_rewards) : "0", - protocol_funding: isSet(object.protocol_funding) ? globalThis.String(object.protocol_funding) : "0", + protocol_rewards: globalThis.Array.isArray(object?.protocol_rewards) + ? object.protocol_rewards.map((e: any) => Coin.fromJSON(e)) + : [], + protocol_funding: globalThis.Array.isArray(object?.protocol_funding) + ? object.protocol_funding.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -295,11 +306,11 @@ export const QueryAccountAssetsResponse = { if (message.protocol_delegation_unbonding !== "0") { obj.protocol_delegation_unbonding = message.protocol_delegation_unbonding; } - if (message.protocol_rewards !== "0") { - obj.protocol_rewards = message.protocol_rewards; + if (message.protocol_rewards?.length) { + obj.protocol_rewards = message.protocol_rewards.map((e) => Coin.toJSON(e)); } - if (message.protocol_funding !== "0") { - obj.protocol_funding = message.protocol_funding; + if (message.protocol_funding?.length) { + obj.protocol_funding = message.protocol_funding.map((e) => Coin.toJSON(e)); } return obj; }, @@ -314,8 +325,8 @@ export const QueryAccountAssetsResponse = { message.protocol_self_delegation_unbonding = object.protocol_self_delegation_unbonding ?? "0"; message.protocol_delegation = object.protocol_delegation ?? "0"; message.protocol_delegation_unbonding = object.protocol_delegation_unbonding ?? "0"; - message.protocol_rewards = object.protocol_rewards ?? "0"; - message.protocol_funding = object.protocol_funding ?? "0"; + message.protocol_rewards = object.protocol_rewards?.map((e) => Coin.fromPartial(e)) || []; + message.protocol_funding = object.protocol_funding?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -694,13 +705,13 @@ export const QueryAccountFundedListResponse = { }; function createBaseFunded(): Funded { - return { amount: "0", pool: undefined }; + return { amounts: [], pool: undefined }; } export const Funded = { encode(message: Funded, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.amount !== "0") { - writer.uint32(8).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } if (message.pool !== undefined) { BasicPool.encode(message.pool, writer.uint32(18).fork()).ldelim(); @@ -715,12 +726,12 @@ export const Funded = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 8) { + case 3: + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -740,15 +751,15 @@ export const Funded = { fromJSON(object: any): Funded { return { - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], pool: isSet(object.pool) ? BasicPool.fromJSON(object.pool) : undefined, }; }, toJSON(message: Funded): unknown { const obj: any = {}; - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } if (message.pool !== undefined) { obj.pool = BasicPool.toJSON(message.pool); @@ -761,7 +772,7 @@ export const Funded = { }, fromPartial, I>>(object: I): Funded { const message = createBaseFunded(); - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; message.pool = (object.pool !== undefined && object.pool !== null) ? BasicPool.fromPartial(object.pool) : undefined; return message; }, diff --git a/common/types/src/client/kyve/query/v1beta1/bundles.ts b/common/types/src/client/kyve/query/v1beta1/bundles.ts index bce7c561..0ae1c2dc 100644 --- a/common/types/src/client/kyve/query/v1beta1/bundles.ts +++ b/common/types/src/client/kyve/query/v1beta1/bundles.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/bundles.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -94,8 +100,39 @@ export interface QueryFinalizedBundleRequest { /** QueryFinalizedBundleResponse is the response type for the Query/Staker RPC method. */ export interface QueryFinalizedBundleResponse { - /** finalized_bundles ... */ - finalized_bundles?: FinalizedBundle | undefined; + /** pool_id in which the bundle was created */ + pool_id: string; + /** id is is integrated with each valid bundle produced. */ + id: string; + /** storage_id is the id with which the data can be retrieved from the configured data provider */ + storage_id: string; + /** uploader is the address of the staker who submitted this bundle */ + uploader: string; + /** from_index is the index from where the bundle starts (inclusive) */ + from_index: string; + /** to_index is the index to which the bundle goes (exclusive) */ + to_index: string; + /** from_key is the key of the first data item in the bundle proposal */ + from_key: string; + /** to_key the key of the last data item in the bundle */ + to_key: string; + /** bundle_summary is a summary of the bundle. */ + bundle_summary: string; + /** data_hash is a sha256 hash of the uploaded data. */ + data_hash: string; + /** finalized_at contains details of the block that finalized this bundle. */ + finalized_at?: + | FinalizedAt + | undefined; + /** storage_provider_id the id of the storage provider where the bundle is stored */ + storage_provider_id: string; + /** compression_id the id of the compression type with which the data was compressed */ + compression_id: string; + /** + * stake_security defines the amount of stake which was present in the pool during the finalization of the bundle. + * This field was added in schema version 2. Bundles finalized before that return `null`. + */ + stake_security?: StakeSecurity | undefined; } /** QueryCurrentVoteStatusRequest is the request type for the Query/Staker RPC method. */ @@ -839,13 +876,67 @@ export const QueryFinalizedBundleRequest = { }; function createBaseQueryFinalizedBundleResponse(): QueryFinalizedBundleResponse { - return { finalized_bundles: undefined }; + return { + pool_id: "0", + id: "0", + storage_id: "", + uploader: "", + from_index: "0", + to_index: "0", + from_key: "", + to_key: "", + bundle_summary: "", + data_hash: "", + finalized_at: undefined, + storage_provider_id: "0", + compression_id: "0", + stake_security: undefined, + }; } export const QueryFinalizedBundleResponse = { encode(message: QueryFinalizedBundleResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.finalized_bundles !== undefined) { - FinalizedBundle.encode(message.finalized_bundles, writer.uint32(10).fork()).ldelim(); + if (message.pool_id !== "0") { + writer.uint32(8).uint64(message.pool_id); + } + if (message.id !== "0") { + writer.uint32(16).uint64(message.id); + } + if (message.storage_id !== "") { + writer.uint32(26).string(message.storage_id); + } + if (message.uploader !== "") { + writer.uint32(34).string(message.uploader); + } + if (message.from_index !== "0") { + writer.uint32(40).uint64(message.from_index); + } + if (message.to_index !== "0") { + writer.uint32(48).uint64(message.to_index); + } + if (message.from_key !== "") { + writer.uint32(90).string(message.from_key); + } + if (message.to_key !== "") { + writer.uint32(58).string(message.to_key); + } + if (message.bundle_summary !== "") { + writer.uint32(66).string(message.bundle_summary); + } + if (message.data_hash !== "") { + writer.uint32(74).string(message.data_hash); + } + if (message.finalized_at !== undefined) { + FinalizedAt.encode(message.finalized_at, writer.uint32(82).fork()).ldelim(); + } + if (message.storage_provider_id !== "0") { + writer.uint32(96).uint64(message.storage_provider_id); + } + if (message.compression_id !== "0") { + writer.uint32(104).uint64(message.compression_id); + } + if (message.stake_security !== undefined) { + StakeSecurity.encode(message.stake_security, writer.uint32(114).fork()).ldelim(); } return writer; }, @@ -858,11 +949,102 @@ export const QueryFinalizedBundleResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 10) { + if (tag !== 8) { + break; + } + + message.pool_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.id = longToString(reader.uint64() as Long); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.storage_id = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.uploader = reader.string(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.from_index = longToString(reader.uint64() as Long); + continue; + case 6: + if (tag !== 48) { break; } - message.finalized_bundles = FinalizedBundle.decode(reader, reader.uint32()); + message.to_index = longToString(reader.uint64() as Long); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.from_key = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.to_key = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.bundle_summary = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.data_hash = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.finalized_at = FinalizedAt.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 96) { + break; + } + + message.storage_provider_id = longToString(reader.uint64() as Long); + continue; + case 13: + if (tag !== 104) { + break; + } + + message.compression_id = longToString(reader.uint64() as Long); + continue; + case 14: + if (tag !== 114) { + break; + } + + message.stake_security = StakeSecurity.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -875,16 +1057,66 @@ export const QueryFinalizedBundleResponse = { fromJSON(object: any): QueryFinalizedBundleResponse { return { - finalized_bundles: isSet(object.finalized_bundles) - ? FinalizedBundle.fromJSON(object.finalized_bundles) - : undefined, + pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", + id: isSet(object.id) ? globalThis.String(object.id) : "0", + storage_id: isSet(object.storage_id) ? globalThis.String(object.storage_id) : "", + uploader: isSet(object.uploader) ? globalThis.String(object.uploader) : "", + from_index: isSet(object.from_index) ? globalThis.String(object.from_index) : "0", + to_index: isSet(object.to_index) ? globalThis.String(object.to_index) : "0", + from_key: isSet(object.from_key) ? globalThis.String(object.from_key) : "", + to_key: isSet(object.to_key) ? globalThis.String(object.to_key) : "", + bundle_summary: isSet(object.bundle_summary) ? globalThis.String(object.bundle_summary) : "", + data_hash: isSet(object.data_hash) ? globalThis.String(object.data_hash) : "", + finalized_at: isSet(object.finalized_at) ? FinalizedAt.fromJSON(object.finalized_at) : undefined, + storage_provider_id: isSet(object.storage_provider_id) ? globalThis.String(object.storage_provider_id) : "0", + compression_id: isSet(object.compression_id) ? globalThis.String(object.compression_id) : "0", + stake_security: isSet(object.stake_security) ? StakeSecurity.fromJSON(object.stake_security) : undefined, }; }, toJSON(message: QueryFinalizedBundleResponse): unknown { const obj: any = {}; - if (message.finalized_bundles !== undefined) { - obj.finalized_bundles = FinalizedBundle.toJSON(message.finalized_bundles); + if (message.pool_id !== "0") { + obj.pool_id = message.pool_id; + } + if (message.id !== "0") { + obj.id = message.id; + } + if (message.storage_id !== "") { + obj.storage_id = message.storage_id; + } + if (message.uploader !== "") { + obj.uploader = message.uploader; + } + if (message.from_index !== "0") { + obj.from_index = message.from_index; + } + if (message.to_index !== "0") { + obj.to_index = message.to_index; + } + if (message.from_key !== "") { + obj.from_key = message.from_key; + } + if (message.to_key !== "") { + obj.to_key = message.to_key; + } + if (message.bundle_summary !== "") { + obj.bundle_summary = message.bundle_summary; + } + if (message.data_hash !== "") { + obj.data_hash = message.data_hash; + } + if (message.finalized_at !== undefined) { + obj.finalized_at = FinalizedAt.toJSON(message.finalized_at); + } + if (message.storage_provider_id !== "0") { + obj.storage_provider_id = message.storage_provider_id; + } + if (message.compression_id !== "0") { + obj.compression_id = message.compression_id; + } + if (message.stake_security !== undefined) { + obj.stake_security = StakeSecurity.toJSON(message.stake_security); } return obj; }, @@ -894,8 +1126,23 @@ export const QueryFinalizedBundleResponse = { }, fromPartial, I>>(object: I): QueryFinalizedBundleResponse { const message = createBaseQueryFinalizedBundleResponse(); - message.finalized_bundles = (object.finalized_bundles !== undefined && object.finalized_bundles !== null) - ? FinalizedBundle.fromPartial(object.finalized_bundles) + message.pool_id = object.pool_id ?? "0"; + message.id = object.id ?? "0"; + message.storage_id = object.storage_id ?? ""; + message.uploader = object.uploader ?? ""; + message.from_index = object.from_index ?? "0"; + message.to_index = object.to_index ?? "0"; + message.from_key = object.from_key ?? ""; + message.to_key = object.to_key ?? ""; + message.bundle_summary = object.bundle_summary ?? ""; + message.data_hash = object.data_hash ?? ""; + message.finalized_at = (object.finalized_at !== undefined && object.finalized_at !== null) + ? FinalizedAt.fromPartial(object.finalized_at) + : undefined; + message.storage_provider_id = object.storage_provider_id ?? "0"; + message.compression_id = object.compression_id ?? "0"; + message.stake_security = (object.stake_security !== undefined && object.stake_security !== null) + ? StakeSecurity.fromPartial(object.stake_security) : undefined; return message; }, @@ -1146,7 +1393,7 @@ function createBaseQueryCanValidateResponse(): QueryCanValidateResponse { export const QueryCanValidateResponse = { encode(message: QueryCanValidateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1194,7 +1441,7 @@ export const QueryCanValidateResponse = { toJSON(message: QueryCanValidateResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1324,7 +1571,7 @@ function createBaseQueryCanProposeResponse(): QueryCanProposeResponse { export const QueryCanProposeResponse = { encode(message: QueryCanProposeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1372,7 +1619,7 @@ export const QueryCanProposeResponse = { toJSON(message: QueryCanProposeResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1502,7 +1749,7 @@ function createBaseQueryCanVoteResponse(): QueryCanVoteResponse { export const QueryCanVoteResponse = { encode(message: QueryCanVoteResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1550,7 +1797,7 @@ export const QueryCanVoteResponse = { toJSON(message: QueryCanVoteResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1575,7 +1822,7 @@ export interface QueryBundles { /** FinalizedBundles ... */ FinalizedBundlesQuery(request: QueryFinalizedBundlesRequest): Promise; /** FinalizedBundle ... */ - FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise; + FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise; /** CurrentVoteStatus ... */ CurrentVoteStatus(request: QueryCurrentVoteStatusRequest): Promise; /** CanValidate ... */ @@ -1606,10 +1853,10 @@ export class QueryBundlesClientImpl implements QueryBundles { return promise.then((data) => QueryFinalizedBundlesResponse.decode(_m0.Reader.create(data))); } - FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise { + FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise { const data = QueryFinalizedBundleRequest.encode(request).finish(); const promise = this.rpc.request(this.service, "FinalizedBundleQuery", data); - return promise.then((data) => FinalizedBundle.decode(_m0.Reader.create(data))); + return promise.then((data) => QueryFinalizedBundleResponse.decode(_m0.Reader.create(data))); } CurrentVoteStatus(request: QueryCurrentVoteStatusRequest): Promise { diff --git a/common/types/src/client/kyve/query/v1beta1/delegation.ts b/common/types/src/client/kyve/query/v1beta1/delegation.ts index 853a9025..39e5fe44 100644 --- a/common/types/src/client/kyve/query/v1beta1/delegation.ts +++ b/common/types/src/client/kyve/query/v1beta1/delegation.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/delegation.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { FullStaker } from "./query"; export const protobufPackage = "kyve.query.v1beta1"; @@ -24,8 +31,8 @@ export interface QueryDelegatorResponse { export interface StakerDelegatorResponse { /** delegator ... */ delegator: string; - /** current_reward ... */ - current_reward: string; + /** current_rewards ... */ + current_rewards: Coin[]; /** delegation_amount ... */ delegation_amount: string; /** staker ... */ @@ -80,8 +87,8 @@ export interface DelegationForStakerResponse { staker?: | FullStaker | undefined; - /** current_reward ... */ - current_reward: string; + /** current_rewards ... */ + current_rewards: Coin[]; /** delegation_amount ... */ delegation_amount: string; } @@ -220,7 +227,7 @@ export const QueryDelegatorResponse = { }; function createBaseStakerDelegatorResponse(): StakerDelegatorResponse { - return { delegator: "", current_reward: "0", delegation_amount: "0", staker: "" }; + return { delegator: "", current_rewards: [], delegation_amount: "0", staker: "" }; } export const StakerDelegatorResponse = { @@ -228,8 +235,8 @@ export const StakerDelegatorResponse = { if (message.delegator !== "") { writer.uint32(10).string(message.delegator); } - if (message.current_reward !== "0") { - writer.uint32(16).uint64(message.current_reward); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } if (message.delegation_amount !== "0") { writer.uint32(24).uint64(message.delegation_amount); @@ -254,12 +261,12 @@ export const StakerDelegatorResponse = { message.delegator = reader.string(); continue; - case 2: - if (tag !== 16) { + case 6: + if (tag !== 50) { break; } - message.current_reward = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -287,7 +294,9 @@ export const StakerDelegatorResponse = { fromJSON(object: any): StakerDelegatorResponse { return { delegator: isSet(object.delegator) ? globalThis.String(object.delegator) : "", - current_reward: isSet(object.current_reward) ? globalThis.String(object.current_reward) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], delegation_amount: isSet(object.delegation_amount) ? globalThis.String(object.delegation_amount) : "0", staker: isSet(object.staker) ? globalThis.String(object.staker) : "", }; @@ -298,8 +307,8 @@ export const StakerDelegatorResponse = { if (message.delegator !== "") { obj.delegator = message.delegator; } - if (message.current_reward !== "0") { - obj.current_reward = message.current_reward; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.delegation_amount !== "0") { obj.delegation_amount = message.delegation_amount; @@ -316,7 +325,7 @@ export const StakerDelegatorResponse = { fromPartial, I>>(object: I): StakerDelegatorResponse { const message = createBaseStakerDelegatorResponse(); message.delegator = object.delegator ?? ""; - message.current_reward = object.current_reward ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.delegation_amount = object.delegation_amount ?? "0"; message.staker = object.staker ?? ""; return message; @@ -687,7 +696,7 @@ export const QueryStakersByDelegatorResponse = { }; function createBaseDelegationForStakerResponse(): DelegationForStakerResponse { - return { staker: undefined, current_reward: "0", delegation_amount: "0" }; + return { staker: undefined, current_rewards: [], delegation_amount: "0" }; } export const DelegationForStakerResponse = { @@ -695,8 +704,8 @@ export const DelegationForStakerResponse = { if (message.staker !== undefined) { FullStaker.encode(message.staker, writer.uint32(10).fork()).ldelim(); } - if (message.current_reward !== "0") { - writer.uint32(16).uint64(message.current_reward); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } if (message.delegation_amount !== "0") { writer.uint32(24).uint64(message.delegation_amount); @@ -718,12 +727,12 @@ export const DelegationForStakerResponse = { message.staker = FullStaker.decode(reader, reader.uint32()); continue; - case 2: - if (tag !== 16) { + case 6: + if (tag !== 50) { break; } - message.current_reward = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -744,7 +753,9 @@ export const DelegationForStakerResponse = { fromJSON(object: any): DelegationForStakerResponse { return { staker: isSet(object.staker) ? FullStaker.fromJSON(object.staker) : undefined, - current_reward: isSet(object.current_reward) ? globalThis.String(object.current_reward) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], delegation_amount: isSet(object.delegation_amount) ? globalThis.String(object.delegation_amount) : "0", }; }, @@ -754,8 +765,8 @@ export const DelegationForStakerResponse = { if (message.staker !== undefined) { obj.staker = FullStaker.toJSON(message.staker); } - if (message.current_reward !== "0") { - obj.current_reward = message.current_reward; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.delegation_amount !== "0") { obj.delegation_amount = message.delegation_amount; @@ -771,7 +782,7 @@ export const DelegationForStakerResponse = { message.staker = (object.staker !== undefined && object.staker !== null) ? FullStaker.fromPartial(object.staker) : undefined; - message.current_reward = object.current_reward ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.delegation_amount = object.delegation_amount ?? "0"; return message; }, diff --git a/common/types/src/client/kyve/query/v1beta1/funders.ts b/common/types/src/client/kyve/query/v1beta1/funders.ts index 50198337..43535cf9 100644 --- a/common/types/src/client/kyve/query/v1beta1/funders.ts +++ b/common/types/src/client/kyve/query/v1beta1/funders.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/funders.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.query.v1beta1"; @@ -69,27 +76,43 @@ export interface Funder { /** FundingStats ... */ export interface FundingStats { /** total_used_funds are the total funds that have been distributed by the funder. */ - total_used_funds: string; - /** total_allocated_funds are the total funds that have been allocated by the funder. They can either get distributed or refunded. */ - total_allocated_funds: string; + total_used_funds: Coin[]; + /** + * total_allocated_funds are the total funds that have been allocated by the funder. + * They can either get distributed or refunded. + */ + total_allocated_funds: Coin[]; /** total_amount_per_bundle is the total amount per bundle of all fundings of the funder. */ - total_amount_per_bundle: string; + total_amount_per_bundle: Coin[]; /** pools_funded are the ids of the pools that have been funded by the funder. */ pools_funded: string[]; + /** + * score is the result of all coins of the funder currently allocated times the coin weight + * specified in the params + */ + score: string; } /** Funding ... */ export interface Funding { - /** funder_address */ + /** funder_id is the id of the funder */ funder_address: string; - /** pool_id ... */ + /** pool_id is the id of the pool this funding is for */ pool_id: string; - /** amount ... */ - amount: string; - /** amount_per_bundle ... */ - amount_per_bundle: string; - /** total_funded ... */ - total_funded: string; + /** amounts is a list of coins the funder wants to fund the pool with */ + amounts: Coin[]; + /** + * amounts_per_bundle defines the amount of each coin that are distributed + * per finalized bundle + */ + amounts_per_bundle: Coin[]; + /** total_funded is the total amount of coins that the funder has funded */ + total_funded: Coin[]; + /** + * score is the result of all coins allocated to this pool times the coin weight specified + * by the params + */ + score: string; } /** QueryFundersRequest is the request type for the Query/Funders RPC method. */ @@ -326,25 +349,28 @@ export const Funder = { }; function createBaseFundingStats(): FundingStats { - return { total_used_funds: "0", total_allocated_funds: "0", total_amount_per_bundle: "0", pools_funded: [] }; + return { total_used_funds: [], total_allocated_funds: [], total_amount_per_bundle: [], pools_funded: [], score: "0" }; } export const FundingStats = { encode(message: FundingStats, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.total_used_funds !== "0") { - writer.uint32(8).uint64(message.total_used_funds); + for (const v of message.total_used_funds) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.total_allocated_funds !== "0") { - writer.uint32(16).uint64(message.total_allocated_funds); + for (const v of message.total_allocated_funds) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.total_amount_per_bundle !== "0") { - writer.uint32(24).uint64(message.total_amount_per_bundle); + for (const v of message.total_amount_per_bundle) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } writer.uint32(34).fork(); for (const v of message.pools_funded) { writer.uint64(v); } writer.ldelim(); + if (message.score !== "0") { + writer.uint32(40).uint64(message.score); + } return writer; }, @@ -356,25 +382,25 @@ export const FundingStats = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 8) { + if (tag !== 10) { break; } - message.total_used_funds = longToString(reader.uint64() as Long); + message.total_used_funds.push(Coin.decode(reader, reader.uint32())); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.total_allocated_funds = longToString(reader.uint64() as Long); + message.total_allocated_funds.push(Coin.decode(reader, reader.uint32())); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.total_amount_per_bundle = longToString(reader.uint64() as Long); + message.total_amount_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 4: if (tag === 32) { @@ -393,6 +419,13 @@ export const FundingStats = { } break; + case 5: + if (tag !== 40) { + break; + } + + message.score = longToString(reader.uint64() as Long); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -404,33 +437,39 @@ export const FundingStats = { fromJSON(object: any): FundingStats { return { - total_used_funds: isSet(object.total_used_funds) ? globalThis.String(object.total_used_funds) : "0", - total_allocated_funds: isSet(object.total_allocated_funds) - ? globalThis.String(object.total_allocated_funds) - : "0", - total_amount_per_bundle: isSet(object.total_amount_per_bundle) - ? globalThis.String(object.total_amount_per_bundle) - : "0", + total_used_funds: globalThis.Array.isArray(object?.total_used_funds) + ? object.total_used_funds.map((e: any) => Coin.fromJSON(e)) + : [], + total_allocated_funds: globalThis.Array.isArray(object?.total_allocated_funds) + ? object.total_allocated_funds.map((e: any) => Coin.fromJSON(e)) + : [], + total_amount_per_bundle: globalThis.Array.isArray(object?.total_amount_per_bundle) + ? object.total_amount_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], pools_funded: globalThis.Array.isArray(object?.pools_funded) ? object.pools_funded.map((e: any) => globalThis.String(e)) : [], + score: isSet(object.score) ? globalThis.String(object.score) : "0", }; }, toJSON(message: FundingStats): unknown { const obj: any = {}; - if (message.total_used_funds !== "0") { - obj.total_used_funds = message.total_used_funds; + if (message.total_used_funds?.length) { + obj.total_used_funds = message.total_used_funds.map((e) => Coin.toJSON(e)); } - if (message.total_allocated_funds !== "0") { - obj.total_allocated_funds = message.total_allocated_funds; + if (message.total_allocated_funds?.length) { + obj.total_allocated_funds = message.total_allocated_funds.map((e) => Coin.toJSON(e)); } - if (message.total_amount_per_bundle !== "0") { - obj.total_amount_per_bundle = message.total_amount_per_bundle; + if (message.total_amount_per_bundle?.length) { + obj.total_amount_per_bundle = message.total_amount_per_bundle.map((e) => Coin.toJSON(e)); } if (message.pools_funded?.length) { obj.pools_funded = message.pools_funded; } + if (message.score !== "0") { + obj.score = message.score; + } return obj; }, @@ -439,16 +478,17 @@ export const FundingStats = { }, fromPartial, I>>(object: I): FundingStats { const message = createBaseFundingStats(); - message.total_used_funds = object.total_used_funds ?? "0"; - message.total_allocated_funds = object.total_allocated_funds ?? "0"; - message.total_amount_per_bundle = object.total_amount_per_bundle ?? "0"; + message.total_used_funds = object.total_used_funds?.map((e) => Coin.fromPartial(e)) || []; + message.total_allocated_funds = object.total_allocated_funds?.map((e) => Coin.fromPartial(e)) || []; + message.total_amount_per_bundle = object.total_amount_per_bundle?.map((e) => Coin.fromPartial(e)) || []; message.pools_funded = object.pools_funded?.map((e) => e) || []; + message.score = object.score ?? "0"; return message; }, }; function createBaseFunding(): Funding { - return { funder_address: "", pool_id: "0", amount: "0", amount_per_bundle: "0", total_funded: "0" }; + return { funder_address: "", pool_id: "0", amounts: [], amounts_per_bundle: [], total_funded: [], score: "0" }; } export const Funding = { @@ -459,14 +499,17 @@ export const Funding = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.total_funded !== "0") { - writer.uint32(40).uint64(message.total_funded); + for (const v of message.total_funded) { + Coin.encode(v!, writer.uint32(42).fork()).ldelim(); + } + if (message.score !== "0") { + writer.uint32(48).uint64(message.score); } return writer; }, @@ -493,25 +536,32 @@ export const Funding = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.total_funded = longToString(reader.uint64() as Long); + message.total_funded.push(Coin.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.score = longToString(reader.uint64() as Long); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -526,9 +576,14 @@ export const Funding = { return { funder_address: isSet(object.funder_address) ? globalThis.String(object.funder_address) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", - total_funded: isSet(object.total_funded) ? globalThis.String(object.total_funded) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], + total_funded: globalThis.Array.isArray(object?.total_funded) + ? object.total_funded.map((e: any) => Coin.fromJSON(e)) + : [], + score: isSet(object.score) ? globalThis.String(object.score) : "0", }; }, @@ -540,14 +595,17 @@ export const Funding = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); + } + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.total_funded?.length) { + obj.total_funded = message.total_funded.map((e) => Coin.toJSON(e)); } - if (message.total_funded !== "0") { - obj.total_funded = message.total_funded; + if (message.score !== "0") { + obj.score = message.score; } return obj; }, @@ -559,9 +617,10 @@ export const Funding = { const message = createBaseFunding(); message.funder_address = object.funder_address ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; - message.total_funded = object.total_funded ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; + message.total_funded = object.total_funded?.map((e) => Coin.fromPartial(e)) || []; + message.score = object.score ?? "0"; return message; }, }; diff --git a/common/types/src/client/kyve/query/v1beta1/params.ts b/common/types/src/client/kyve/query/v1beta1/params.ts index e9655f6b..cdd2a5ec 100644 --- a/common/types/src/client/kyve/query/v1beta1/params.ts +++ b/common/types/src/client/kyve/query/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/params.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params as Params3 } from "../../../cosmos/gov/v1/gov"; diff --git a/common/types/src/client/kyve/query/v1beta1/pools.ts b/common/types/src/client/kyve/query/v1beta1/pools.ts index 41380e78..dd123737 100644 --- a/common/types/src/client/kyve/query/v1beta1/pools.ts +++ b/common/types/src/client/kyve/query/v1beta1/pools.ts @@ -1,8 +1,15 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/pools.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BundleProposal } from "../../bundles/v1beta1/bundles"; +import { Funding } from "../../funders/v1beta1/funders"; import { Pool, PoolStatus, poolStatusFromJSON, poolStatusToJSON } from "../../pool/v1beta1/pool"; export const protobufPackage = "kyve.query.v1beta1"; @@ -55,6 +62,8 @@ export interface PoolResponse { account: string; /** account_balance ... */ account_balance: string; + /** funders ... */ + fundings: Funding[]; } /** QueryPoolRequest is the request type for the Query/Pool RPC method. */ @@ -84,7 +93,7 @@ export const QueryPoolsRequest = { if (message.runtime !== "") { writer.uint32(26).string(message.runtime); } - if (message.disabled === true) { + if (message.disabled !== false) { writer.uint32(32).bool(message.disabled); } if (message.storage_provider_id !== 0) { @@ -165,7 +174,7 @@ export const QueryPoolsRequest = { if (message.runtime !== "") { obj.runtime = message.runtime; } - if (message.disabled === true) { + if (message.disabled !== false) { obj.disabled = message.disabled; } if (message.storage_provider_id !== 0) { @@ -277,6 +286,7 @@ function createBasePoolResponse(): PoolResponse { status: 0, account: "", account_balance: "0", + fundings: [], }; } @@ -309,6 +319,9 @@ export const PoolResponse = { if (message.account_balance !== "0") { writer.uint32(72).uint64(message.account_balance); } + for (const v of message.fundings) { + Funding.encode(v!, writer.uint32(82).fork()).ldelim(); + } return writer; }, @@ -382,6 +395,13 @@ export const PoolResponse = { message.account_balance = longToString(reader.uint64() as Long); continue; + case 10: + if (tag !== 82) { + break; + } + + message.fundings.push(Funding.decode(reader, reader.uint32())); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -404,6 +424,7 @@ export const PoolResponse = { status: isSet(object.status) ? poolStatusFromJSON(object.status) : 0, account: isSet(object.account) ? globalThis.String(object.account) : "", account_balance: isSet(object.account_balance) ? globalThis.String(object.account_balance) : "0", + fundings: globalThis.Array.isArray(object?.fundings) ? object.fundings.map((e: any) => Funding.fromJSON(e)) : [], }; }, @@ -436,6 +457,9 @@ export const PoolResponse = { if (message.account_balance !== "0") { obj.account_balance = message.account_balance; } + if (message.fundings?.length) { + obj.fundings = message.fundings.map((e) => Funding.toJSON(e)); + } return obj; }, @@ -455,6 +479,7 @@ export const PoolResponse = { message.status = object.status ?? 0; message.account = object.account ?? ""; message.account_balance = object.account_balance ?? "0"; + message.fundings = object.fundings?.map((e) => Funding.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/client/kyve/query/v1beta1/query.ts b/common/types/src/client/kyve/query/v1beta1/query.ts index 526e12ad..55fb94f7 100644 --- a/common/types/src/client/kyve/query/v1beta1/query.ts +++ b/common/types/src/client/kyve/query/v1beta1/query.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/query.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { PoolStatus, poolStatusFromJSON, poolStatusToJSON } from "../../pool/v1beta1/pool"; export const protobufPackage = "kyve.query.v1beta1"; @@ -29,7 +36,7 @@ export interface BasicPool { * total_funds of the pool. If the pool runs * out of funds no more bundles will be produced */ - total_funds: string; + total_funds: Coin[]; /** total_delegation of the pool */ total_delegation: string; /** @@ -110,8 +117,8 @@ export interface StakerMetadata { pending_commission_change?: | CommissionChangeEntry | undefined; - /** commission_rewards are the rewards in $KYVE earned through commission */ - commission_rewards: string; + /** commission_rewards are the rewards through commission and storage cost */ + commission_rewards: Coin[]; } /** @@ -173,9 +180,9 @@ function createBaseBasicPool(): BasicPool { name: "", runtime: "", logo: "", - inflation_share_weight: "0", + inflation_share_weight: "", upload_interval: "0", - total_funds: "0", + total_funds: [], total_delegation: "0", status: 0, }; @@ -195,14 +202,14 @@ export const BasicPool = { if (message.logo !== "") { writer.uint32(34).string(message.logo); } - if (message.inflation_share_weight !== "0") { - writer.uint32(40).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(42).string(message.inflation_share_weight); } if (message.upload_interval !== "0") { writer.uint32(48).uint64(message.upload_interval); } - if (message.total_funds !== "0") { - writer.uint32(56).uint64(message.total_funds); + for (const v of message.total_funds) { + Coin.encode(v!, writer.uint32(58).fork()).ldelim(); } if (message.total_delegation !== "0") { writer.uint32(64).uint64(message.total_delegation); @@ -249,11 +256,11 @@ export const BasicPool = { message.logo = reader.string(); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 6: if (tag !== 48) { @@ -263,11 +270,11 @@ export const BasicPool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 7: - if (tag !== 56) { + if (tag !== 58) { break; } - message.total_funds = longToString(reader.uint64() as Long); + message.total_funds.push(Coin.decode(reader, reader.uint32())); continue; case 8: if (tag !== 64) { @@ -300,9 +307,11 @@ export const BasicPool = { logo: isSet(object.logo) ? globalThis.String(object.logo) : "", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", - total_funds: isSet(object.total_funds) ? globalThis.String(object.total_funds) : "0", + total_funds: globalThis.Array.isArray(object?.total_funds) + ? object.total_funds.map((e: any) => Coin.fromJSON(e)) + : [], total_delegation: isSet(object.total_delegation) ? globalThis.String(object.total_delegation) : "0", status: isSet(object.status) ? poolStatusFromJSON(object.status) : 0, }; @@ -322,14 +331,14 @@ export const BasicPool = { if (message.logo !== "") { obj.logo = message.logo; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.total_funds !== "0") { - obj.total_funds = message.total_funds; + if (message.total_funds?.length) { + obj.total_funds = message.total_funds.map((e) => Coin.toJSON(e)); } if (message.total_delegation !== "0") { obj.total_delegation = message.total_delegation; @@ -349,9 +358,9 @@ export const BasicPool = { message.name = object.name ?? ""; message.runtime = object.runtime ?? ""; message.logo = object.logo ?? ""; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.total_funds = object.total_funds ?? "0"; + message.total_funds = object.total_funds?.map((e) => Coin.fromPartial(e)) || []; message.total_delegation = object.total_delegation ?? "0"; message.status = object.status ?? 0; return message; @@ -528,7 +537,7 @@ function createBaseStakerMetadata(): StakerMetadata { security_contact: "", details: "", pending_commission_change: undefined, - commission_rewards: "0", + commission_rewards: [], }; } @@ -555,8 +564,8 @@ export const StakerMetadata = { if (message.pending_commission_change !== undefined) { CommissionChangeEntry.encode(message.pending_commission_change, writer.uint32(58).fork()).ldelim(); } - if (message.commission_rewards !== "0") { - writer.uint32(64).uint64(message.commission_rewards); + for (const v of message.commission_rewards) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); } return writer; }, @@ -618,11 +627,11 @@ export const StakerMetadata = { message.pending_commission_change = CommissionChangeEntry.decode(reader, reader.uint32()); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.commission_rewards = longToString(reader.uint64() as Long); + message.commission_rewards.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -644,7 +653,9 @@ export const StakerMetadata = { pending_commission_change: isSet(object.pending_commission_change) ? CommissionChangeEntry.fromJSON(object.pending_commission_change) : undefined, - commission_rewards: isSet(object.commission_rewards) ? globalThis.String(object.commission_rewards) : "0", + commission_rewards: globalThis.Array.isArray(object?.commission_rewards) + ? object.commission_rewards.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -671,8 +682,8 @@ export const StakerMetadata = { if (message.pending_commission_change !== undefined) { obj.pending_commission_change = CommissionChangeEntry.toJSON(message.pending_commission_change); } - if (message.commission_rewards !== "0") { - obj.commission_rewards = message.commission_rewards; + if (message.commission_rewards?.length) { + obj.commission_rewards = message.commission_rewards.map((e) => Coin.toJSON(e)); } return obj; }, @@ -692,7 +703,7 @@ export const StakerMetadata = { (object.pending_commission_change !== undefined && object.pending_commission_change !== null) ? CommissionChangeEntry.fromPartial(object.pending_commission_change) : undefined; - message.commission_rewards = object.commission_rewards ?? "0"; + message.commission_rewards = object.commission_rewards?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -783,7 +794,7 @@ export const PoolMembership = { if (message.points !== "0") { writer.uint32(16).uint64(message.points); } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { writer.uint32(24).bool(message.is_leaving); } if (message.valaddress !== "") { @@ -864,7 +875,7 @@ export const PoolMembership = { if (message.points !== "0") { obj.points = message.points; } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { obj.is_leaving = message.is_leaving; } if (message.valaddress !== "") { diff --git a/common/types/src/client/kyve/query/v1beta1/stakers.ts b/common/types/src/client/kyve/query/v1beta1/stakers.ts index 658d5969..7c8b1158 100644 --- a/common/types/src/client/kyve/query/v1beta1/stakers.ts +++ b/common/types/src/client/kyve/query/v1beta1/stakers.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/stakers.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/stakers/module/module.ts b/common/types/src/client/kyve/stakers/module/module.ts new file mode 100644 index 00000000..8848d210 --- /dev/null +++ b/common/types/src/client/kyve/stakers/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.stakers.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/stakers/v1beta1/events.ts b/common/types/src/client/kyve/stakers/v1beta1/events.ts index 71eed8b1..e61d6df4 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/events.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -72,8 +78,8 @@ export interface EventUpdateCommission { export interface EventClaimCommissionRewards { /** staker is the account address of the protocol node. */ staker: string; - /** amount ... */ - amount: string; + /** amounts is the amount of the commission rewards claimed */ + amounts: string; } /** @@ -496,7 +502,7 @@ export const EventUpdateCommission = { }; function createBaseEventClaimCommissionRewards(): EventClaimCommissionRewards { - return { staker: "", amount: "0" }; + return { staker: "", amounts: "" }; } export const EventClaimCommissionRewards = { @@ -504,8 +510,8 @@ export const EventClaimCommissionRewards = { if (message.staker !== "") { writer.uint32(10).string(message.staker); } - if (message.amount !== "0") { - writer.uint32(16).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(18).string(message.amounts); } return writer; }, @@ -525,11 +531,11 @@ export const EventClaimCommissionRewards = { message.staker = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -543,7 +549,7 @@ export const EventClaimCommissionRewards = { fromJSON(object: any): EventClaimCommissionRewards { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -552,8 +558,8 @@ export const EventClaimCommissionRewards = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -564,7 +570,7 @@ export const EventClaimCommissionRewards = { fromPartial, I>>(object: I): EventClaimCommissionRewards { const message = createBaseEventClaimCommissionRewards(); message.staker = object.staker ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/client/kyve/stakers/v1beta1/genesis.ts b/common/types/src/client/kyve/stakers/v1beta1/genesis.ts index 43c09bab..c9eecdf9 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/stakers/v1beta1/params.ts b/common/types/src/client/kyve/stakers/v1beta1/params.ts index fdd4bcdc..15a53283 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/params.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/stakers/v1beta1/query.ts b/common/types/src/client/kyve/stakers/v1beta1/query.ts index 99186d74..3dc7c9b9 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/query.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/client/kyve/stakers/v1beta1/stakers.ts b/common/types/src/client/kyve/stakers/v1beta1/stakers.ts index 2ea1decc..258b0a80 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/stakers.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/stakers.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/stakers.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.stakers.v1beta1"; @@ -23,8 +30,8 @@ export interface Staker { security_contact: string; /** details are some additional notes the staker finds important */ details: string; - /** commission_rewards are the rewards in $KYVE earned through commission */ - commission_rewards: string; + /** commission_rewards are the rewards through commission and storage cost */ + commission_rewards: Coin[]; } /** @@ -128,7 +135,7 @@ function createBaseStaker(): Staker { identity: "", security_contact: "", details: "", - commission_rewards: "0", + commission_rewards: [], }; } @@ -155,8 +162,8 @@ export const Staker = { if (message.details !== "") { writer.uint32(58).string(message.details); } - if (message.commission_rewards !== "0") { - writer.uint32(64).uint64(message.commission_rewards); + for (const v of message.commission_rewards) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); } return writer; }, @@ -218,11 +225,11 @@ export const Staker = { message.details = reader.string(); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.commission_rewards = longToString(reader.uint64() as Long); + message.commission_rewards.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -242,7 +249,9 @@ export const Staker = { identity: isSet(object.identity) ? globalThis.String(object.identity) : "", security_contact: isSet(object.security_contact) ? globalThis.String(object.security_contact) : "", details: isSet(object.details) ? globalThis.String(object.details) : "", - commission_rewards: isSet(object.commission_rewards) ? globalThis.String(object.commission_rewards) : "0", + commission_rewards: globalThis.Array.isArray(object?.commission_rewards) + ? object.commission_rewards.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -269,8 +278,8 @@ export const Staker = { if (message.details !== "") { obj.details = message.details; } - if (message.commission_rewards !== "0") { - obj.commission_rewards = message.commission_rewards; + if (message.commission_rewards?.length) { + obj.commission_rewards = message.commission_rewards.map((e) => Coin.toJSON(e)); } return obj; }, @@ -287,7 +296,7 @@ export const Staker = { message.identity = object.identity ?? ""; message.security_contact = object.security_contact ?? ""; message.details = object.details ?? ""; - message.commission_rewards = object.commission_rewards ?? "0"; + message.commission_rewards = object.commission_rewards?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -310,7 +319,7 @@ export const Valaccount = { if (message.points !== "0") { writer.uint32(32).uint64(message.points); } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { writer.uint32(40).bool(message.is_leaving); } return writer; @@ -391,7 +400,7 @@ export const Valaccount = { if (message.points !== "0") { obj.points = message.points; } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { obj.is_leaving = message.is_leaving; } return obj; diff --git a/common/types/src/client/kyve/stakers/v1beta1/tx.ts b/common/types/src/client/kyve/stakers/v1beta1/tx.ts index c5e641ad..f7e98a4e 100644 --- a/common/types/src/client/kyve/stakers/v1beta1/tx.ts +++ b/common/types/src/client/kyve/stakers/v1beta1/tx.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.stakers.v1beta1"; @@ -57,8 +64,8 @@ export interface MsgUpdateCommissionResponse { export interface MsgClaimCommissionRewards { /** creator ... */ creator: string; - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: Coin[]; } /** MsgClaimCommissionRewardsResponse ... */ @@ -532,7 +539,7 @@ export const MsgUpdateCommissionResponse = { }; function createBaseMsgClaimCommissionRewards(): MsgClaimCommissionRewards { - return { creator: "", amount: "0" }; + return { creator: "", amounts: [] }; } export const MsgClaimCommissionRewards = { @@ -540,8 +547,8 @@ export const MsgClaimCommissionRewards = { if (message.creator !== "") { writer.uint32(10).string(message.creator); } - if (message.amount !== "0") { - writer.uint32(16).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -561,11 +568,11 @@ export const MsgClaimCommissionRewards = { message.creator = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -579,7 +586,7 @@ export const MsgClaimCommissionRewards = { fromJSON(object: any): MsgClaimCommissionRewards { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -588,8 +595,8 @@ export const MsgClaimCommissionRewards = { if (message.creator !== "") { obj.creator = message.creator; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } return obj; }, @@ -600,7 +607,7 @@ export const MsgClaimCommissionRewards = { fromPartial, I>>(object: I): MsgClaimCommissionRewards { const message = createBaseMsgClaimCommissionRewards(); message.creator = object.creator ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/client/kyve/team/module/module.ts b/common/types/src/client/kyve/team/module/module.ts new file mode 100644 index 00000000..f4c0c974 --- /dev/null +++ b/common/types/src/client/kyve/team/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.team.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/client/kyve/team/v1beta1/events.ts b/common/types/src/client/kyve/team/v1beta1/events.ts index 30dbe829..75994fac 100644 --- a/common/types/src/client/kyve/team/v1beta1/events.ts +++ b/common/types/src/client/kyve/team/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/team/v1beta1/genesis.ts b/common/types/src/client/kyve/team/v1beta1/genesis.ts index 7f61d5e0..3e2b74ce 100644 --- a/common/types/src/client/kyve/team/v1beta1/genesis.ts +++ b/common/types/src/client/kyve/team/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/genesis.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/team/v1beta1/query.ts b/common/types/src/client/kyve/team/v1beta1/query.ts index aac3427b..df9c4533 100644 --- a/common/types/src/client/kyve/team/v1beta1/query.ts +++ b/common/types/src/client/kyve/team/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/query.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/team/v1beta1/team.ts b/common/types/src/client/kyve/team/v1beta1/team.ts index 34e956ac..4e1ecf26 100644 --- a/common/types/src/client/kyve/team/v1beta1/team.ts +++ b/common/types/src/client/kyve/team/v1beta1/team.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/team.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/client/kyve/team/v1beta1/tx.ts b/common/types/src/client/kyve/team/v1beta1/tx.ts index cfc7ff57..19fd3bb6 100644 --- a/common/types/src/client/kyve/team/v1beta1/tx.ts +++ b/common/types/src/client/kyve/team/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/amino/amino.ts b/common/types/src/lcd/amino/amino.ts index 54af2e62..804a46c0 100644 --- a/common/types/src/lcd/amino/amino.ts +++ b/common/types/src/lcd/amino/amino.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: amino/amino.proto + /* eslint-disable */ export const protobufPackage = "amino"; diff --git a/common/types/src/lcd/cosmos/app/v1alpha1/module.ts b/common/types/src/lcd/cosmos/app/v1alpha1/module.ts new file mode 100644 index 00000000..49b4ccc5 --- /dev/null +++ b/common/types/src/lcd/cosmos/app/v1alpha1/module.ts @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/app/v1alpha1/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.app.v1alpha1"; + +/** ModuleDescriptor describes an app module. */ +export interface ModuleDescriptor { + /** + * go_import names the package that should be imported by an app to load the + * module in the runtime module registry. It is required to make debugging + * of configuration errors easier for users. + */ + go_import: string; + /** + * use_package refers to a protobuf package that this module + * uses and exposes to the world. In an app, only one module should "use" + * or own a single protobuf package. It is assumed that the module uses + * all of the .proto files in a single package. + */ + use_package: PackageReference[]; + /** + * can_migrate_from defines which module versions this module can migrate + * state from. The framework will check that one module version is able to + * migrate from a previous module version before attempting to update its + * config. It is assumed that modules can transitively migrate from earlier + * versions. For instance if v3 declares it can migrate from v2, and v2 + * declares it can migrate from v1, the framework knows how to migrate + * from v1 to v3, assuming all 3 module versions are registered at runtime. + */ + can_migrate_from: MigrateFromInfo[]; +} + +/** PackageReference is a reference to a protobuf package used by a module. */ +export interface PackageReference { + /** name is the fully-qualified name of the package. */ + name: string; + /** + * revision is the optional revision of the package that is being used. + * Protobuf packages used in Cosmos should generally have a major version + * as the last part of the package name, ex. foo.bar.baz.v1. + * The revision of a package can be thought of as the minor version of a + * package which has additional backwards compatible definitions that weren't + * present in a previous version. + * + * A package should indicate its revision with a source code comment + * above the package declaration in one of its files containing the + * text "Revision N" where N is an integer revision. All packages start + * at revision 0 the first time they are released in a module. + * + * When a new version of a module is released and items are added to existing + * .proto files, these definitions should contain comments of the form + * "Since: Revision N" where N is an integer revision. + * + * When the module runtime starts up, it will check the pinned proto + * image and panic if there are runtime protobuf definitions that are not + * in the pinned descriptor which do not have + * a "Since Revision N" comment or have a "Since Revision N" comment where + * N is <= to the revision specified here. This indicates that the protobuf + * files have been updated, but the pinned file descriptor hasn't. + * + * If there are items in the pinned file descriptor with a revision + * greater than the value indicated here, this will also cause a panic + * as it may mean that the pinned descriptor for a legacy module has been + * improperly updated or that there is some other versioning discrepancy. + * Runtime protobuf definitions will also be checked for compatibility + * with pinned file descriptors to make sure there are no incompatible changes. + * + * This behavior ensures that: + * * pinned proto images are up-to-date + * * protobuf files are carefully annotated with revision comments which + * are important good client UX + * * protobuf files are changed in backwards and forwards compatible ways + */ + revision: number; +} + +/** + * MigrateFromInfo is information on a module version that a newer module + * can migrate from. + */ +export interface MigrateFromInfo { + /** + * module is the fully-qualified protobuf name of the module config object + * for the previous module version, ex: "cosmos.group.module.v1.Module". + */ + module: string; +} + +function createBaseModuleDescriptor(): ModuleDescriptor { + return { go_import: "", use_package: [], can_migrate_from: [] }; +} + +export const ModuleDescriptor = { + encode(message: ModuleDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.go_import !== "") { + writer.uint32(10).string(message.go_import); + } + for (const v of message.use_package) { + PackageReference.encode(v!, writer.uint32(18).fork()).ldelim(); + } + for (const v of message.can_migrate_from) { + MigrateFromInfo.encode(v!, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ModuleDescriptor { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModuleDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.go_import = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.use_package.push(PackageReference.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.can_migrate_from.push(MigrateFromInfo.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModuleDescriptor { + return { + go_import: isSet(object.go_import) ? globalThis.String(object.go_import) : "", + use_package: globalThis.Array.isArray(object?.use_package) + ? object.use_package.map((e: any) => PackageReference.fromJSON(e)) + : [], + can_migrate_from: globalThis.Array.isArray(object?.can_migrate_from) + ? object.can_migrate_from.map((e: any) => MigrateFromInfo.fromJSON(e)) + : [], + }; + }, + + toJSON(message: ModuleDescriptor): unknown { + const obj: any = {}; + if (message.go_import !== "") { + obj.go_import = message.go_import; + } + if (message.use_package?.length) { + obj.use_package = message.use_package.map((e) => PackageReference.toJSON(e)); + } + if (message.can_migrate_from?.length) { + obj.can_migrate_from = message.can_migrate_from.map((e) => MigrateFromInfo.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): ModuleDescriptor { + return ModuleDescriptor.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModuleDescriptor { + const message = createBaseModuleDescriptor(); + message.go_import = object.go_import ?? ""; + message.use_package = object.use_package?.map((e) => PackageReference.fromPartial(e)) || []; + message.can_migrate_from = object.can_migrate_from?.map((e) => MigrateFromInfo.fromPartial(e)) || []; + return message; + }, +}; + +function createBasePackageReference(): PackageReference { + return { name: "", revision: 0 }; +} + +export const PackageReference = { + encode(message: PackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.revision !== 0) { + writer.uint32(16).uint32(message.revision); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): PackageReference { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePackageReference(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.name = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.revision = reader.uint32(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): PackageReference { + return { + name: isSet(object.name) ? globalThis.String(object.name) : "", + revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0, + }; + }, + + toJSON(message: PackageReference): unknown { + const obj: any = {}; + if (message.name !== "") { + obj.name = message.name; + } + if (message.revision !== 0) { + obj.revision = Math.round(message.revision); + } + return obj; + }, + + create, I>>(base?: I): PackageReference { + return PackageReference.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PackageReference { + const message = createBasePackageReference(); + message.name = object.name ?? ""; + message.revision = object.revision ?? 0; + return message; + }, +}; + +function createBaseMigrateFromInfo(): MigrateFromInfo { + return { module: "" }; +} + +export const MigrateFromInfo = { + encode(message: MigrateFromInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.module !== "") { + writer.uint32(10).string(message.module); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MigrateFromInfo { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMigrateFromInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.module = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MigrateFromInfo { + return { module: isSet(object.module) ? globalThis.String(object.module) : "" }; + }, + + toJSON(message: MigrateFromInfo): unknown { + const obj: any = {}; + if (message.module !== "") { + obj.module = message.module; + } + return obj; + }, + + create, I>>(base?: I): MigrateFromInfo { + return MigrateFromInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MigrateFromInfo { + const message = createBaseMigrateFromInfo(); + message.module = object.module ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/cosmos/base/query/v1beta1/pagination.ts b/common/types/src/lcd/cosmos/base/query/v1beta1/pagination.ts index 0c3902cf..2dd71f6b 100644 --- a/common/types/src/lcd/cosmos/base/query/v1beta1/pagination.ts +++ b/common/types/src/lcd/cosmos/base/query/v1beta1/pagination.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/base/query/v1beta1/pagination.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -84,10 +90,10 @@ export const PageRequest = { if (message.limit !== "0") { writer.uint32(24).uint64(message.limit); } - if (message.count_total === true) { + if (message.count_total !== false) { writer.uint32(32).bool(message.count_total); } - if (message.reverse === true) { + if (message.reverse !== false) { writer.uint32(40).bool(message.reverse); } return writer; @@ -165,10 +171,10 @@ export const PageRequest = { if (message.limit !== "0") { obj.limit = message.limit; } - if (message.count_total === true) { + if (message.count_total !== false) { obj.count_total = message.count_total; } - if (message.reverse === true) { + if (message.reverse !== false) { obj.reverse = message.reverse; } return obj; @@ -263,7 +269,7 @@ export const PageResponse = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); @@ -276,7 +282,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; diff --git a/common/types/src/lcd/cosmos/base/v1beta1/coin.ts b/common/types/src/lcd/cosmos/base/v1beta1/coin.ts index 70abf752..25ad32cf 100644 --- a/common/types/src/lcd/cosmos/base/v1beta1/coin.ts +++ b/common/types/src/lcd/cosmos/base/v1beta1/coin.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/base/v1beta1/coin.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -25,12 +31,18 @@ export interface DecCoin { amount: string; } -/** IntProto defines a Protobuf wrapper around an Int object. */ +/** + * IntProto defines a Protobuf wrapper around an Int object. + * Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. + */ export interface IntProto { int: string; } -/** DecProto defines a Protobuf wrapper around a Dec object. */ +/** + * DecProto defines a Protobuf wrapper around a Dec object. + * Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. + */ export interface DecProto { dec: string; } diff --git a/common/types/src/lcd/cosmos/gov/v1/gov.ts b/common/types/src/lcd/cosmos/gov/v1/gov.ts index 1fe3b019..290bd6f6 100644 --- a/common/types/src/lcd/cosmos/gov/v1/gov.ts +++ b/common/types/src/lcd/cosmos/gov/v1/gov.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/gov/v1/gov.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -239,7 +245,11 @@ export interface Proposal { voting_end_time?: | Date | undefined; - /** metadata is any arbitrary metadata attached to the proposal. */ + /** + * metadata is any arbitrary metadata attached to the proposal. + * the recommended format of the metadata is to be found here: + * https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + */ metadata: string; /** * title is the title of the proposal @@ -254,11 +264,23 @@ export interface Proposal { */ summary: string; /** - * Proposer is the address of the proposal sumbitter + * proposer is the address of the proposal sumbitter * * Since: cosmos-sdk 0.47 */ proposer: string; + /** + * expedited defines if the proposal is expedited + * + * Since: cosmos-sdk 0.50 + */ + expedited: boolean; + /** + * failed_reason defines the reason why the proposal failed + * + * Since: cosmos-sdk 0.50 + */ + failed_reason: string; } /** TallyResult defines a standard tally for a governance proposal. */ @@ -284,11 +306,18 @@ export interface Vote { voter: string; /** options is the weighted vote options. */ options: WeightedVoteOption[]; - /** metadata is any arbitrary metadata to attached to the vote. */ + /** + * metadata is any arbitrary metadata attached to the vote. + * the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 + */ metadata: string; } -/** DepositParams defines the params for deposits on governance proposals. */ +/** + * DepositParams defines the params for deposits on governance proposals. + * + * @deprecated + */ export interface DepositParams { /** Minimum deposit for a proposal to enter voting period. */ min_deposit: Coin[]; @@ -299,13 +328,21 @@ export interface DepositParams { max_deposit_period?: Duration | undefined; } -/** VotingParams defines the params for voting on governance proposals. */ +/** + * VotingParams defines the params for voting on governance proposals. + * + * @deprecated + */ export interface VotingParams { /** Duration of the voting period. */ voting_period?: Duration | undefined; } -/** TallyParams defines the params for tallying votes on governance proposals. */ +/** + * TallyParams defines the params for tallying votes on governance proposals. + * + * @deprecated + */ export interface TallyParams { /** * Minimum percentage of total stake needed to vote for a result to be @@ -354,12 +391,49 @@ export interface Params { veto_threshold: string; /** The ratio representing the proportion of the deposit value that must be paid at proposal submission. */ min_initial_deposit_ratio: string; + /** + * The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. + * + * Since: cosmos-sdk 0.50 + */ + proposal_cancel_ratio: string; + /** + * The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + * If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + * + * Since: cosmos-sdk 0.50 + */ + proposal_cancel_dest: string; + /** + * Duration of the voting period of an expedited proposal. + * + * Since: cosmos-sdk 0.50 + */ + expedited_voting_period?: + | Duration + | undefined; + /** + * Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. + * + * Since: cosmos-sdk 0.50 + */ + expedited_threshold: string; + /** Minimum expedited deposit for a proposal to enter voting period. */ + expedited_min_deposit: Coin[]; /** burn deposits if a proposal does not meet quorum */ burn_vote_quorum: boolean; /** burn deposits if the proposal does not enter voting period */ burn_proposal_deposit_prevote: boolean; /** burn deposits if quorum with vote type no_veto is met */ burn_vote_veto: boolean; + /** + * The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + * Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + * required. + * + * Since: cosmos-sdk 0.50 + */ + min_deposit_ratio: string; } function createBaseWeightedVoteOption(): WeightedVoteOption { @@ -540,6 +614,8 @@ function createBaseProposal(): Proposal { title: "", summary: "", proposer: "", + expedited: false, + failed_reason: "", }; } @@ -584,6 +660,12 @@ export const Proposal = { if (message.proposer !== "") { writer.uint32(106).string(message.proposer); } + if (message.expedited !== false) { + writer.uint32(112).bool(message.expedited); + } + if (message.failed_reason !== "") { + writer.uint32(122).string(message.failed_reason); + } return writer; }, @@ -685,6 +767,20 @@ export const Proposal = { message.proposer = reader.string(); continue; + case 14: + if (tag !== 112) { + break; + } + + message.expedited = reader.bool(); + continue; + case 15: + if (tag !== 122) { + break; + } + + message.failed_reason = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -713,6 +809,8 @@ export const Proposal = { title: isSet(object.title) ? globalThis.String(object.title) : "", summary: isSet(object.summary) ? globalThis.String(object.summary) : "", proposer: isSet(object.proposer) ? globalThis.String(object.proposer) : "", + expedited: isSet(object.expedited) ? globalThis.Boolean(object.expedited) : false, + failed_reason: isSet(object.failed_reason) ? globalThis.String(object.failed_reason) : "", }; }, @@ -757,6 +855,12 @@ export const Proposal = { if (message.proposer !== "") { obj.proposer = message.proposer; } + if (message.expedited !== false) { + obj.expedited = message.expedited; + } + if (message.failed_reason !== "") { + obj.failed_reason = message.failed_reason; + } return obj; }, @@ -780,6 +884,8 @@ export const Proposal = { message.title = object.title ?? ""; message.summary = object.summary ?? ""; message.proposer = object.proposer ?? ""; + message.expedited = object.expedited ?? false; + message.failed_reason = object.failed_reason ?? ""; return message; }, }; @@ -1229,9 +1335,15 @@ function createBaseParams(): Params { threshold: "", veto_threshold: "", min_initial_deposit_ratio: "", + proposal_cancel_ratio: "", + proposal_cancel_dest: "", + expedited_voting_period: undefined, + expedited_threshold: "", + expedited_min_deposit: [], burn_vote_quorum: false, burn_proposal_deposit_prevote: false, burn_vote_veto: false, + min_deposit_ratio: "", }; } @@ -1258,15 +1370,33 @@ export const Params = { if (message.min_initial_deposit_ratio !== "") { writer.uint32(58).string(message.min_initial_deposit_ratio); } - if (message.burn_vote_quorum === true) { + if (message.proposal_cancel_ratio !== "") { + writer.uint32(66).string(message.proposal_cancel_ratio); + } + if (message.proposal_cancel_dest !== "") { + writer.uint32(74).string(message.proposal_cancel_dest); + } + if (message.expedited_voting_period !== undefined) { + Duration.encode(message.expedited_voting_period, writer.uint32(82).fork()).ldelim(); + } + if (message.expedited_threshold !== "") { + writer.uint32(90).string(message.expedited_threshold); + } + for (const v of message.expedited_min_deposit) { + Coin.encode(v!, writer.uint32(98).fork()).ldelim(); + } + if (message.burn_vote_quorum !== false) { writer.uint32(104).bool(message.burn_vote_quorum); } - if (message.burn_proposal_deposit_prevote === true) { + if (message.burn_proposal_deposit_prevote !== false) { writer.uint32(112).bool(message.burn_proposal_deposit_prevote); } - if (message.burn_vote_veto === true) { + if (message.burn_vote_veto !== false) { writer.uint32(120).bool(message.burn_vote_veto); } + if (message.min_deposit_ratio !== "") { + writer.uint32(130).string(message.min_deposit_ratio); + } return writer; }, @@ -1326,6 +1456,41 @@ export const Params = { message.min_initial_deposit_ratio = reader.string(); continue; + case 8: + if (tag !== 66) { + break; + } + + message.proposal_cancel_ratio = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.proposal_cancel_dest = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.expedited_voting_period = Duration.decode(reader, reader.uint32()); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.expedited_threshold = reader.string(); + continue; + case 12: + if (tag !== 98) { + break; + } + + message.expedited_min_deposit.push(Coin.decode(reader, reader.uint32())); + continue; case 13: if (tag !== 104) { break; @@ -1347,6 +1512,13 @@ export const Params = { message.burn_vote_veto = reader.bool(); continue; + case 16: + if (tag !== 130) { + break; + } + + message.min_deposit_ratio = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -1369,11 +1541,21 @@ export const Params = { min_initial_deposit_ratio: isSet(object.min_initial_deposit_ratio) ? globalThis.String(object.min_initial_deposit_ratio) : "", + proposal_cancel_ratio: isSet(object.proposal_cancel_ratio) ? globalThis.String(object.proposal_cancel_ratio) : "", + proposal_cancel_dest: isSet(object.proposal_cancel_dest) ? globalThis.String(object.proposal_cancel_dest) : "", + expedited_voting_period: isSet(object.expedited_voting_period) + ? Duration.fromJSON(object.expedited_voting_period) + : undefined, + expedited_threshold: isSet(object.expedited_threshold) ? globalThis.String(object.expedited_threshold) : "", + expedited_min_deposit: globalThis.Array.isArray(object?.expedited_min_deposit) + ? object.expedited_min_deposit.map((e: any) => Coin.fromJSON(e)) + : [], burn_vote_quorum: isSet(object.burn_vote_quorum) ? globalThis.Boolean(object.burn_vote_quorum) : false, burn_proposal_deposit_prevote: isSet(object.burn_proposal_deposit_prevote) ? globalThis.Boolean(object.burn_proposal_deposit_prevote) : false, burn_vote_veto: isSet(object.burn_vote_veto) ? globalThis.Boolean(object.burn_vote_veto) : false, + min_deposit_ratio: isSet(object.min_deposit_ratio) ? globalThis.String(object.min_deposit_ratio) : "", }; }, @@ -1400,15 +1582,33 @@ export const Params = { if (message.min_initial_deposit_ratio !== "") { obj.min_initial_deposit_ratio = message.min_initial_deposit_ratio; } - if (message.burn_vote_quorum === true) { + if (message.proposal_cancel_ratio !== "") { + obj.proposal_cancel_ratio = message.proposal_cancel_ratio; + } + if (message.proposal_cancel_dest !== "") { + obj.proposal_cancel_dest = message.proposal_cancel_dest; + } + if (message.expedited_voting_period !== undefined) { + obj.expedited_voting_period = Duration.toJSON(message.expedited_voting_period); + } + if (message.expedited_threshold !== "") { + obj.expedited_threshold = message.expedited_threshold; + } + if (message.expedited_min_deposit?.length) { + obj.expedited_min_deposit = message.expedited_min_deposit.map((e) => Coin.toJSON(e)); + } + if (message.burn_vote_quorum !== false) { obj.burn_vote_quorum = message.burn_vote_quorum; } - if (message.burn_proposal_deposit_prevote === true) { + if (message.burn_proposal_deposit_prevote !== false) { obj.burn_proposal_deposit_prevote = message.burn_proposal_deposit_prevote; } - if (message.burn_vote_veto === true) { + if (message.burn_vote_veto !== false) { obj.burn_vote_veto = message.burn_vote_veto; } + if (message.min_deposit_ratio !== "") { + obj.min_deposit_ratio = message.min_deposit_ratio; + } return obj; }, @@ -1428,9 +1628,18 @@ export const Params = { message.threshold = object.threshold ?? ""; message.veto_threshold = object.veto_threshold ?? ""; message.min_initial_deposit_ratio = object.min_initial_deposit_ratio ?? ""; + message.proposal_cancel_ratio = object.proposal_cancel_ratio ?? ""; + message.proposal_cancel_dest = object.proposal_cancel_dest ?? ""; + message.expedited_voting_period = + (object.expedited_voting_period !== undefined && object.expedited_voting_period !== null) + ? Duration.fromPartial(object.expedited_voting_period) + : undefined; + message.expedited_threshold = object.expedited_threshold ?? ""; + message.expedited_min_deposit = object.expedited_min_deposit?.map((e) => Coin.fromPartial(e)) || []; message.burn_vote_quorum = object.burn_vote_quorum ?? false; message.burn_proposal_deposit_prevote = object.burn_proposal_deposit_prevote ?? false; message.burn_vote_veto = object.burn_vote_veto ?? false; + message.min_deposit_ratio = object.min_deposit_ratio ?? ""; return message; }, }; diff --git a/common/types/src/lcd/cosmos/gov/v1/tx.ts b/common/types/src/lcd/cosmos/gov/v1/tx.ts index 02e36f4a..68149f0c 100644 --- a/common/types/src/lcd/cosmos/gov/v1/tx.ts +++ b/common/types/src/lcd/cosmos/gov/v1/tx.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/gov/v1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { Any } from "../../../google/protobuf/any"; +import { Timestamp } from "../../../google/protobuf/timestamp"; import { Coin } from "../../base/v1beta1/coin"; import { Params, @@ -41,6 +48,12 @@ export interface MsgSubmitProposal { * Since: cosmos-sdk 0.47 */ summary: string; + /** + * expedited defines if the proposal is expedited or not + * + * Since: cosmos-sdk 0.50 + */ + expedited: boolean; } /** MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. */ @@ -137,8 +150,37 @@ export interface MsgUpdateParams { export interface MsgUpdateParamsResponse { } +/** + * MsgCancelProposal is the Msg/CancelProposal request type. + * + * Since: cosmos-sdk 0.50 + */ +export interface MsgCancelProposal { + /** proposal_id defines the unique id of the proposal. */ + proposal_id: string; + /** proposer is the account address of the proposer. */ + proposer: string; +} + +/** + * MsgCancelProposalResponse defines the response structure for executing a + * MsgCancelProposal message. + * + * Since: cosmos-sdk 0.50 + */ +export interface MsgCancelProposalResponse { + /** proposal_id defines the unique id of the proposal. */ + proposal_id: string; + /** canceled_time is the time when proposal is canceled. */ + canceled_time?: + | Date + | undefined; + /** canceled_height defines the block height at which the proposal is canceled. */ + canceled_height: string; +} + function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { messages: [], initial_deposit: [], proposer: "", metadata: "", title: "", summary: "" }; + return { messages: [], initial_deposit: [], proposer: "", metadata: "", title: "", summary: "", expedited: false }; } export const MsgSubmitProposal = { @@ -161,6 +203,9 @@ export const MsgSubmitProposal = { if (message.summary !== "") { writer.uint32(50).string(message.summary); } + if (message.expedited !== false) { + writer.uint32(56).bool(message.expedited); + } return writer; }, @@ -213,6 +258,13 @@ export const MsgSubmitProposal = { message.summary = reader.string(); continue; + case 7: + if (tag !== 56) { + break; + } + + message.expedited = reader.bool(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -232,6 +284,7 @@ export const MsgSubmitProposal = { metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", title: isSet(object.title) ? globalThis.String(object.title) : "", summary: isSet(object.summary) ? globalThis.String(object.summary) : "", + expedited: isSet(object.expedited) ? globalThis.Boolean(object.expedited) : false, }; }, @@ -255,6 +308,9 @@ export const MsgSubmitProposal = { if (message.summary !== "") { obj.summary = message.summary; } + if (message.expedited !== false) { + obj.expedited = message.expedited; + } return obj; }, @@ -269,6 +325,7 @@ export const MsgSubmitProposal = { message.metadata = object.metadata ?? ""; message.title = object.title ?? ""; message.summary = object.summary ?? ""; + message.expedited = object.expedited ?? false; return message; }, }; @@ -996,6 +1053,169 @@ export const MsgUpdateParamsResponse = { }, }; +function createBaseMsgCancelProposal(): MsgCancelProposal { + return { proposal_id: "0", proposer: "" }; +} + +export const MsgCancelProposal = { + encode(message: MsgCancelProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proposal_id !== "0") { + writer.uint32(8).uint64(message.proposal_id); + } + if (message.proposer !== "") { + writer.uint32(18).string(message.proposer); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCancelProposal { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCancelProposal(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.proposal_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.proposer = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MsgCancelProposal { + return { + proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", + proposer: isSet(object.proposer) ? globalThis.String(object.proposer) : "", + }; + }, + + toJSON(message: MsgCancelProposal): unknown { + const obj: any = {}; + if (message.proposal_id !== "0") { + obj.proposal_id = message.proposal_id; + } + if (message.proposer !== "") { + obj.proposer = message.proposer; + } + return obj; + }, + + create, I>>(base?: I): MsgCancelProposal { + return MsgCancelProposal.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MsgCancelProposal { + const message = createBaseMsgCancelProposal(); + message.proposal_id = object.proposal_id ?? "0"; + message.proposer = object.proposer ?? ""; + return message; + }, +}; + +function createBaseMsgCancelProposalResponse(): MsgCancelProposalResponse { + return { proposal_id: "0", canceled_time: undefined, canceled_height: "0" }; +} + +export const MsgCancelProposalResponse = { + encode(message: MsgCancelProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.proposal_id !== "0") { + writer.uint32(8).uint64(message.proposal_id); + } + if (message.canceled_time !== undefined) { + Timestamp.encode(toTimestamp(message.canceled_time), writer.uint32(18).fork()).ldelim(); + } + if (message.canceled_height !== "0") { + writer.uint32(24).uint64(message.canceled_height); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCancelProposalResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCancelProposalResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.proposal_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.canceled_time = fromTimestamp(Timestamp.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.canceled_height = longToString(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): MsgCancelProposalResponse { + return { + proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", + canceled_time: isSet(object.canceled_time) ? fromJsonTimestamp(object.canceled_time) : undefined, + canceled_height: isSet(object.canceled_height) ? globalThis.String(object.canceled_height) : "0", + }; + }, + + toJSON(message: MsgCancelProposalResponse): unknown { + const obj: any = {}; + if (message.proposal_id !== "0") { + obj.proposal_id = message.proposal_id; + } + if (message.canceled_time !== undefined) { + obj.canceled_time = message.canceled_time.toISOString(); + } + if (message.canceled_height !== "0") { + obj.canceled_height = message.canceled_height; + } + return obj; + }, + + create, I>>(base?: I): MsgCancelProposalResponse { + return MsgCancelProposalResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): MsgCancelProposalResponse { + const message = createBaseMsgCancelProposalResponse(); + message.proposal_id = object.proposal_id ?? "0"; + message.canceled_time = object.canceled_time ?? undefined; + message.canceled_height = object.canceled_height ?? "0"; + return message; + }, +}; + /** Msg defines the gov Msg service. */ export interface Msg { /** SubmitProposal defines a method to create new proposal given the messages. */ @@ -1018,6 +1238,12 @@ export interface Msg { * Since: cosmos-sdk 0.47 */ UpdateParams(request: MsgUpdateParams): Promise; + /** + * CancelProposal defines a method to cancel governance proposal + * + * Since: cosmos-sdk 0.50 + */ + CancelProposal(request: MsgCancelProposal): Promise; } export const MsgServiceName = "cosmos.gov.v1.Msg"; @@ -1033,6 +1259,7 @@ export class MsgClientImpl implements Msg { this.VoteWeighted = this.VoteWeighted.bind(this); this.Deposit = this.Deposit.bind(this); this.UpdateParams = this.UpdateParams.bind(this); + this.CancelProposal = this.CancelProposal.bind(this); } SubmitProposal(request: MsgSubmitProposal): Promise { const data = MsgSubmitProposal.encode(request).finish(); @@ -1069,6 +1296,12 @@ export class MsgClientImpl implements Msg { const promise = this.rpc.request(this.service, "UpdateParams", data); return promise.then((data) => MsgUpdateParamsResponse.decode(_m0.Reader.create(data))); } + + CancelProposal(request: MsgCancelProposal): Promise { + const data = MsgCancelProposal.encode(request).finish(); + const promise = this.rpc.request(this.service, "CancelProposal", data); + return promise.then((data) => MsgCancelProposalResponse.decode(_m0.Reader.create(data))); + } } interface Rpc { @@ -1087,6 +1320,28 @@ type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; +function toTimestamp(date: Date): Timestamp { + const seconds = Math.trunc(date.getTime() / 1_000).toString(); + const nanos = (date.getTime() % 1_000) * 1_000_000; + return { seconds, nanos }; +} + +function fromTimestamp(t: Timestamp): Date { + let millis = (globalThis.Number(t.seconds) || 0) * 1_000; + millis += (t.nanos || 0) / 1_000_000; + return new globalThis.Date(millis); +} + +function fromJsonTimestamp(o: any): Date { + if (o instanceof globalThis.Date) { + return o; + } else if (typeof o === "string") { + return new globalThis.Date(o); + } else { + return fromTimestamp(Timestamp.fromJSON(o)); + } +} + function longToString(long: Long) { return long.toString(); } diff --git a/common/types/src/lcd/cosmos/msg/v1/msg.ts b/common/types/src/lcd/cosmos/msg/v1/msg.ts index 093dfbba..7012edff 100644 --- a/common/types/src/lcd/cosmos/msg/v1/msg.ts +++ b/common/types/src/lcd/cosmos/msg/v1/msg.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos/msg/v1/msg.proto + /* eslint-disable */ export const protobufPackage = "cosmos.msg.v1"; diff --git a/common/types/src/lcd/cosmos_proto/cosmos.ts b/common/types/src/lcd/cosmos_proto/cosmos.ts index d40e6d68..7a90439d 100644 --- a/common/types/src/lcd/cosmos_proto/cosmos.ts +++ b/common/types/src/lcd/cosmos_proto/cosmos.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: cosmos_proto/cosmos.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/gogoproto/gogo.ts b/common/types/src/lcd/gogoproto/gogo.ts index ecf800e0..edd73fe6 100644 --- a/common/types/src/lcd/gogoproto/gogo.ts +++ b/common/types/src/lcd/gogoproto/gogo.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: gogoproto/gogo.proto + /* eslint-disable */ export const protobufPackage = "gogoproto"; diff --git a/common/types/src/lcd/google/api/annotations.ts b/common/types/src/lcd/google/api/annotations.ts index c2161053..1d1b2d5f 100644 --- a/common/types/src/lcd/google/api/annotations.ts +++ b/common/types/src/lcd/google/api/annotations.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/api/annotations.proto + /* eslint-disable */ export const protobufPackage = "google.api"; diff --git a/common/types/src/lcd/google/api/http.ts b/common/types/src/lcd/google/api/http.ts index 18b91749..0b105734 100644 --- a/common/types/src/lcd/google/api/http.ts +++ b/common/types/src/lcd/google/api/http.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/api/http.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -382,7 +388,7 @@ export const Http = { for (const v of message.rules) { HttpRule.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.fully_decode_reserved_expansion === true) { + if (message.fully_decode_reserved_expansion !== false) { writer.uint32(16).bool(message.fully_decode_reserved_expansion); } return writer; @@ -432,7 +438,7 @@ export const Http = { if (message.rules?.length) { obj.rules = message.rules.map((e) => HttpRule.toJSON(e)); } - if (message.fully_decode_reserved_expansion === true) { + if (message.fully_decode_reserved_expansion !== false) { obj.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; } return obj; diff --git a/common/types/src/lcd/google/protobuf/any.ts b/common/types/src/lcd/google/protobuf/any.ts index d7319f6a..69bacf8e 100644 --- a/common/types/src/lcd/google/protobuf/any.ts +++ b/common/types/src/lcd/google/protobuf/any.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/any.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -201,7 +207,7 @@ export const Any = { }; function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); @@ -214,7 +220,7 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { + if ((globalThis as any).Buffer) { return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; diff --git a/common/types/src/lcd/google/protobuf/duration.ts b/common/types/src/lcd/google/protobuf/duration.ts index 00080d2e..68f69d05 100644 --- a/common/types/src/lcd/google/protobuf/duration.ts +++ b/common/types/src/lcd/google/protobuf/duration.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/duration.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/google/protobuf/timestamp.ts b/common/types/src/lcd/google/protobuf/timestamp.ts index 83d40f44..84095fd4 100644 --- a/common/types/src/lcd/google/protobuf/timestamp.ts +++ b/common/types/src/lcd/google/protobuf/timestamp.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: google/protobuf/timestamp.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/bundles/module/module.ts b/common/types/src/lcd/kyve/bundles/module/module.ts new file mode 100644 index 00000000..f025fd37 --- /dev/null +++ b/common/types/src/lcd/kyve/bundles/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.bundles.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/bundles.ts b/common/types/src/lcd/kyve/bundles/v1beta1/bundles.ts index e661c9d1..de6c0569 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/bundles.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/bundles.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/bundles.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/events.ts b/common/types/src/lcd/kyve/bundles/v1beta1/events.ts index 6c25f31a..19ea8196 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -105,15 +111,18 @@ export interface EventBundleFinalized { total: string; /** status of the finalized bundle */ status: BundleStatus; - /** amount which funders provided to the total bundle reward (in ukyve) */ + /** amount which funders provided to the total bundle reward */ funders_payout: string; /** amount which the inflation pool provided to the total reward (in ukyve) */ inflation_payout: string; - /** rewards transferred to treasury (in ukyve) */ + /** rewards transferred to treasury */ reward_treasury: string; - /** rewardUploader rewards directly transferred to uploader (in ukyve) */ + /** + * reward_uploader are the total rewards (commission + storage cost) + * the uploader received + */ reward_uploader: string; - /** rewardDelegation rewards distributed among all delegators (in ukyve) */ + /** rewardDelegation rewards distributed among all delegators */ reward_delegation: string; /** rewardTotal the total bundle reward */ reward_total: string; @@ -123,6 +132,13 @@ export interface EventBundleFinalized { uploader: string; /** next_uploader the address of the next uploader after this bundle */ next_uploader: string; + /** reward_uploader_storage_cost are the storage cost rewards for the uploader */ + reward_uploader_storage_cost: string; + /** + * reward_uploader_commission are the commission rewards of the uploader. + * if the uploader has no delegations the delegation rewards are included here + */ + reward_uploader_commission: string; } /** @@ -655,15 +671,17 @@ function createBaseEventBundleFinalized(): EventBundleFinalized { abstain: "0", total: "0", status: BundleStatus.BUNDLE_STATUS_UNSPECIFIED, - funders_payout: "0", + funders_payout: "", inflation_payout: "0", - reward_treasury: "0", - reward_uploader: "0", - reward_delegation: "0", - reward_total: "0", + reward_treasury: "", + reward_uploader: "", + reward_delegation: "", + reward_total: "", finalized_at: "0", uploader: "", next_uploader: "", + reward_uploader_storage_cost: "", + reward_uploader_commission: "", }; } @@ -690,23 +708,23 @@ export const EventBundleFinalized = { if (message.status !== BundleStatus.BUNDLE_STATUS_UNSPECIFIED) { writer.uint32(56).int32(bundleStatusToNumber(message.status)); } - if (message.funders_payout !== "0") { - writer.uint32(64).uint64(message.funders_payout); + if (message.funders_payout !== "") { + writer.uint32(66).string(message.funders_payout); } if (message.inflation_payout !== "0") { writer.uint32(72).uint64(message.inflation_payout); } - if (message.reward_treasury !== "0") { - writer.uint32(80).uint64(message.reward_treasury); + if (message.reward_treasury !== "") { + writer.uint32(82).string(message.reward_treasury); } - if (message.reward_uploader !== "0") { - writer.uint32(88).uint64(message.reward_uploader); + if (message.reward_uploader !== "") { + writer.uint32(90).string(message.reward_uploader); } - if (message.reward_delegation !== "0") { - writer.uint32(96).uint64(message.reward_delegation); + if (message.reward_delegation !== "") { + writer.uint32(98).string(message.reward_delegation); } - if (message.reward_total !== "0") { - writer.uint32(104).uint64(message.reward_total); + if (message.reward_total !== "") { + writer.uint32(106).string(message.reward_total); } if (message.finalized_at !== "0") { writer.uint32(112).uint64(message.finalized_at); @@ -717,6 +735,12 @@ export const EventBundleFinalized = { if (message.next_uploader !== "") { writer.uint32(130).string(message.next_uploader); } + if (message.reward_uploader_storage_cost !== "") { + writer.uint32(138).string(message.reward_uploader_storage_cost); + } + if (message.reward_uploader_commission !== "") { + writer.uint32(146).string(message.reward_uploader_commission); + } return writer; }, @@ -777,11 +801,11 @@ export const EventBundleFinalized = { message.status = bundleStatusFromJSON(reader.int32()); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.funders_payout = longToString(reader.uint64() as Long); + message.funders_payout = reader.string(); continue; case 9: if (tag !== 72) { @@ -791,32 +815,32 @@ export const EventBundleFinalized = { message.inflation_payout = longToString(reader.uint64() as Long); continue; case 10: - if (tag !== 80) { + if (tag !== 82) { break; } - message.reward_treasury = longToString(reader.uint64() as Long); + message.reward_treasury = reader.string(); continue; case 11: - if (tag !== 88) { + if (tag !== 90) { break; } - message.reward_uploader = longToString(reader.uint64() as Long); + message.reward_uploader = reader.string(); continue; case 12: - if (tag !== 96) { + if (tag !== 98) { break; } - message.reward_delegation = longToString(reader.uint64() as Long); + message.reward_delegation = reader.string(); continue; case 13: - if (tag !== 104) { + if (tag !== 106) { break; } - message.reward_total = longToString(reader.uint64() as Long); + message.reward_total = reader.string(); continue; case 14: if (tag !== 112) { @@ -839,6 +863,20 @@ export const EventBundleFinalized = { message.next_uploader = reader.string(); continue; + case 17: + if (tag !== 138) { + break; + } + + message.reward_uploader_storage_cost = reader.string(); + continue; + case 18: + if (tag !== 146) { + break; + } + + message.reward_uploader_commission = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -857,15 +895,21 @@ export const EventBundleFinalized = { abstain: isSet(object.abstain) ? globalThis.String(object.abstain) : "0", total: isSet(object.total) ? globalThis.String(object.total) : "0", status: isSet(object.status) ? bundleStatusFromJSON(object.status) : BundleStatus.BUNDLE_STATUS_UNSPECIFIED, - funders_payout: isSet(object.funders_payout) ? globalThis.String(object.funders_payout) : "0", + funders_payout: isSet(object.funders_payout) ? globalThis.String(object.funders_payout) : "", inflation_payout: isSet(object.inflation_payout) ? globalThis.String(object.inflation_payout) : "0", - reward_treasury: isSet(object.reward_treasury) ? globalThis.String(object.reward_treasury) : "0", - reward_uploader: isSet(object.reward_uploader) ? globalThis.String(object.reward_uploader) : "0", - reward_delegation: isSet(object.reward_delegation) ? globalThis.String(object.reward_delegation) : "0", - reward_total: isSet(object.reward_total) ? globalThis.String(object.reward_total) : "0", + reward_treasury: isSet(object.reward_treasury) ? globalThis.String(object.reward_treasury) : "", + reward_uploader: isSet(object.reward_uploader) ? globalThis.String(object.reward_uploader) : "", + reward_delegation: isSet(object.reward_delegation) ? globalThis.String(object.reward_delegation) : "", + reward_total: isSet(object.reward_total) ? globalThis.String(object.reward_total) : "", finalized_at: isSet(object.finalized_at) ? globalThis.String(object.finalized_at) : "0", uploader: isSet(object.uploader) ? globalThis.String(object.uploader) : "", next_uploader: isSet(object.next_uploader) ? globalThis.String(object.next_uploader) : "", + reward_uploader_storage_cost: isSet(object.reward_uploader_storage_cost) + ? globalThis.String(object.reward_uploader_storage_cost) + : "", + reward_uploader_commission: isSet(object.reward_uploader_commission) + ? globalThis.String(object.reward_uploader_commission) + : "", }; }, @@ -892,22 +936,22 @@ export const EventBundleFinalized = { if (message.status !== BundleStatus.BUNDLE_STATUS_UNSPECIFIED) { obj.status = bundleStatusToJSON(message.status); } - if (message.funders_payout !== "0") { + if (message.funders_payout !== "") { obj.funders_payout = message.funders_payout; } if (message.inflation_payout !== "0") { obj.inflation_payout = message.inflation_payout; } - if (message.reward_treasury !== "0") { + if (message.reward_treasury !== "") { obj.reward_treasury = message.reward_treasury; } - if (message.reward_uploader !== "0") { + if (message.reward_uploader !== "") { obj.reward_uploader = message.reward_uploader; } - if (message.reward_delegation !== "0") { + if (message.reward_delegation !== "") { obj.reward_delegation = message.reward_delegation; } - if (message.reward_total !== "0") { + if (message.reward_total !== "") { obj.reward_total = message.reward_total; } if (message.finalized_at !== "0") { @@ -919,6 +963,12 @@ export const EventBundleFinalized = { if (message.next_uploader !== "") { obj.next_uploader = message.next_uploader; } + if (message.reward_uploader_storage_cost !== "") { + obj.reward_uploader_storage_cost = message.reward_uploader_storage_cost; + } + if (message.reward_uploader_commission !== "") { + obj.reward_uploader_commission = message.reward_uploader_commission; + } return obj; }, @@ -934,15 +984,17 @@ export const EventBundleFinalized = { message.abstain = object.abstain ?? "0"; message.total = object.total ?? "0"; message.status = object.status ?? BundleStatus.BUNDLE_STATUS_UNSPECIFIED; - message.funders_payout = object.funders_payout ?? "0"; + message.funders_payout = object.funders_payout ?? ""; message.inflation_payout = object.inflation_payout ?? "0"; - message.reward_treasury = object.reward_treasury ?? "0"; - message.reward_uploader = object.reward_uploader ?? "0"; - message.reward_delegation = object.reward_delegation ?? "0"; - message.reward_total = object.reward_total ?? "0"; + message.reward_treasury = object.reward_treasury ?? ""; + message.reward_uploader = object.reward_uploader ?? ""; + message.reward_delegation = object.reward_delegation ?? ""; + message.reward_total = object.reward_total ?? ""; message.finalized_at = object.finalized_at ?? "0"; message.uploader = object.uploader ?? ""; message.next_uploader = object.next_uploader ?? ""; + message.reward_uploader_storage_cost = object.reward_uploader_storage_cost ?? ""; + message.reward_uploader_commission = object.reward_uploader_commission ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/genesis.ts b/common/types/src/lcd/kyve/bundles/v1beta1/genesis.ts index 4be66c46..8cdf9ace 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { BundleProposal, BundleVersionMap, FinalizedBundle, RoundRobinProgress } from "./bundles"; diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/params.ts b/common/types/src/lcd/kyve/bundles/v1beta1/params.ts index f9f18d1a..6194f7eb 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/params.ts @@ -1,23 +1,111 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; export const protobufPackage = "kyve.bundles.v1beta1"; +/** StorageCost defines the cost for storage providers */ +export interface StorageCost { + /** storage_provider_id is a unique identifier for each storage provider, such as Arweave, Irys, Filecoin, etc. */ + storage_provider_id: number; + /** cost is the amount in USD to store one byte on the storage provider. This value should be kept up-to-date. */ + cost: string; +} + /** Params defines the bundles module parameters. */ export interface Params { /** upload_timeout ... */ upload_timeout: string; - /** storage_cost ... */ - storage_cost: string; + /** storage_costs ... */ + storage_costs: StorageCost[]; /** network_fee ... */ network_fee: string; /** max_points ... */ max_points: string; } +function createBaseStorageCost(): StorageCost { + return { storage_provider_id: 0, cost: "" }; +} + +export const StorageCost = { + encode(message: StorageCost, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.storage_provider_id !== 0) { + writer.uint32(8).uint32(message.storage_provider_id); + } + if (message.cost !== "") { + writer.uint32(18).string(message.cost); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): StorageCost { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStorageCost(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + + message.storage_provider_id = reader.uint32(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.cost = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): StorageCost { + return { + storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, + cost: isSet(object.cost) ? globalThis.String(object.cost) : "", + }; + }, + + toJSON(message: StorageCost): unknown { + const obj: any = {}; + if (message.storage_provider_id !== 0) { + obj.storage_provider_id = Math.round(message.storage_provider_id); + } + if (message.cost !== "") { + obj.cost = message.cost; + } + return obj; + }, + + create, I>>(base?: I): StorageCost { + return StorageCost.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): StorageCost { + const message = createBaseStorageCost(); + message.storage_provider_id = object.storage_provider_id ?? 0; + message.cost = object.cost ?? ""; + return message; + }, +}; + function createBaseParams(): Params { - return { upload_timeout: "0", storage_cost: "", network_fee: "", max_points: "0" }; + return { upload_timeout: "0", storage_costs: [], network_fee: "", max_points: "0" }; } export const Params = { @@ -25,8 +113,8 @@ export const Params = { if (message.upload_timeout !== "0") { writer.uint32(8).uint64(message.upload_timeout); } - if (message.storage_cost !== "") { - writer.uint32(18).string(message.storage_cost); + for (const v of message.storage_costs) { + StorageCost.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.network_fee !== "") { writer.uint32(26).string(message.network_fee); @@ -56,7 +144,7 @@ export const Params = { break; } - message.storage_cost = reader.string(); + message.storage_costs.push(StorageCost.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { @@ -84,7 +172,9 @@ export const Params = { fromJSON(object: any): Params { return { upload_timeout: isSet(object.upload_timeout) ? globalThis.String(object.upload_timeout) : "0", - storage_cost: isSet(object.storage_cost) ? globalThis.String(object.storage_cost) : "", + storage_costs: globalThis.Array.isArray(object?.storage_costs) + ? object.storage_costs.map((e: any) => StorageCost.fromJSON(e)) + : [], network_fee: isSet(object.network_fee) ? globalThis.String(object.network_fee) : "", max_points: isSet(object.max_points) ? globalThis.String(object.max_points) : "0", }; @@ -95,8 +185,8 @@ export const Params = { if (message.upload_timeout !== "0") { obj.upload_timeout = message.upload_timeout; } - if (message.storage_cost !== "") { - obj.storage_cost = message.storage_cost; + if (message.storage_costs?.length) { + obj.storage_costs = message.storage_costs.map((e) => StorageCost.toJSON(e)); } if (message.network_fee !== "") { obj.network_fee = message.network_fee; @@ -113,7 +203,7 @@ export const Params = { fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.upload_timeout = object.upload_timeout ?? "0"; - message.storage_cost = object.storage_cost ?? ""; + message.storage_costs = object.storage_costs?.map((e) => StorageCost.fromPartial(e)) || []; message.network_fee = object.network_fee ?? ""; message.max_points = object.max_points ?? "0"; return message; diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/query.ts b/common/types/src/lcd/kyve/bundles/v1beta1/query.ts index ddd88889..9d07008b 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/bundles/v1beta1/tx.ts b/common/types/src/lcd/kyve/bundles/v1beta1/tx.ts index 36511c51..d5d9748f 100644 --- a/common/types/src/lcd/kyve/bundles/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/bundles/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/bundles/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/delegation/module/module.ts b/common/types/src/lcd/kyve/delegation/module/module.ts new file mode 100644 index 00000000..5e1a934d --- /dev/null +++ b/common/types/src/lcd/kyve/delegation/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.delegation.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/delegation.ts b/common/types/src/lcd/kyve/delegation/v1beta1/delegation.ts index 9fe6a900..f1484fde 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/delegation.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/delegation.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/delegation.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.delegation.v1beta1"; @@ -101,7 +108,7 @@ export interface DelegationEntry { /** k_index is the of the period this entry ends */ k_index: string; /** value is the quotient of collected rewards and total stake according to F1-distribution */ - value: string; + value: DecCoin[]; } /** DelegationPoolData stores general delegation information for every staker */ @@ -109,7 +116,7 @@ export interface DelegationData { /** Every staker has one DelegationData */ staker: string; /** current_rewards ... */ - current_rewards: string; + current_rewards: Coin[]; /** total_delegation ... */ total_delegation: string; /** latest_index_k ... */ @@ -269,7 +276,7 @@ export const Delegator = { }; function createBaseDelegationEntry(): DelegationEntry { - return { staker: "", k_index: "0", value: "" }; + return { staker: "", k_index: "0", value: [] }; } export const DelegationEntry = { @@ -280,8 +287,8 @@ export const DelegationEntry = { if (message.k_index !== "0") { writer.uint32(16).uint64(message.k_index); } - if (message.value !== "") { - writer.uint32(26).string(message.value); + for (const v of message.value) { + DecCoin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, @@ -312,7 +319,7 @@ export const DelegationEntry = { break; } - message.value = reader.string(); + message.value.push(DecCoin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -327,7 +334,7 @@ export const DelegationEntry = { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", k_index: isSet(object.k_index) ? globalThis.String(object.k_index) : "0", - value: isSet(object.value) ? globalThis.String(object.value) : "", + value: globalThis.Array.isArray(object?.value) ? object.value.map((e: any) => DecCoin.fromJSON(e)) : [], }; }, @@ -339,8 +346,8 @@ export const DelegationEntry = { if (message.k_index !== "0") { obj.k_index = message.k_index; } - if (message.value !== "") { - obj.value = message.value; + if (message.value?.length) { + obj.value = message.value.map((e) => DecCoin.toJSON(e)); } return obj; }, @@ -352,7 +359,7 @@ export const DelegationEntry = { const message = createBaseDelegationEntry(); message.staker = object.staker ?? ""; message.k_index = object.k_index ?? "0"; - message.value = object.value ?? ""; + message.value = object.value?.map((e) => DecCoin.fromPartial(e)) || []; return message; }, }; @@ -360,7 +367,7 @@ export const DelegationEntry = { function createBaseDelegationData(): DelegationData { return { staker: "", - current_rewards: "0", + current_rewards: [], total_delegation: "0", latest_index_k: "0", delegator_count: "0", @@ -373,8 +380,8 @@ export const DelegationData = { if (message.staker !== "") { writer.uint32(10).string(message.staker); } - if (message.current_rewards !== "0") { - writer.uint32(16).uint64(message.current_rewards); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.total_delegation !== "0") { writer.uint32(24).uint64(message.total_delegation); @@ -385,7 +392,7 @@ export const DelegationData = { if (message.delegator_count !== "0") { writer.uint32(40).uint64(message.delegator_count); } - if (message.latest_index_was_undelegation === true) { + if (message.latest_index_was_undelegation !== false) { writer.uint32(48).bool(message.latest_index_was_undelegation); } return writer; @@ -406,11 +413,11 @@ export const DelegationData = { message.staker = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.current_rewards = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -452,7 +459,9 @@ export const DelegationData = { fromJSON(object: any): DelegationData { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - current_rewards: isSet(object.current_rewards) ? globalThis.String(object.current_rewards) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], total_delegation: isSet(object.total_delegation) ? globalThis.String(object.total_delegation) : "0", latest_index_k: isSet(object.latest_index_k) ? globalThis.String(object.latest_index_k) : "0", delegator_count: isSet(object.delegator_count) ? globalThis.String(object.delegator_count) : "0", @@ -467,8 +476,8 @@ export const DelegationData = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.current_rewards !== "0") { - obj.current_rewards = message.current_rewards; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.total_delegation !== "0") { obj.total_delegation = message.total_delegation; @@ -479,7 +488,7 @@ export const DelegationData = { if (message.delegator_count !== "0") { obj.delegator_count = message.delegator_count; } - if (message.latest_index_was_undelegation === true) { + if (message.latest_index_was_undelegation !== false) { obj.latest_index_was_undelegation = message.latest_index_was_undelegation; } return obj; @@ -491,7 +500,7 @@ export const DelegationData = { fromPartial, I>>(object: I): DelegationData { const message = createBaseDelegationData(); message.staker = object.staker ?? ""; - message.current_rewards = object.current_rewards ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.total_delegation = object.total_delegation ?? "0"; message.latest_index_k = object.latest_index_k ?? "0"; message.delegator_count = object.delegator_count ?? "0"; diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/events.ts b/common/types/src/lcd/kyve/delegation/v1beta1/events.ts index 026a935d..23688366 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -91,8 +97,8 @@ export interface EventWithdrawRewards { address: string; /** staker is the account address of the protocol node the users withdraws from. */ staker: string; - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: string; } /** @@ -592,7 +598,7 @@ export const EventRedelegate = { }; function createBaseEventWithdrawRewards(): EventWithdrawRewards { - return { address: "", staker: "", amount: "0" }; + return { address: "", staker: "", amounts: "" }; } export const EventWithdrawRewards = { @@ -603,8 +609,8 @@ export const EventWithdrawRewards = { if (message.staker !== "") { writer.uint32(18).string(message.staker); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } return writer; }, @@ -631,11 +637,11 @@ export const EventWithdrawRewards = { message.staker = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -650,7 +656,7 @@ export const EventWithdrawRewards = { return { address: isSet(object.address) ? globalThis.String(object.address) : "", staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -662,8 +668,8 @@ export const EventWithdrawRewards = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -675,7 +681,7 @@ export const EventWithdrawRewards = { const message = createBaseEventWithdrawRewards(); message.address = object.address ?? ""; message.staker = object.staker ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/genesis.ts b/common/types/src/lcd/kyve/delegation/v1beta1/genesis.ts index 26474063..88f9492a 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/params.ts b/common/types/src/lcd/kyve/delegation/v1beta1/params.ts index 9d495c1f..eaa8393c 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/query.ts b/common/types/src/lcd/kyve/delegation/v1beta1/query.ts index fa3a3652..51787f12 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/delegation/v1beta1/tx.ts b/common/types/src/lcd/kyve/delegation/v1beta1/tx.ts index 12cbf4c9..52c7b68b 100644 --- a/common/types/src/lcd/kyve/delegation/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/delegation/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/delegation/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/funders/module/module.ts b/common/types/src/lcd/kyve/funders/module/module.ts new file mode 100644 index 00000000..66639f77 --- /dev/null +++ b/common/types/src/lcd/kyve/funders/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.funders.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/funders/v1beta1/events.ts b/common/types/src/lcd/kyve/funders/v1beta1/events.ts index ab37613d..6711aa41 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -69,10 +75,10 @@ export interface EventFundPool { pool_id: string; /** address is the account address of the pool funder. */ address: string; - /** amount is the amount in ukyve the funder has funded */ - amount: string; - /** amount_per_bundle is the amount in ukyve the funder has funded per bundle */ - amount_per_bundle: string; + /** amounts is a list of coins the funder has funded */ + amounts: string; + /** amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle */ + amounts_per_bundle: string; } /** @@ -84,8 +90,8 @@ export interface EventDefundPool { pool_id: string; /** address is the account address of the pool funder. */ address: string; - /** amount is the amount in ukyve the funder has defunded */ - amount: string; + /** amounts is a list of coins that the funder wants to defund */ + amounts: string; } /** @@ -459,7 +465,7 @@ export const EventUpdateFunder = { }; function createBaseEventFundPool(): EventFundPool { - return { pool_id: "0", address: "", amount: "0", amount_per_bundle: "0" }; + return { pool_id: "0", address: "", amounts: "", amounts_per_bundle: "" }; } export const EventFundPool = { @@ -470,11 +476,11 @@ export const EventFundPool = { if (message.address !== "") { writer.uint32(18).string(message.address); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + if (message.amounts_per_bundle !== "") { + writer.uint32(34).string(message.amounts_per_bundle); } return writer; }, @@ -501,18 +507,18 @@ export const EventFundPool = { message.address = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -527,8 +533,8 @@ export const EventFundPool = { return { pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", address: isSet(object.address) ? globalThis.String(object.address) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", + amounts_per_bundle: isSet(object.amounts_per_bundle) ? globalThis.String(object.amounts_per_bundle) : "", }; }, @@ -540,11 +546,11 @@ export const EventFundPool = { if (message.address !== "") { obj.address = message.address; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle !== "") { + obj.amounts_per_bundle = message.amounts_per_bundle; } return obj; }, @@ -556,14 +562,14 @@ export const EventFundPool = { const message = createBaseEventFundPool(); message.pool_id = object.pool_id ?? "0"; message.address = object.address ?? ""; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; + message.amounts = object.amounts ?? ""; + message.amounts_per_bundle = object.amounts_per_bundle ?? ""; return message; }, }; function createBaseEventDefundPool(): EventDefundPool { - return { pool_id: "0", address: "", amount: "0" }; + return { pool_id: "0", address: "", amounts: "" }; } export const EventDefundPool = { @@ -574,8 +580,8 @@ export const EventDefundPool = { if (message.address !== "") { writer.uint32(18).string(message.address); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(26).string(message.amounts); } return writer; }, @@ -602,11 +608,11 @@ export const EventDefundPool = { message.address = reader.string(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -621,7 +627,7 @@ export const EventDefundPool = { return { pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", address: isSet(object.address) ? globalThis.String(object.address) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -633,8 +639,8 @@ export const EventDefundPool = { if (message.address !== "") { obj.address = message.address; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -646,7 +652,7 @@ export const EventDefundPool = { const message = createBaseEventDefundPool(); message.pool_id = object.pool_id ?? "0"; message.address = object.address ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/funders/v1beta1/funders.ts b/common/types/src/lcd/kyve/funders/v1beta1/funders.ts index f608aca4..c8305c68 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/funders.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/funders.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/funders.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.funders.v1beta1"; @@ -27,16 +34,19 @@ export interface Funder { * by each funder once. However, a funder can update the amount of funds. */ export interface Funding { - /** funder_id is the id of the funder */ + /** funder_address is the address of the funder */ funder_address: string; /** pool_id is the id of the pool this funding is for */ pool_id: string; - /** amount is the amount of funds in ukyve the funder has left */ - amount: string; - /** amount_per_bundle is the amount of funds in ukyve the funder pays per bundle */ - amount_per_bundle: string; - /** total_funded is the total amount of funds in ukyve the funder has funded */ - total_funded: string; + /** amounts is a list of coins the funder wants to fund the pool with */ + amounts: Coin[]; + /** + * amounts_per_bundle defines the amount of each coin that are distributed + * per finalized bundle + */ + amounts_per_bundle: Coin[]; + /** total_funded is the total amount of coins that the funder has funded */ + total_funded: Coin[]; } /** FundingState is the object which holds info about the funding state of a pool */ @@ -182,7 +192,7 @@ export const Funder = { }; function createBaseFunding(): Funding { - return { funder_address: "", pool_id: "0", amount: "0", amount_per_bundle: "0", total_funded: "0" }; + return { funder_address: "", pool_id: "0", amounts: [], amounts_per_bundle: [], total_funded: [] }; } export const Funding = { @@ -193,14 +203,14 @@ export const Funding = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.total_funded !== "0") { - writer.uint32(40).uint64(message.total_funded); + for (const v of message.total_funded) { + Coin.encode(v!, writer.uint32(42).fork()).ldelim(); } return writer; }, @@ -227,25 +237,25 @@ export const Funding = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.total_funded = longToString(reader.uint64() as Long); + message.total_funded.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -260,9 +270,13 @@ export const Funding = { return { funder_address: isSet(object.funder_address) ? globalThis.String(object.funder_address) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", - total_funded: isSet(object.total_funded) ? globalThis.String(object.total_funded) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], + total_funded: globalThis.Array.isArray(object?.total_funded) + ? object.total_funded.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -274,14 +288,14 @@ export const Funding = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } - if (message.total_funded !== "0") { - obj.total_funded = message.total_funded; + if (message.total_funded?.length) { + obj.total_funded = message.total_funded.map((e) => Coin.toJSON(e)); } return obj; }, @@ -293,9 +307,9 @@ export const Funding = { const message = createBaseFunding(); message.funder_address = object.funder_address ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; - message.total_funded = object.total_funded ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; + message.total_funded = object.total_funded?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/lcd/kyve/funders/v1beta1/genesis.ts b/common/types/src/lcd/kyve/funders/v1beta1/genesis.ts index d20082de..5ba62375 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Funder, Funding, FundingState } from "./funders"; diff --git a/common/types/src/lcd/kyve/funders/v1beta1/params.ts b/common/types/src/lcd/kyve/funders/v1beta1/params.ts index 6c494a7c..e1f1b19d 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/params.ts @@ -1,68 +1,129 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; export const protobufPackage = "kyve.funders.v1beta1"; -/** Params defines the funders module parameters. */ -export interface Params { - /** Minimum amount of tokens that can be funded. */ +/** + * WhitelistCoinEntry is an object containing information around a coin which + * is allowed to be funded in pools + */ +export interface WhitelistCoinEntry { + /** + * coin_denom is the denom of a coin which is allowed to be funded, this value + * needs to be unique + */ + coin_denom: string; + /** coin_decimals are the decimals of the coin */ + coin_decimals: number; + /** + * min_funding_amount is the minimum required amount of this denom that needs + * to be funded. It is of type math.Int since a uint64 is not sufficient for a + * coin with 18 decimals + */ min_funding_amount: string; - /** Minimum amount of tokens that can be funded per bundle. */ + /** + * min_funding_amount_per_bundle is the minimum required amount of this denom + * that needs to be funded per bundle. It is of type math.Int since a uint64 + * is not sufficient for a coin with 18 decimals + */ min_funding_amount_per_bundle: string; + /** + * coin_weight is a factor used to sort funders after their funding amounts. + * This should be the market price of the coin in USD/coin. This value should be kept up-to-date. + */ + coin_weight: string; +} + +/** Params defines the funders module parameters. */ +export interface Params { + /** coin_whitelist is a list of coins that are allowed to fund a pool */ + coin_whitelist: WhitelistCoinEntry[]; /** * Minimum ratio between the funded amount and the amount_per_bundle. - * In other words this param ensures, that a funder provides at least funding for - * `min_funding_multiple` bundles. + * In other words this param ensures, that a funder provides at least + * funding for `min_funding_multiple` bundles. */ min_funding_multiple: string; } -function createBaseParams(): Params { - return { min_funding_amount: "0", min_funding_amount_per_bundle: "0", min_funding_multiple: "0" }; +function createBaseWhitelistCoinEntry(): WhitelistCoinEntry { + return { + coin_denom: "", + coin_decimals: 0, + min_funding_amount: "", + min_funding_amount_per_bundle: "", + coin_weight: "", + }; } -export const Params = { - encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.min_funding_amount !== "0") { - writer.uint32(8).uint64(message.min_funding_amount); +export const WhitelistCoinEntry = { + encode(message: WhitelistCoinEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.coin_denom !== "") { + writer.uint32(10).string(message.coin_denom); } - if (message.min_funding_amount_per_bundle !== "0") { - writer.uint32(16).uint64(message.min_funding_amount_per_bundle); + if (message.coin_decimals !== 0) { + writer.uint32(16).uint32(message.coin_decimals); } - if (message.min_funding_multiple !== "0") { - writer.uint32(24).uint64(message.min_funding_multiple); + if (message.min_funding_amount !== "") { + writer.uint32(26).string(message.min_funding_amount); + } + if (message.min_funding_amount_per_bundle !== "") { + writer.uint32(34).string(message.min_funding_amount_per_bundle); + } + if (message.coin_weight !== "") { + writer.uint32(42).string(message.coin_weight); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Params { + decode(input: _m0.Reader | Uint8Array, length?: number): WhitelistCoinEntry { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); + const message = createBaseWhitelistCoinEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 8) { + if (tag !== 10) { break; } - message.min_funding_amount = longToString(reader.uint64() as Long); + message.coin_denom = reader.string(); continue; case 2: if (tag !== 16) { break; } - message.min_funding_amount_per_bundle = longToString(reader.uint64() as Long); + message.coin_decimals = reader.uint32(); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.min_funding_multiple = longToString(reader.uint64() as Long); + message.min_funding_amount = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.min_funding_amount_per_bundle = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + + message.coin_weight = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -73,24 +134,111 @@ export const Params = { return message; }, - fromJSON(object: any): Params { + fromJSON(object: any): WhitelistCoinEntry { return { - min_funding_amount: isSet(object.min_funding_amount) ? globalThis.String(object.min_funding_amount) : "0", + coin_denom: isSet(object.coin_denom) ? globalThis.String(object.coin_denom) : "", + coin_decimals: isSet(object.coin_decimals) ? globalThis.Number(object.coin_decimals) : 0, + min_funding_amount: isSet(object.min_funding_amount) ? globalThis.String(object.min_funding_amount) : "", min_funding_amount_per_bundle: isSet(object.min_funding_amount_per_bundle) ? globalThis.String(object.min_funding_amount_per_bundle) - : "0", - min_funding_multiple: isSet(object.min_funding_multiple) ? globalThis.String(object.min_funding_multiple) : "0", + : "", + coin_weight: isSet(object.coin_weight) ? globalThis.String(object.coin_weight) : "", }; }, - toJSON(message: Params): unknown { + toJSON(message: WhitelistCoinEntry): unknown { const obj: any = {}; - if (message.min_funding_amount !== "0") { + if (message.coin_denom !== "") { + obj.coin_denom = message.coin_denom; + } + if (message.coin_decimals !== 0) { + obj.coin_decimals = Math.round(message.coin_decimals); + } + if (message.min_funding_amount !== "") { obj.min_funding_amount = message.min_funding_amount; } - if (message.min_funding_amount_per_bundle !== "0") { + if (message.min_funding_amount_per_bundle !== "") { obj.min_funding_amount_per_bundle = message.min_funding_amount_per_bundle; } + if (message.coin_weight !== "") { + obj.coin_weight = message.coin_weight; + } + return obj; + }, + + create, I>>(base?: I): WhitelistCoinEntry { + return WhitelistCoinEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): WhitelistCoinEntry { + const message = createBaseWhitelistCoinEntry(); + message.coin_denom = object.coin_denom ?? ""; + message.coin_decimals = object.coin_decimals ?? 0; + message.min_funding_amount = object.min_funding_amount ?? ""; + message.min_funding_amount_per_bundle = object.min_funding_amount_per_bundle ?? ""; + message.coin_weight = object.coin_weight ?? ""; + return message; + }, +}; + +function createBaseParams(): Params { + return { coin_whitelist: [], min_funding_multiple: "0" }; +} + +export const Params = { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.coin_whitelist) { + WhitelistCoinEntry.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.min_funding_multiple !== "0") { + writer.uint32(16).uint64(message.min_funding_multiple); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Params { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseParams(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.coin_whitelist.push(WhitelistCoinEntry.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.min_funding_multiple = longToString(reader.uint64() as Long); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Params { + return { + coin_whitelist: globalThis.Array.isArray(object?.coin_whitelist) + ? object.coin_whitelist.map((e: any) => WhitelistCoinEntry.fromJSON(e)) + : [], + min_funding_multiple: isSet(object.min_funding_multiple) ? globalThis.String(object.min_funding_multiple) : "0", + }; + }, + + toJSON(message: Params): unknown { + const obj: any = {}; + if (message.coin_whitelist?.length) { + obj.coin_whitelist = message.coin_whitelist.map((e) => WhitelistCoinEntry.toJSON(e)); + } if (message.min_funding_multiple !== "0") { obj.min_funding_multiple = message.min_funding_multiple; } @@ -102,8 +250,7 @@ export const Params = { }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.min_funding_amount = object.min_funding_amount ?? "0"; - message.min_funding_amount_per_bundle = object.min_funding_amount_per_bundle ?? "0"; + message.coin_whitelist = object.coin_whitelist?.map((e) => WhitelistCoinEntry.fromPartial(e)) || []; message.min_funding_multiple = object.min_funding_multiple ?? "0"; return message; }, diff --git a/common/types/src/lcd/kyve/funders/v1beta1/query.ts b/common/types/src/lcd/kyve/funders/v1beta1/query.ts index 7c6d4bbc..0d1319bc 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/funders/v1beta1/tx.ts b/common/types/src/lcd/kyve/funders/v1beta1/tx.ts index 320d9934..9ed8ce6a 100644 --- a/common/types/src/lcd/kyve/funders/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/funders/v1beta1/tx.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/funders/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.funders.v1beta1"; @@ -46,14 +53,17 @@ export interface MsgUpdateFunderResponse { /** MsgFundPool defines a SDK message for funding a pool. */ export interface MsgFundPool { - /** creator ... */ + /** creator is the funder of the pool */ creator: string; - /** id ... */ + /** pool_id is the identifier of the pool */ pool_id: string; - /** amount is the total amount available for distribution */ - amount: string; - /** amount_per_bundle defines the amount of tokens that are distributed per submitted bundle */ - amount_per_bundle: string; + /** amounts is a list of coins the creator wants to fund */ + amounts: Coin[]; + /** + * amounts_per_bundle is a list of coins the creator wants to distribute + * per finalized bundle + */ + amounts_per_bundle: Coin[]; } /** MsgFundPoolResponse defines the Msg/DefundPool response type. */ @@ -62,12 +72,12 @@ export interface MsgFundPoolResponse { /** MsgDefundPool defines a SDK message for defunding a pool. */ export interface MsgDefundPool { - /** creator ... */ + /** creator is the funder of the pool who wants to defund now */ creator: string; - /** id ... */ + /** pool_id is the identifier of the pool */ pool_id: string; - /** amount ... */ - amount: string; + /** amounts is a list of coins the creator wants to defund from the pool */ + amounts: Coin[]; } /** MsgDefundPoolResponse defines the Msg/DefundPool response type. */ @@ -441,7 +451,7 @@ export const MsgUpdateFunderResponse = { }; function createBaseMsgFundPool(): MsgFundPool { - return { creator: "", pool_id: "0", amount: "0", amount_per_bundle: "0" }; + return { creator: "", pool_id: "0", amounts: [], amounts_per_bundle: [] }; } export const MsgFundPool = { @@ -452,11 +462,11 @@ export const MsgFundPool = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } return writer; }, @@ -483,18 +493,18 @@ export const MsgFundPool = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -509,8 +519,10 @@ export const MsgFundPool = { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -522,11 +534,11 @@ export const MsgFundPool = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } return obj; }, @@ -538,8 +550,8 @@ export const MsgFundPool = { const message = createBaseMsgFundPool(); message.creator = object.creator ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -588,7 +600,7 @@ export const MsgFundPoolResponse = { }; function createBaseMsgDefundPool(): MsgDefundPool { - return { creator: "", pool_id: "0", amount: "0" }; + return { creator: "", pool_id: "0", amounts: [] }; } export const MsgDefundPool = { @@ -599,8 +611,8 @@ export const MsgDefundPool = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, @@ -627,11 +639,11 @@ export const MsgDefundPool = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -646,7 +658,7 @@ export const MsgDefundPool = { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -658,8 +670,8 @@ export const MsgDefundPool = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } return obj; }, @@ -671,7 +683,7 @@ export const MsgDefundPool = { const message = createBaseMsgDefundPool(); message.creator = object.creator ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/lcd/kyve/global/module/module.ts b/common/types/src/lcd/kyve/global/module/module.ts new file mode 100644 index 00000000..94447ab1 --- /dev/null +++ b/common/types/src/lcd/kyve/global/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.global.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/global/v1beta1/events.ts b/common/types/src/lcd/kyve/global/v1beta1/events.ts index 0bdef677..cecb3965 100644 --- a/common/types/src/lcd/kyve/global/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/global/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/events.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/lcd/kyve/global/v1beta1/genesis.ts b/common/types/src/lcd/kyve/global/v1beta1/genesis.ts index b71700a5..0209aa89 100644 --- a/common/types/src/lcd/kyve/global/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/global/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/lcd/kyve/global/v1beta1/global.ts b/common/types/src/lcd/kyve/global/v1beta1/global.ts index 2255ca35..3f6befde 100644 --- a/common/types/src/lcd/kyve/global/v1beta1/global.ts +++ b/common/types/src/lcd/kyve/global/v1beta1/global.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/global.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/global/v1beta1/query.ts b/common/types/src/lcd/kyve/global/v1beta1/query.ts index 21b07e42..5aa88f4a 100644 --- a/common/types/src/lcd/kyve/global/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/global/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./global"; diff --git a/common/types/src/lcd/kyve/global/v1beta1/tx.ts b/common/types/src/lcd/kyve/global/v1beta1/tx.ts index 054f931a..0170c465 100644 --- a/common/types/src/lcd/kyve/global/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/global/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/global/v1beta1/tx.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/pool/module/module.ts b/common/types/src/lcd/kyve/pool/module/module.ts new file mode 100644 index 00000000..8733c748 --- /dev/null +++ b/common/types/src/lcd/kyve/pool/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.pool.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/pool/v1beta1/events.ts b/common/types/src/lcd/kyve/pool/v1beta1/events.ts index 0335bbc4..41176232 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -79,6 +85,11 @@ export interface EventCreatePool { * get compressed with */ compression_id: number; + /** + * end_key is the last key before the pool should stop indexing, it is + * inclusive + */ + end_key: string; } /** @@ -303,13 +314,14 @@ function createBaseEventCreatePool(): EventCreatePool { config: "", start_key: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", version: "", binaries: "", storage_provider_id: 0, compression_id: 0, + end_key: "", }; } @@ -336,8 +348,8 @@ export const EventCreatePool = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -357,6 +369,9 @@ export const EventCreatePool = { if (message.compression_id !== 0) { writer.uint32(112).uint32(message.compression_id); } + if (message.end_key !== "") { + writer.uint32(122).string(message.end_key); + } return writer; }, @@ -417,11 +432,11 @@ export const EventCreatePool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -465,6 +480,13 @@ export const EventCreatePool = { message.compression_id = reader.uint32(); continue; + case 15: + if (tag !== 122) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -485,13 +507,14 @@ export const EventCreatePool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", version: isSet(object.version) ? globalThis.String(object.version) : "", binaries: isSet(object.binaries) ? globalThis.String(object.binaries) : "", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, compression_id: isSet(object.compression_id) ? globalThis.Number(object.compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -518,7 +541,7 @@ export const EventCreatePool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -539,6 +562,9 @@ export const EventCreatePool = { if (message.compression_id !== 0) { obj.compression_id = Math.round(message.compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -554,13 +580,14 @@ export const EventCreatePool = { message.config = object.config ?? ""; message.start_key = object.start_key ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.version = object.version ?? ""; message.binaries = object.binaries ?? ""; message.storage_provider_id = object.storage_provider_id ?? 0; message.compression_id = object.compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; @@ -924,7 +951,7 @@ function createBaseEventPoolUpdated(): EventPoolUpdated { logo: "", config: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", storage_provider_id: 0, @@ -955,8 +982,8 @@ export const EventPoolUpdated = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -1030,11 +1057,11 @@ export const EventPoolUpdated = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -1084,7 +1111,7 @@ export const EventPoolUpdated = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, @@ -1115,7 +1142,7 @@ export const EventPoolUpdated = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -1145,7 +1172,7 @@ export const EventPoolUpdated = { message.logo = object.logo ?? ""; message.config = object.config ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.storage_provider_id = object.storage_provider_id ?? 0; diff --git a/common/types/src/lcd/kyve/pool/v1beta1/genesis.ts b/common/types/src/lcd/kyve/pool/v1beta1/genesis.ts index 10b7383f..9c6e5893 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/genesis.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/pool/v1beta1/params.ts b/common/types/src/lcd/kyve/pool/v1beta1/params.ts index 67eb92d7..8c995e04 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/params.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; @@ -9,10 +15,12 @@ export interface Params { protocol_inflation_share: string; /** pool_inflation_payout_rate ... */ pool_inflation_payout_rate: string; + /** max_voting_power_per_pool ... */ + max_voting_power_per_pool: string; } function createBaseParams(): Params { - return { protocol_inflation_share: "", pool_inflation_payout_rate: "" }; + return { protocol_inflation_share: "", pool_inflation_payout_rate: "", max_voting_power_per_pool: "" }; } export const Params = { @@ -23,6 +31,9 @@ export const Params = { if (message.pool_inflation_payout_rate !== "") { writer.uint32(18).string(message.pool_inflation_payout_rate); } + if (message.max_voting_power_per_pool !== "") { + writer.uint32(26).string(message.max_voting_power_per_pool); + } return writer; }, @@ -47,6 +58,13 @@ export const Params = { message.pool_inflation_payout_rate = reader.string(); continue; + case 3: + if (tag !== 26) { + break; + } + + message.max_voting_power_per_pool = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -64,6 +82,9 @@ export const Params = { pool_inflation_payout_rate: isSet(object.pool_inflation_payout_rate) ? globalThis.String(object.pool_inflation_payout_rate) : "", + max_voting_power_per_pool: isSet(object.max_voting_power_per_pool) + ? globalThis.String(object.max_voting_power_per_pool) + : "", }; }, @@ -75,6 +96,9 @@ export const Params = { if (message.pool_inflation_payout_rate !== "") { obj.pool_inflation_payout_rate = message.pool_inflation_payout_rate; } + if (message.max_voting_power_per_pool !== "") { + obj.max_voting_power_per_pool = message.max_voting_power_per_pool; + } return obj; }, @@ -85,6 +109,7 @@ export const Params = { const message = createBaseParams(); message.protocol_inflation_share = object.protocol_inflation_share ?? ""; message.pool_inflation_payout_rate = object.pool_inflation_payout_rate ?? ""; + message.max_voting_power_per_pool = object.max_voting_power_per_pool ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/pool/v1beta1/pool.ts b/common/types/src/lcd/kyve/pool/v1beta1/pool.ts index 5c177df7..884ec321 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/pool.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/pool.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/pool.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -42,6 +48,11 @@ export enum PoolStatus { * has more than 50% voting power and that the pool is halted */ POOL_STATUS_VOTING_POWER_TOO_HIGH = "POOL_STATUS_VOTING_POWER_TOO_HIGH", + /** + * POOL_STATUS_END_KEY_REACHED - POOL_STATUS_END_KEY_REACHED indicates, that the end key has been + * reached and that the pool is halted + */ + POOL_STATUS_END_KEY_REACHED = "POOL_STATUS_END_KEY_REACHED", UNRECOGNIZED = "UNRECOGNIZED", } @@ -68,6 +79,9 @@ export function poolStatusFromJSON(object: any): PoolStatus { case 6: case "POOL_STATUS_VOTING_POWER_TOO_HIGH": return PoolStatus.POOL_STATUS_VOTING_POWER_TOO_HIGH; + case 7: + case "POOL_STATUS_END_KEY_REACHED": + return PoolStatus.POOL_STATUS_END_KEY_REACHED; case -1: case "UNRECOGNIZED": default: @@ -91,6 +105,8 @@ export function poolStatusToJSON(object: PoolStatus): string { return "POOL_STATUS_UPGRADING"; case PoolStatus.POOL_STATUS_VOTING_POWER_TOO_HIGH: return "POOL_STATUS_VOTING_POWER_TOO_HIGH"; + case PoolStatus.POOL_STATUS_END_KEY_REACHED: + return "POOL_STATUS_END_KEY_REACHED"; case PoolStatus.UNRECOGNIZED: default: return "UNRECOGNIZED"; @@ -113,6 +129,8 @@ export function poolStatusToNumber(object: PoolStatus): number { return 5; case PoolStatus.POOL_STATUS_VOTING_POWER_TOO_HIGH: return 6; + case PoolStatus.POOL_STATUS_END_KEY_REACHED: + return 7; case PoolStatus.UNRECOGNIZED: default: return -1; @@ -204,6 +222,11 @@ export interface Pool { current_storage_provider_id: number; /** compression_id ... */ current_compression_id: number; + /** + * end_key is the last key before the pool should stop indexing, it is + * inclusive + */ + end_key: string; } function createBaseProtocol(): Protocol { @@ -412,7 +435,7 @@ function createBasePool(): Pool { current_index: "0", total_bundles: "0", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", disabled: false, @@ -420,6 +443,7 @@ function createBasePool(): Pool { upgrade_plan: undefined, current_storage_provider_id: 0, current_compression_id: 0, + end_key: "", }; } @@ -458,8 +482,8 @@ export const Pool = { if (message.upload_interval !== "0") { writer.uint32(88).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(96).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(98).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(104).uint64(message.min_delegation); @@ -467,7 +491,7 @@ export const Pool = { if (message.max_bundle_size !== "0") { writer.uint32(112).uint64(message.max_bundle_size); } - if (message.disabled === true) { + if (message.disabled !== false) { writer.uint32(120).bool(message.disabled); } if (message.protocol !== undefined) { @@ -482,6 +506,9 @@ export const Pool = { if (message.current_compression_id !== 0) { writer.uint32(152).uint32(message.current_compression_id); } + if (message.end_key !== "") { + writer.uint32(162).string(message.end_key); + } return writer; }, @@ -570,11 +597,11 @@ export const Pool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 12: - if (tag !== 96) { + if (tag !== 98) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 13: if (tag !== 104) { @@ -625,6 +652,13 @@ export const Pool = { message.current_compression_id = reader.uint32(); continue; + case 20: + if (tag !== 162) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -649,7 +683,7 @@ export const Pool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false, @@ -661,6 +695,7 @@ export const Pool = { current_compression_id: isSet(object.current_compression_id) ? globalThis.Number(object.current_compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -699,7 +734,7 @@ export const Pool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -708,7 +743,7 @@ export const Pool = { if (message.max_bundle_size !== "0") { obj.max_bundle_size = message.max_bundle_size; } - if (message.disabled === true) { + if (message.disabled !== false) { obj.disabled = message.disabled; } if (message.protocol !== undefined) { @@ -723,6 +758,9 @@ export const Pool = { if (message.current_compression_id !== 0) { obj.current_compression_id = Math.round(message.current_compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -742,7 +780,7 @@ export const Pool = { message.current_index = object.current_index ?? "0"; message.total_bundles = object.total_bundles ?? "0"; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.disabled = object.disabled ?? false; @@ -754,6 +792,7 @@ export const Pool = { : undefined; message.current_storage_provider_id = object.current_storage_provider_id ?? 0; message.current_compression_id = object.current_compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/pool/v1beta1/query.ts b/common/types/src/lcd/kyve/pool/v1beta1/query.ts index 07d65355..82da8405 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/pool/v1beta1/tx.ts b/common/types/src/lcd/kyve/pool/v1beta1/tx.ts index 427b58fa..dd808ef7 100644 --- a/common/types/src/lcd/kyve/pool/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/pool/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/pool/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -34,6 +40,8 @@ export interface MsgCreatePool { storage_provider_id: number; /** compression_id ... */ compression_id: number; + /** end_key ... */ + end_key: string; } /** MsgCreatePoolResponse defines the Msg/CreatePool response type. */ @@ -131,13 +139,14 @@ function createBaseMsgCreatePool(): MsgCreatePool { config: "", start_key: "", upload_interval: "0", - inflation_share_weight: "0", + inflation_share_weight: "", min_delegation: "0", max_bundle_size: "0", version: "", binaries: "", storage_provider_id: 0, compression_id: 0, + end_key: "", }; } @@ -164,8 +173,8 @@ export const MsgCreatePool = { if (message.upload_interval !== "0") { writer.uint32(56).uint64(message.upload_interval); } - if (message.inflation_share_weight !== "0") { - writer.uint32(64).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(66).string(message.inflation_share_weight); } if (message.min_delegation !== "0") { writer.uint32(72).uint64(message.min_delegation); @@ -185,6 +194,9 @@ export const MsgCreatePool = { if (message.compression_id !== 0) { writer.uint32(112).uint32(message.compression_id); } + if (message.end_key !== "") { + writer.uint32(122).string(message.end_key); + } return writer; }, @@ -245,11 +257,11 @@ export const MsgCreatePool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 9: if (tag !== 72) { @@ -293,6 +305,13 @@ export const MsgCreatePool = { message.compression_id = reader.uint32(); continue; + case 15: + if (tag !== 122) { + break; + } + + message.end_key = reader.string(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -313,13 +332,14 @@ export const MsgCreatePool = { upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", min_delegation: isSet(object.min_delegation) ? globalThis.String(object.min_delegation) : "0", max_bundle_size: isSet(object.max_bundle_size) ? globalThis.String(object.max_bundle_size) : "0", version: isSet(object.version) ? globalThis.String(object.version) : "", binaries: isSet(object.binaries) ? globalThis.String(object.binaries) : "", storage_provider_id: isSet(object.storage_provider_id) ? globalThis.Number(object.storage_provider_id) : 0, compression_id: isSet(object.compression_id) ? globalThis.Number(object.compression_id) : 0, + end_key: isSet(object.end_key) ? globalThis.String(object.end_key) : "", }; }, @@ -346,7 +366,7 @@ export const MsgCreatePool = { if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.min_delegation !== "0") { @@ -367,6 +387,9 @@ export const MsgCreatePool = { if (message.compression_id !== 0) { obj.compression_id = Math.round(message.compression_id); } + if (message.end_key !== "") { + obj.end_key = message.end_key; + } return obj; }, @@ -382,13 +405,14 @@ export const MsgCreatePool = { message.config = object.config ?? ""; message.start_key = object.start_key ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.min_delegation = object.min_delegation ?? "0"; message.max_bundle_size = object.max_bundle_size ?? "0"; message.version = object.version ?? ""; message.binaries = object.binaries ?? ""; message.storage_provider_id = object.storage_provider_id ?? 0; message.compression_id = object.compression_id ?? 0; + message.end_key = object.end_key ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/query/module/module.ts b/common/types/src/lcd/kyve/query/module/module.ts new file mode 100644 index 00000000..38ab6ab9 --- /dev/null +++ b/common/types/src/lcd/kyve/query/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.query.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/query/v1beta1/account.ts b/common/types/src/lcd/kyve/query/v1beta1/account.ts index b58d92db..87e2b5be 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/account.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/account.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/account.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { BasicPool, FullStaker } from "./query"; export const protobufPackage = "kyve.query.v1beta1"; @@ -18,16 +25,16 @@ export interface QueryAccountAssetsResponse { balance: string; /** protocol_staking ... */ protocol_self_delegation: string; - /** protocol_staking_unbonding */ + /** protocol_staking_unbonding ... */ protocol_self_delegation_unbonding: string; /** protocol_delegation ... */ protocol_delegation: string; - /** protocol_delegation_unbonding */ + /** protocol_delegation_unbonding ... */ protocol_delegation_unbonding: string; /** protocol_rewards ... */ - protocol_rewards: string; + protocol_rewards: Coin[]; /** protocol_funding ... */ - protocol_funding: string; + protocol_funding: Coin[]; } /** QueryAccountFundedListRequest ... */ @@ -72,8 +79,8 @@ export interface QueryAccountFundedListResponse { /** Funded ... */ export interface Funded { - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: Coin[]; /** pool ... */ pool?: BasicPool | undefined; } @@ -164,8 +171,8 @@ function createBaseQueryAccountAssetsResponse(): QueryAccountAssetsResponse { protocol_self_delegation_unbonding: "0", protocol_delegation: "0", protocol_delegation_unbonding: "0", - protocol_rewards: "0", - protocol_funding: "0", + protocol_rewards: [], + protocol_funding: [], }; } @@ -186,11 +193,11 @@ export const QueryAccountAssetsResponse = { if (message.protocol_delegation_unbonding !== "0") { writer.uint32(40).uint64(message.protocol_delegation_unbonding); } - if (message.protocol_rewards !== "0") { - writer.uint32(48).uint64(message.protocol_rewards); + for (const v of message.protocol_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } - if (message.protocol_funding !== "0") { - writer.uint32(56).uint64(message.protocol_funding); + for (const v of message.protocol_funding) { + Coin.encode(v!, writer.uint32(58).fork()).ldelim(); } return writer; }, @@ -238,18 +245,18 @@ export const QueryAccountAssetsResponse = { message.protocol_delegation_unbonding = longToString(reader.uint64() as Long); continue; case 6: - if (tag !== 48) { + if (tag !== 50) { break; } - message.protocol_rewards = longToString(reader.uint64() as Long); + message.protocol_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 7: - if (tag !== 56) { + if (tag !== 58) { break; } - message.protocol_funding = longToString(reader.uint64() as Long); + message.protocol_funding.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -273,8 +280,12 @@ export const QueryAccountAssetsResponse = { protocol_delegation_unbonding: isSet(object.protocol_delegation_unbonding) ? globalThis.String(object.protocol_delegation_unbonding) : "0", - protocol_rewards: isSet(object.protocol_rewards) ? globalThis.String(object.protocol_rewards) : "0", - protocol_funding: isSet(object.protocol_funding) ? globalThis.String(object.protocol_funding) : "0", + protocol_rewards: globalThis.Array.isArray(object?.protocol_rewards) + ? object.protocol_rewards.map((e: any) => Coin.fromJSON(e)) + : [], + protocol_funding: globalThis.Array.isArray(object?.protocol_funding) + ? object.protocol_funding.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -295,11 +306,11 @@ export const QueryAccountAssetsResponse = { if (message.protocol_delegation_unbonding !== "0") { obj.protocol_delegation_unbonding = message.protocol_delegation_unbonding; } - if (message.protocol_rewards !== "0") { - obj.protocol_rewards = message.protocol_rewards; + if (message.protocol_rewards?.length) { + obj.protocol_rewards = message.protocol_rewards.map((e) => Coin.toJSON(e)); } - if (message.protocol_funding !== "0") { - obj.protocol_funding = message.protocol_funding; + if (message.protocol_funding?.length) { + obj.protocol_funding = message.protocol_funding.map((e) => Coin.toJSON(e)); } return obj; }, @@ -314,8 +325,8 @@ export const QueryAccountAssetsResponse = { message.protocol_self_delegation_unbonding = object.protocol_self_delegation_unbonding ?? "0"; message.protocol_delegation = object.protocol_delegation ?? "0"; message.protocol_delegation_unbonding = object.protocol_delegation_unbonding ?? "0"; - message.protocol_rewards = object.protocol_rewards ?? "0"; - message.protocol_funding = object.protocol_funding ?? "0"; + message.protocol_rewards = object.protocol_rewards?.map((e) => Coin.fromPartial(e)) || []; + message.protocol_funding = object.protocol_funding?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -694,13 +705,13 @@ export const QueryAccountFundedListResponse = { }; function createBaseFunded(): Funded { - return { amount: "0", pool: undefined }; + return { amounts: [], pool: undefined }; } export const Funded = { encode(message: Funded, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.amount !== "0") { - writer.uint32(8).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } if (message.pool !== undefined) { BasicPool.encode(message.pool, writer.uint32(18).fork()).ldelim(); @@ -715,12 +726,12 @@ export const Funded = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 8) { + case 3: + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -740,15 +751,15 @@ export const Funded = { fromJSON(object: any): Funded { return { - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], pool: isSet(object.pool) ? BasicPool.fromJSON(object.pool) : undefined, }; }, toJSON(message: Funded): unknown { const obj: any = {}; - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } if (message.pool !== undefined) { obj.pool = BasicPool.toJSON(message.pool); @@ -761,7 +772,7 @@ export const Funded = { }, fromPartial, I>>(object: I): Funded { const message = createBaseFunded(); - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; message.pool = (object.pool !== undefined && object.pool !== null) ? BasicPool.fromPartial(object.pool) : undefined; return message; }, diff --git a/common/types/src/lcd/kyve/query/v1beta1/bundles.ts b/common/types/src/lcd/kyve/query/v1beta1/bundles.ts index bce7c561..0ae1c2dc 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/bundles.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/bundles.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/bundles.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -94,8 +100,39 @@ export interface QueryFinalizedBundleRequest { /** QueryFinalizedBundleResponse is the response type for the Query/Staker RPC method. */ export interface QueryFinalizedBundleResponse { - /** finalized_bundles ... */ - finalized_bundles?: FinalizedBundle | undefined; + /** pool_id in which the bundle was created */ + pool_id: string; + /** id is is integrated with each valid bundle produced. */ + id: string; + /** storage_id is the id with which the data can be retrieved from the configured data provider */ + storage_id: string; + /** uploader is the address of the staker who submitted this bundle */ + uploader: string; + /** from_index is the index from where the bundle starts (inclusive) */ + from_index: string; + /** to_index is the index to which the bundle goes (exclusive) */ + to_index: string; + /** from_key is the key of the first data item in the bundle proposal */ + from_key: string; + /** to_key the key of the last data item in the bundle */ + to_key: string; + /** bundle_summary is a summary of the bundle. */ + bundle_summary: string; + /** data_hash is a sha256 hash of the uploaded data. */ + data_hash: string; + /** finalized_at contains details of the block that finalized this bundle. */ + finalized_at?: + | FinalizedAt + | undefined; + /** storage_provider_id the id of the storage provider where the bundle is stored */ + storage_provider_id: string; + /** compression_id the id of the compression type with which the data was compressed */ + compression_id: string; + /** + * stake_security defines the amount of stake which was present in the pool during the finalization of the bundle. + * This field was added in schema version 2. Bundles finalized before that return `null`. + */ + stake_security?: StakeSecurity | undefined; } /** QueryCurrentVoteStatusRequest is the request type for the Query/Staker RPC method. */ @@ -839,13 +876,67 @@ export const QueryFinalizedBundleRequest = { }; function createBaseQueryFinalizedBundleResponse(): QueryFinalizedBundleResponse { - return { finalized_bundles: undefined }; + return { + pool_id: "0", + id: "0", + storage_id: "", + uploader: "", + from_index: "0", + to_index: "0", + from_key: "", + to_key: "", + bundle_summary: "", + data_hash: "", + finalized_at: undefined, + storage_provider_id: "0", + compression_id: "0", + stake_security: undefined, + }; } export const QueryFinalizedBundleResponse = { encode(message: QueryFinalizedBundleResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.finalized_bundles !== undefined) { - FinalizedBundle.encode(message.finalized_bundles, writer.uint32(10).fork()).ldelim(); + if (message.pool_id !== "0") { + writer.uint32(8).uint64(message.pool_id); + } + if (message.id !== "0") { + writer.uint32(16).uint64(message.id); + } + if (message.storage_id !== "") { + writer.uint32(26).string(message.storage_id); + } + if (message.uploader !== "") { + writer.uint32(34).string(message.uploader); + } + if (message.from_index !== "0") { + writer.uint32(40).uint64(message.from_index); + } + if (message.to_index !== "0") { + writer.uint32(48).uint64(message.to_index); + } + if (message.from_key !== "") { + writer.uint32(90).string(message.from_key); + } + if (message.to_key !== "") { + writer.uint32(58).string(message.to_key); + } + if (message.bundle_summary !== "") { + writer.uint32(66).string(message.bundle_summary); + } + if (message.data_hash !== "") { + writer.uint32(74).string(message.data_hash); + } + if (message.finalized_at !== undefined) { + FinalizedAt.encode(message.finalized_at, writer.uint32(82).fork()).ldelim(); + } + if (message.storage_provider_id !== "0") { + writer.uint32(96).uint64(message.storage_provider_id); + } + if (message.compression_id !== "0") { + writer.uint32(104).uint64(message.compression_id); + } + if (message.stake_security !== undefined) { + StakeSecurity.encode(message.stake_security, writer.uint32(114).fork()).ldelim(); } return writer; }, @@ -858,11 +949,102 @@ export const QueryFinalizedBundleResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 10) { + if (tag !== 8) { + break; + } + + message.pool_id = longToString(reader.uint64() as Long); + continue; + case 2: + if (tag !== 16) { + break; + } + + message.id = longToString(reader.uint64() as Long); + continue; + case 3: + if (tag !== 26) { + break; + } + + message.storage_id = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + + message.uploader = reader.string(); + continue; + case 5: + if (tag !== 40) { + break; + } + + message.from_index = longToString(reader.uint64() as Long); + continue; + case 6: + if (tag !== 48) { break; } - message.finalized_bundles = FinalizedBundle.decode(reader, reader.uint32()); + message.to_index = longToString(reader.uint64() as Long); + continue; + case 11: + if (tag !== 90) { + break; + } + + message.from_key = reader.string(); + continue; + case 7: + if (tag !== 58) { + break; + } + + message.to_key = reader.string(); + continue; + case 8: + if (tag !== 66) { + break; + } + + message.bundle_summary = reader.string(); + continue; + case 9: + if (tag !== 74) { + break; + } + + message.data_hash = reader.string(); + continue; + case 10: + if (tag !== 82) { + break; + } + + message.finalized_at = FinalizedAt.decode(reader, reader.uint32()); + continue; + case 12: + if (tag !== 96) { + break; + } + + message.storage_provider_id = longToString(reader.uint64() as Long); + continue; + case 13: + if (tag !== 104) { + break; + } + + message.compression_id = longToString(reader.uint64() as Long); + continue; + case 14: + if (tag !== 114) { + break; + } + + message.stake_security = StakeSecurity.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -875,16 +1057,66 @@ export const QueryFinalizedBundleResponse = { fromJSON(object: any): QueryFinalizedBundleResponse { return { - finalized_bundles: isSet(object.finalized_bundles) - ? FinalizedBundle.fromJSON(object.finalized_bundles) - : undefined, + pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", + id: isSet(object.id) ? globalThis.String(object.id) : "0", + storage_id: isSet(object.storage_id) ? globalThis.String(object.storage_id) : "", + uploader: isSet(object.uploader) ? globalThis.String(object.uploader) : "", + from_index: isSet(object.from_index) ? globalThis.String(object.from_index) : "0", + to_index: isSet(object.to_index) ? globalThis.String(object.to_index) : "0", + from_key: isSet(object.from_key) ? globalThis.String(object.from_key) : "", + to_key: isSet(object.to_key) ? globalThis.String(object.to_key) : "", + bundle_summary: isSet(object.bundle_summary) ? globalThis.String(object.bundle_summary) : "", + data_hash: isSet(object.data_hash) ? globalThis.String(object.data_hash) : "", + finalized_at: isSet(object.finalized_at) ? FinalizedAt.fromJSON(object.finalized_at) : undefined, + storage_provider_id: isSet(object.storage_provider_id) ? globalThis.String(object.storage_provider_id) : "0", + compression_id: isSet(object.compression_id) ? globalThis.String(object.compression_id) : "0", + stake_security: isSet(object.stake_security) ? StakeSecurity.fromJSON(object.stake_security) : undefined, }; }, toJSON(message: QueryFinalizedBundleResponse): unknown { const obj: any = {}; - if (message.finalized_bundles !== undefined) { - obj.finalized_bundles = FinalizedBundle.toJSON(message.finalized_bundles); + if (message.pool_id !== "0") { + obj.pool_id = message.pool_id; + } + if (message.id !== "0") { + obj.id = message.id; + } + if (message.storage_id !== "") { + obj.storage_id = message.storage_id; + } + if (message.uploader !== "") { + obj.uploader = message.uploader; + } + if (message.from_index !== "0") { + obj.from_index = message.from_index; + } + if (message.to_index !== "0") { + obj.to_index = message.to_index; + } + if (message.from_key !== "") { + obj.from_key = message.from_key; + } + if (message.to_key !== "") { + obj.to_key = message.to_key; + } + if (message.bundle_summary !== "") { + obj.bundle_summary = message.bundle_summary; + } + if (message.data_hash !== "") { + obj.data_hash = message.data_hash; + } + if (message.finalized_at !== undefined) { + obj.finalized_at = FinalizedAt.toJSON(message.finalized_at); + } + if (message.storage_provider_id !== "0") { + obj.storage_provider_id = message.storage_provider_id; + } + if (message.compression_id !== "0") { + obj.compression_id = message.compression_id; + } + if (message.stake_security !== undefined) { + obj.stake_security = StakeSecurity.toJSON(message.stake_security); } return obj; }, @@ -894,8 +1126,23 @@ export const QueryFinalizedBundleResponse = { }, fromPartial, I>>(object: I): QueryFinalizedBundleResponse { const message = createBaseQueryFinalizedBundleResponse(); - message.finalized_bundles = (object.finalized_bundles !== undefined && object.finalized_bundles !== null) - ? FinalizedBundle.fromPartial(object.finalized_bundles) + message.pool_id = object.pool_id ?? "0"; + message.id = object.id ?? "0"; + message.storage_id = object.storage_id ?? ""; + message.uploader = object.uploader ?? ""; + message.from_index = object.from_index ?? "0"; + message.to_index = object.to_index ?? "0"; + message.from_key = object.from_key ?? ""; + message.to_key = object.to_key ?? ""; + message.bundle_summary = object.bundle_summary ?? ""; + message.data_hash = object.data_hash ?? ""; + message.finalized_at = (object.finalized_at !== undefined && object.finalized_at !== null) + ? FinalizedAt.fromPartial(object.finalized_at) + : undefined; + message.storage_provider_id = object.storage_provider_id ?? "0"; + message.compression_id = object.compression_id ?? "0"; + message.stake_security = (object.stake_security !== undefined && object.stake_security !== null) + ? StakeSecurity.fromPartial(object.stake_security) : undefined; return message; }, @@ -1146,7 +1393,7 @@ function createBaseQueryCanValidateResponse(): QueryCanValidateResponse { export const QueryCanValidateResponse = { encode(message: QueryCanValidateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1194,7 +1441,7 @@ export const QueryCanValidateResponse = { toJSON(message: QueryCanValidateResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1324,7 +1571,7 @@ function createBaseQueryCanProposeResponse(): QueryCanProposeResponse { export const QueryCanProposeResponse = { encode(message: QueryCanProposeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1372,7 +1619,7 @@ export const QueryCanProposeResponse = { toJSON(message: QueryCanProposeResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1502,7 +1749,7 @@ function createBaseQueryCanVoteResponse(): QueryCanVoteResponse { export const QueryCanVoteResponse = { encode(message: QueryCanVoteResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.possible === true) { + if (message.possible !== false) { writer.uint32(8).bool(message.possible); } if (message.reason !== "") { @@ -1550,7 +1797,7 @@ export const QueryCanVoteResponse = { toJSON(message: QueryCanVoteResponse): unknown { const obj: any = {}; - if (message.possible === true) { + if (message.possible !== false) { obj.possible = message.possible; } if (message.reason !== "") { @@ -1575,7 +1822,7 @@ export interface QueryBundles { /** FinalizedBundles ... */ FinalizedBundlesQuery(request: QueryFinalizedBundlesRequest): Promise; /** FinalizedBundle ... */ - FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise; + FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise; /** CurrentVoteStatus ... */ CurrentVoteStatus(request: QueryCurrentVoteStatusRequest): Promise; /** CanValidate ... */ @@ -1606,10 +1853,10 @@ export class QueryBundlesClientImpl implements QueryBundles { return promise.then((data) => QueryFinalizedBundlesResponse.decode(_m0.Reader.create(data))); } - FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise { + FinalizedBundleQuery(request: QueryFinalizedBundleRequest): Promise { const data = QueryFinalizedBundleRequest.encode(request).finish(); const promise = this.rpc.request(this.service, "FinalizedBundleQuery", data); - return promise.then((data) => FinalizedBundle.decode(_m0.Reader.create(data))); + return promise.then((data) => QueryFinalizedBundleResponse.decode(_m0.Reader.create(data))); } CurrentVoteStatus(request: QueryCurrentVoteStatusRequest): Promise { diff --git a/common/types/src/lcd/kyve/query/v1beta1/delegation.ts b/common/types/src/lcd/kyve/query/v1beta1/delegation.ts index 853a9025..39e5fe44 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/delegation.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/delegation.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/delegation.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { FullStaker } from "./query"; export const protobufPackage = "kyve.query.v1beta1"; @@ -24,8 +31,8 @@ export interface QueryDelegatorResponse { export interface StakerDelegatorResponse { /** delegator ... */ delegator: string; - /** current_reward ... */ - current_reward: string; + /** current_rewards ... */ + current_rewards: Coin[]; /** delegation_amount ... */ delegation_amount: string; /** staker ... */ @@ -80,8 +87,8 @@ export interface DelegationForStakerResponse { staker?: | FullStaker | undefined; - /** current_reward ... */ - current_reward: string; + /** current_rewards ... */ + current_rewards: Coin[]; /** delegation_amount ... */ delegation_amount: string; } @@ -220,7 +227,7 @@ export const QueryDelegatorResponse = { }; function createBaseStakerDelegatorResponse(): StakerDelegatorResponse { - return { delegator: "", current_reward: "0", delegation_amount: "0", staker: "" }; + return { delegator: "", current_rewards: [], delegation_amount: "0", staker: "" }; } export const StakerDelegatorResponse = { @@ -228,8 +235,8 @@ export const StakerDelegatorResponse = { if (message.delegator !== "") { writer.uint32(10).string(message.delegator); } - if (message.current_reward !== "0") { - writer.uint32(16).uint64(message.current_reward); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } if (message.delegation_amount !== "0") { writer.uint32(24).uint64(message.delegation_amount); @@ -254,12 +261,12 @@ export const StakerDelegatorResponse = { message.delegator = reader.string(); continue; - case 2: - if (tag !== 16) { + case 6: + if (tag !== 50) { break; } - message.current_reward = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -287,7 +294,9 @@ export const StakerDelegatorResponse = { fromJSON(object: any): StakerDelegatorResponse { return { delegator: isSet(object.delegator) ? globalThis.String(object.delegator) : "", - current_reward: isSet(object.current_reward) ? globalThis.String(object.current_reward) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], delegation_amount: isSet(object.delegation_amount) ? globalThis.String(object.delegation_amount) : "0", staker: isSet(object.staker) ? globalThis.String(object.staker) : "", }; @@ -298,8 +307,8 @@ export const StakerDelegatorResponse = { if (message.delegator !== "") { obj.delegator = message.delegator; } - if (message.current_reward !== "0") { - obj.current_reward = message.current_reward; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.delegation_amount !== "0") { obj.delegation_amount = message.delegation_amount; @@ -316,7 +325,7 @@ export const StakerDelegatorResponse = { fromPartial, I>>(object: I): StakerDelegatorResponse { const message = createBaseStakerDelegatorResponse(); message.delegator = object.delegator ?? ""; - message.current_reward = object.current_reward ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.delegation_amount = object.delegation_amount ?? "0"; message.staker = object.staker ?? ""; return message; @@ -687,7 +696,7 @@ export const QueryStakersByDelegatorResponse = { }; function createBaseDelegationForStakerResponse(): DelegationForStakerResponse { - return { staker: undefined, current_reward: "0", delegation_amount: "0" }; + return { staker: undefined, current_rewards: [], delegation_amount: "0" }; } export const DelegationForStakerResponse = { @@ -695,8 +704,8 @@ export const DelegationForStakerResponse = { if (message.staker !== undefined) { FullStaker.encode(message.staker, writer.uint32(10).fork()).ldelim(); } - if (message.current_reward !== "0") { - writer.uint32(16).uint64(message.current_reward); + for (const v of message.current_rewards) { + Coin.encode(v!, writer.uint32(50).fork()).ldelim(); } if (message.delegation_amount !== "0") { writer.uint32(24).uint64(message.delegation_amount); @@ -718,12 +727,12 @@ export const DelegationForStakerResponse = { message.staker = FullStaker.decode(reader, reader.uint32()); continue; - case 2: - if (tag !== 16) { + case 6: + if (tag !== 50) { break; } - message.current_reward = longToString(reader.uint64() as Long); + message.current_rewards.push(Coin.decode(reader, reader.uint32())); continue; case 3: if (tag !== 24) { @@ -744,7 +753,9 @@ export const DelegationForStakerResponse = { fromJSON(object: any): DelegationForStakerResponse { return { staker: isSet(object.staker) ? FullStaker.fromJSON(object.staker) : undefined, - current_reward: isSet(object.current_reward) ? globalThis.String(object.current_reward) : "0", + current_rewards: globalThis.Array.isArray(object?.current_rewards) + ? object.current_rewards.map((e: any) => Coin.fromJSON(e)) + : [], delegation_amount: isSet(object.delegation_amount) ? globalThis.String(object.delegation_amount) : "0", }; }, @@ -754,8 +765,8 @@ export const DelegationForStakerResponse = { if (message.staker !== undefined) { obj.staker = FullStaker.toJSON(message.staker); } - if (message.current_reward !== "0") { - obj.current_reward = message.current_reward; + if (message.current_rewards?.length) { + obj.current_rewards = message.current_rewards.map((e) => Coin.toJSON(e)); } if (message.delegation_amount !== "0") { obj.delegation_amount = message.delegation_amount; @@ -771,7 +782,7 @@ export const DelegationForStakerResponse = { message.staker = (object.staker !== undefined && object.staker !== null) ? FullStaker.fromPartial(object.staker) : undefined; - message.current_reward = object.current_reward ?? "0"; + message.current_rewards = object.current_rewards?.map((e) => Coin.fromPartial(e)) || []; message.delegation_amount = object.delegation_amount ?? "0"; return message; }, diff --git a/common/types/src/lcd/kyve/query/v1beta1/funders.ts b/common/types/src/lcd/kyve/query/v1beta1/funders.ts index 0e0cffa3..17469d21 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/funders.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/funders.ts @@ -1,7 +1,14 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/funders.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.query.v1beta1"; @@ -83,27 +90,43 @@ export interface Funder { /** FundingStats ... */ export interface FundingStats { /** total_used_funds are the total funds that have been distributed by the funder. */ - total_used_funds: string; - /** total_allocated_funds are the total funds that have been allocated by the funder. They can either get distributed or refunded. */ - total_allocated_funds: string; + total_used_funds: Coin[]; + /** + * total_allocated_funds are the total funds that have been allocated by the funder. + * They can either get distributed or refunded. + */ + total_allocated_funds: Coin[]; /** total_amount_per_bundle is the total amount per bundle of all fundings of the funder. */ - total_amount_per_bundle: string; + total_amount_per_bundle: Coin[]; /** pools_funded are the ids of the pools that have been funded by the funder. */ pools_funded: string[]; + /** + * score is the result of all coins of the funder currently allocated times the coin weight + * specified in the params + */ + score: string; } /** Funding ... */ export interface Funding { - /** funder_address */ + /** funder_id is the id of the funder */ funder_address: string; - /** pool_id ... */ + /** pool_id is the id of the pool this funding is for */ pool_id: string; - /** amount ... */ - amount: string; - /** amount_per_bundle ... */ - amount_per_bundle: string; - /** total_funded ... */ - total_funded: string; + /** amounts is a list of coins the funder wants to fund the pool with */ + amounts: Coin[]; + /** + * amounts_per_bundle defines the amount of each coin that are distributed + * per finalized bundle + */ + amounts_per_bundle: Coin[]; + /** total_funded is the total amount of coins that the funder has funded */ + total_funded: Coin[]; + /** + * score is the result of all coins allocated to this pool times the coin weight specified + * by the params + */ + score: string; } /** QueryFundersRequest is the request type for the Query/Funders RPC method. */ @@ -340,25 +363,28 @@ export const Funder = { }; function createBaseFundingStats(): FundingStats { - return { total_used_funds: "0", total_allocated_funds: "0", total_amount_per_bundle: "0", pools_funded: [] }; + return { total_used_funds: [], total_allocated_funds: [], total_amount_per_bundle: [], pools_funded: [], score: "0" }; } export const FundingStats = { encode(message: FundingStats, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.total_used_funds !== "0") { - writer.uint32(8).uint64(message.total_used_funds); + for (const v of message.total_used_funds) { + Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } - if (message.total_allocated_funds !== "0") { - writer.uint32(16).uint64(message.total_allocated_funds); + for (const v of message.total_allocated_funds) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } - if (message.total_amount_per_bundle !== "0") { - writer.uint32(24).uint64(message.total_amount_per_bundle); + for (const v of message.total_amount_per_bundle) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } writer.uint32(34).fork(); for (const v of message.pools_funded) { writer.uint64(v); } writer.ldelim(); + if (message.score !== "0") { + writer.uint32(40).uint64(message.score); + } return writer; }, @@ -370,25 +396,25 @@ export const FundingStats = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (tag !== 8) { + if (tag !== 10) { break; } - message.total_used_funds = longToString(reader.uint64() as Long); + message.total_used_funds.push(Coin.decode(reader, reader.uint32())); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.total_allocated_funds = longToString(reader.uint64() as Long); + message.total_allocated_funds.push(Coin.decode(reader, reader.uint32())); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.total_amount_per_bundle = longToString(reader.uint64() as Long); + message.total_amount_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 4: if (tag === 32) { @@ -407,6 +433,13 @@ export const FundingStats = { } break; + case 5: + if (tag !== 40) { + break; + } + + message.score = longToString(reader.uint64() as Long); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -418,33 +451,39 @@ export const FundingStats = { fromJSON(object: any): FundingStats { return { - total_used_funds: isSet(object.total_used_funds) ? globalThis.String(object.total_used_funds) : "0", - total_allocated_funds: isSet(object.total_allocated_funds) - ? globalThis.String(object.total_allocated_funds) - : "0", - total_amount_per_bundle: isSet(object.total_amount_per_bundle) - ? globalThis.String(object.total_amount_per_bundle) - : "0", + total_used_funds: globalThis.Array.isArray(object?.total_used_funds) + ? object.total_used_funds.map((e: any) => Coin.fromJSON(e)) + : [], + total_allocated_funds: globalThis.Array.isArray(object?.total_allocated_funds) + ? object.total_allocated_funds.map((e: any) => Coin.fromJSON(e)) + : [], + total_amount_per_bundle: globalThis.Array.isArray(object?.total_amount_per_bundle) + ? object.total_amount_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], pools_funded: globalThis.Array.isArray(object?.pools_funded) ? object.pools_funded.map((e: any) => globalThis.String(e)) : [], + score: isSet(object.score) ? globalThis.String(object.score) : "0", }; }, toJSON(message: FundingStats): unknown { const obj: any = {}; - if (message.total_used_funds !== "0") { - obj.total_used_funds = message.total_used_funds; + if (message.total_used_funds?.length) { + obj.total_used_funds = message.total_used_funds.map((e) => Coin.toJSON(e)); } - if (message.total_allocated_funds !== "0") { - obj.total_allocated_funds = message.total_allocated_funds; + if (message.total_allocated_funds?.length) { + obj.total_allocated_funds = message.total_allocated_funds.map((e) => Coin.toJSON(e)); } - if (message.total_amount_per_bundle !== "0") { - obj.total_amount_per_bundle = message.total_amount_per_bundle; + if (message.total_amount_per_bundle?.length) { + obj.total_amount_per_bundle = message.total_amount_per_bundle.map((e) => Coin.toJSON(e)); } if (message.pools_funded?.length) { obj.pools_funded = message.pools_funded; } + if (message.score !== "0") { + obj.score = message.score; + } return obj; }, @@ -453,16 +492,17 @@ export const FundingStats = { }, fromPartial, I>>(object: I): FundingStats { const message = createBaseFundingStats(); - message.total_used_funds = object.total_used_funds ?? "0"; - message.total_allocated_funds = object.total_allocated_funds ?? "0"; - message.total_amount_per_bundle = object.total_amount_per_bundle ?? "0"; + message.total_used_funds = object.total_used_funds?.map((e) => Coin.fromPartial(e)) || []; + message.total_allocated_funds = object.total_allocated_funds?.map((e) => Coin.fromPartial(e)) || []; + message.total_amount_per_bundle = object.total_amount_per_bundle?.map((e) => Coin.fromPartial(e)) || []; message.pools_funded = object.pools_funded?.map((e) => e) || []; + message.score = object.score ?? "0"; return message; }, }; function createBaseFunding(): Funding { - return { funder_address: "", pool_id: "0", amount: "0", amount_per_bundle: "0", total_funded: "0" }; + return { funder_address: "", pool_id: "0", amounts: [], amounts_per_bundle: [], total_funded: [], score: "0" }; } export const Funding = { @@ -473,14 +513,17 @@ export const Funding = { if (message.pool_id !== "0") { writer.uint32(16).uint64(message.pool_id); } - if (message.amount !== "0") { - writer.uint32(24).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } - if (message.amount_per_bundle !== "0") { - writer.uint32(32).uint64(message.amount_per_bundle); + for (const v of message.amounts_per_bundle) { + Coin.encode(v!, writer.uint32(34).fork()).ldelim(); } - if (message.total_funded !== "0") { - writer.uint32(40).uint64(message.total_funded); + for (const v of message.total_funded) { + Coin.encode(v!, writer.uint32(42).fork()).ldelim(); + } + if (message.score !== "0") { + writer.uint32(48).uint64(message.score); } return writer; }, @@ -507,25 +550,32 @@ export const Funding = { message.pool_id = longToString(reader.uint64() as Long); continue; case 3: - if (tag !== 24) { + if (tag !== 26) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; case 4: - if (tag !== 32) { + if (tag !== 34) { break; } - message.amount_per_bundle = longToString(reader.uint64() as Long); + message.amounts_per_bundle.push(Coin.decode(reader, reader.uint32())); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.total_funded = longToString(reader.uint64() as Long); + message.total_funded.push(Coin.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 48) { + break; + } + + message.score = longToString(reader.uint64() as Long); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -540,9 +590,14 @@ export const Funding = { return { funder_address: isSet(object.funder_address) ? globalThis.String(object.funder_address) : "", pool_id: isSet(object.pool_id) ? globalThis.String(object.pool_id) : "0", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", - amount_per_bundle: isSet(object.amount_per_bundle) ? globalThis.String(object.amount_per_bundle) : "0", - total_funded: isSet(object.total_funded) ? globalThis.String(object.total_funded) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], + amounts_per_bundle: globalThis.Array.isArray(object?.amounts_per_bundle) + ? object.amounts_per_bundle.map((e: any) => Coin.fromJSON(e)) + : [], + total_funded: globalThis.Array.isArray(object?.total_funded) + ? object.total_funded.map((e: any) => Coin.fromJSON(e)) + : [], + score: isSet(object.score) ? globalThis.String(object.score) : "0", }; }, @@ -554,14 +609,17 @@ export const Funding = { if (message.pool_id !== "0") { obj.pool_id = message.pool_id; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); + } + if (message.amounts_per_bundle?.length) { + obj.amounts_per_bundle = message.amounts_per_bundle.map((e) => Coin.toJSON(e)); } - if (message.amount_per_bundle !== "0") { - obj.amount_per_bundle = message.amount_per_bundle; + if (message.total_funded?.length) { + obj.total_funded = message.total_funded.map((e) => Coin.toJSON(e)); } - if (message.total_funded !== "0") { - obj.total_funded = message.total_funded; + if (message.score !== "0") { + obj.score = message.score; } return obj; }, @@ -573,9 +631,10 @@ export const Funding = { const message = createBaseFunding(); message.funder_address = object.funder_address ?? ""; message.pool_id = object.pool_id ?? "0"; - message.amount = object.amount ?? "0"; - message.amount_per_bundle = object.amount_per_bundle ?? "0"; - message.total_funded = object.total_funded ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; + message.amounts_per_bundle = object.amounts_per_bundle?.map((e) => Coin.fromPartial(e)) || []; + message.total_funded = object.total_funded?.map((e) => Coin.fromPartial(e)) || []; + message.score = object.score ?? "0"; return message; }, }; diff --git a/common/types/src/lcd/kyve/query/v1beta1/params.ts b/common/types/src/lcd/kyve/query/v1beta1/params.ts index e9655f6b..cdd2a5ec 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/params.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params as Params3 } from "../../../cosmos/gov/v1/gov"; diff --git a/common/types/src/lcd/kyve/query/v1beta1/pools.ts b/common/types/src/lcd/kyve/query/v1beta1/pools.ts index 085151ff..d0787094 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/pools.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/pools.ts @@ -1,8 +1,15 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/pools.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BundleProposal } from "../../bundles/v1beta1/bundles"; +import { Funding } from "../../funders/v1beta1/funders"; import { Pool, PoolStatus, poolStatusFromJSON, poolStatusToJSON, poolStatusToNumber } from "../../pool/v1beta1/pool"; export const protobufPackage = "kyve.query.v1beta1"; @@ -55,6 +62,8 @@ export interface PoolResponse { account: string; /** account_balance ... */ account_balance: string; + /** funders ... */ + fundings: Funding[]; } /** QueryPoolRequest is the request type for the Query/Pool RPC method. */ @@ -84,7 +93,7 @@ export const QueryPoolsRequest = { if (message.runtime !== "") { writer.uint32(26).string(message.runtime); } - if (message.disabled === true) { + if (message.disabled !== false) { writer.uint32(32).bool(message.disabled); } if (message.storage_provider_id !== 0) { @@ -165,7 +174,7 @@ export const QueryPoolsRequest = { if (message.runtime !== "") { obj.runtime = message.runtime; } - if (message.disabled === true) { + if (message.disabled !== false) { obj.disabled = message.disabled; } if (message.storage_provider_id !== 0) { @@ -277,6 +286,7 @@ function createBasePoolResponse(): PoolResponse { status: PoolStatus.POOL_STATUS_UNSPECIFIED, account: "", account_balance: "0", + fundings: [], }; } @@ -309,6 +319,9 @@ export const PoolResponse = { if (message.account_balance !== "0") { writer.uint32(72).uint64(message.account_balance); } + for (const v of message.fundings) { + Funding.encode(v!, writer.uint32(82).fork()).ldelim(); + } return writer; }, @@ -382,6 +395,13 @@ export const PoolResponse = { message.account_balance = longToString(reader.uint64() as Long); continue; + case 10: + if (tag !== 82) { + break; + } + + message.fundings.push(Funding.decode(reader, reader.uint32())); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -404,6 +424,7 @@ export const PoolResponse = { status: isSet(object.status) ? poolStatusFromJSON(object.status) : PoolStatus.POOL_STATUS_UNSPECIFIED, account: isSet(object.account) ? globalThis.String(object.account) : "", account_balance: isSet(object.account_balance) ? globalThis.String(object.account_balance) : "0", + fundings: globalThis.Array.isArray(object?.fundings) ? object.fundings.map((e: any) => Funding.fromJSON(e)) : [], }; }, @@ -436,6 +457,9 @@ export const PoolResponse = { if (message.account_balance !== "0") { obj.account_balance = message.account_balance; } + if (message.fundings?.length) { + obj.fundings = message.fundings.map((e) => Funding.toJSON(e)); + } return obj; }, @@ -455,6 +479,7 @@ export const PoolResponse = { message.status = object.status ?? PoolStatus.POOL_STATUS_UNSPECIFIED; message.account = object.account ?? ""; message.account_balance = object.account_balance ?? "0"; + message.fundings = object.fundings?.map((e) => Funding.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/lcd/kyve/query/v1beta1/query.ts b/common/types/src/lcd/kyve/query/v1beta1/query.ts index fd7bfccc..d8d50815 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/query.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/query.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { PoolStatus, poolStatusFromJSON, poolStatusToJSON, poolStatusToNumber } from "../../pool/v1beta1/pool"; export const protobufPackage = "kyve.query.v1beta1"; @@ -29,7 +36,7 @@ export interface BasicPool { * total_funds of the pool. If the pool runs * out of funds no more bundles will be produced */ - total_funds: string; + total_funds: Coin[]; /** total_delegation of the pool */ total_delegation: string; /** @@ -110,8 +117,8 @@ export interface StakerMetadata { pending_commission_change?: | CommissionChangeEntry | undefined; - /** commission_rewards are the rewards in $KYVE earned through commission */ - commission_rewards: string; + /** commission_rewards are the rewards through commission and storage cost */ + commission_rewards: Coin[]; } /** @@ -173,9 +180,9 @@ function createBaseBasicPool(): BasicPool { name: "", runtime: "", logo: "", - inflation_share_weight: "0", + inflation_share_weight: "", upload_interval: "0", - total_funds: "0", + total_funds: [], total_delegation: "0", status: PoolStatus.POOL_STATUS_UNSPECIFIED, }; @@ -195,14 +202,14 @@ export const BasicPool = { if (message.logo !== "") { writer.uint32(34).string(message.logo); } - if (message.inflation_share_weight !== "0") { - writer.uint32(40).uint64(message.inflation_share_weight); + if (message.inflation_share_weight !== "") { + writer.uint32(42).string(message.inflation_share_weight); } if (message.upload_interval !== "0") { writer.uint32(48).uint64(message.upload_interval); } - if (message.total_funds !== "0") { - writer.uint32(56).uint64(message.total_funds); + for (const v of message.total_funds) { + Coin.encode(v!, writer.uint32(58).fork()).ldelim(); } if (message.total_delegation !== "0") { writer.uint32(64).uint64(message.total_delegation); @@ -249,11 +256,11 @@ export const BasicPool = { message.logo = reader.string(); continue; case 5: - if (tag !== 40) { + if (tag !== 42) { break; } - message.inflation_share_weight = longToString(reader.uint64() as Long); + message.inflation_share_weight = reader.string(); continue; case 6: if (tag !== 48) { @@ -263,11 +270,11 @@ export const BasicPool = { message.upload_interval = longToString(reader.uint64() as Long); continue; case 7: - if (tag !== 56) { + if (tag !== 58) { break; } - message.total_funds = longToString(reader.uint64() as Long); + message.total_funds.push(Coin.decode(reader, reader.uint32())); continue; case 8: if (tag !== 64) { @@ -300,9 +307,11 @@ export const BasicPool = { logo: isSet(object.logo) ? globalThis.String(object.logo) : "", inflation_share_weight: isSet(object.inflation_share_weight) ? globalThis.String(object.inflation_share_weight) - : "0", + : "", upload_interval: isSet(object.upload_interval) ? globalThis.String(object.upload_interval) : "0", - total_funds: isSet(object.total_funds) ? globalThis.String(object.total_funds) : "0", + total_funds: globalThis.Array.isArray(object?.total_funds) + ? object.total_funds.map((e: any) => Coin.fromJSON(e)) + : [], total_delegation: isSet(object.total_delegation) ? globalThis.String(object.total_delegation) : "0", status: isSet(object.status) ? poolStatusFromJSON(object.status) : PoolStatus.POOL_STATUS_UNSPECIFIED, }; @@ -322,14 +331,14 @@ export const BasicPool = { if (message.logo !== "") { obj.logo = message.logo; } - if (message.inflation_share_weight !== "0") { + if (message.inflation_share_weight !== "") { obj.inflation_share_weight = message.inflation_share_weight; } if (message.upload_interval !== "0") { obj.upload_interval = message.upload_interval; } - if (message.total_funds !== "0") { - obj.total_funds = message.total_funds; + if (message.total_funds?.length) { + obj.total_funds = message.total_funds.map((e) => Coin.toJSON(e)); } if (message.total_delegation !== "0") { obj.total_delegation = message.total_delegation; @@ -349,9 +358,9 @@ export const BasicPool = { message.name = object.name ?? ""; message.runtime = object.runtime ?? ""; message.logo = object.logo ?? ""; - message.inflation_share_weight = object.inflation_share_weight ?? "0"; + message.inflation_share_weight = object.inflation_share_weight ?? ""; message.upload_interval = object.upload_interval ?? "0"; - message.total_funds = object.total_funds ?? "0"; + message.total_funds = object.total_funds?.map((e) => Coin.fromPartial(e)) || []; message.total_delegation = object.total_delegation ?? "0"; message.status = object.status ?? PoolStatus.POOL_STATUS_UNSPECIFIED; return message; @@ -528,7 +537,7 @@ function createBaseStakerMetadata(): StakerMetadata { security_contact: "", details: "", pending_commission_change: undefined, - commission_rewards: "0", + commission_rewards: [], }; } @@ -555,8 +564,8 @@ export const StakerMetadata = { if (message.pending_commission_change !== undefined) { CommissionChangeEntry.encode(message.pending_commission_change, writer.uint32(58).fork()).ldelim(); } - if (message.commission_rewards !== "0") { - writer.uint32(64).uint64(message.commission_rewards); + for (const v of message.commission_rewards) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); } return writer; }, @@ -618,11 +627,11 @@ export const StakerMetadata = { message.pending_commission_change = CommissionChangeEntry.decode(reader, reader.uint32()); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.commission_rewards = longToString(reader.uint64() as Long); + message.commission_rewards.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -644,7 +653,9 @@ export const StakerMetadata = { pending_commission_change: isSet(object.pending_commission_change) ? CommissionChangeEntry.fromJSON(object.pending_commission_change) : undefined, - commission_rewards: isSet(object.commission_rewards) ? globalThis.String(object.commission_rewards) : "0", + commission_rewards: globalThis.Array.isArray(object?.commission_rewards) + ? object.commission_rewards.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -671,8 +682,8 @@ export const StakerMetadata = { if (message.pending_commission_change !== undefined) { obj.pending_commission_change = CommissionChangeEntry.toJSON(message.pending_commission_change); } - if (message.commission_rewards !== "0") { - obj.commission_rewards = message.commission_rewards; + if (message.commission_rewards?.length) { + obj.commission_rewards = message.commission_rewards.map((e) => Coin.toJSON(e)); } return obj; }, @@ -692,7 +703,7 @@ export const StakerMetadata = { (object.pending_commission_change !== undefined && object.pending_commission_change !== null) ? CommissionChangeEntry.fromPartial(object.pending_commission_change) : undefined; - message.commission_rewards = object.commission_rewards ?? "0"; + message.commission_rewards = object.commission_rewards?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -783,7 +794,7 @@ export const PoolMembership = { if (message.points !== "0") { writer.uint32(16).uint64(message.points); } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { writer.uint32(24).bool(message.is_leaving); } if (message.valaddress !== "") { @@ -864,7 +875,7 @@ export const PoolMembership = { if (message.points !== "0") { obj.points = message.points; } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { obj.is_leaving = message.is_leaving; } if (message.valaddress !== "") { diff --git a/common/types/src/lcd/kyve/query/v1beta1/stakers.ts b/common/types/src/lcd/kyve/query/v1beta1/stakers.ts index 54e64955..f21ff8f2 100644 --- a/common/types/src/lcd/kyve/query/v1beta1/stakers.ts +++ b/common/types/src/lcd/kyve/query/v1beta1/stakers.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/query/v1beta1/stakers.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/stakers/module/module.ts b/common/types/src/lcd/kyve/stakers/module/module.ts new file mode 100644 index 00000000..8848d210 --- /dev/null +++ b/common/types/src/lcd/kyve/stakers/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.stakers.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/events.ts b/common/types/src/lcd/kyve/stakers/v1beta1/events.ts index 71eed8b1..e61d6df4 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; @@ -72,8 +78,8 @@ export interface EventUpdateCommission { export interface EventClaimCommissionRewards { /** staker is the account address of the protocol node. */ staker: string; - /** amount ... */ - amount: string; + /** amounts is the amount of the commission rewards claimed */ + amounts: string; } /** @@ -496,7 +502,7 @@ export const EventUpdateCommission = { }; function createBaseEventClaimCommissionRewards(): EventClaimCommissionRewards { - return { staker: "", amount: "0" }; + return { staker: "", amounts: "" }; } export const EventClaimCommissionRewards = { @@ -504,8 +510,8 @@ export const EventClaimCommissionRewards = { if (message.staker !== "") { writer.uint32(10).string(message.staker); } - if (message.amount !== "0") { - writer.uint32(16).uint64(message.amount); + if (message.amounts !== "") { + writer.uint32(18).string(message.amounts); } return writer; }, @@ -525,11 +531,11 @@ export const EventClaimCommissionRewards = { message.staker = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -543,7 +549,7 @@ export const EventClaimCommissionRewards = { fromJSON(object: any): EventClaimCommissionRewards { return { staker: isSet(object.staker) ? globalThis.String(object.staker) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: isSet(object.amounts) ? globalThis.String(object.amounts) : "", }; }, @@ -552,8 +558,8 @@ export const EventClaimCommissionRewards = { if (message.staker !== "") { obj.staker = message.staker; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts !== "") { + obj.amounts = message.amounts; } return obj; }, @@ -564,7 +570,7 @@ export const EventClaimCommissionRewards = { fromPartial, I>>(object: I): EventClaimCommissionRewards { const message = createBaseEventClaimCommissionRewards(); message.staker = object.staker ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts ?? ""; return message; }, }; diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/genesis.ts b/common/types/src/lcd/kyve/stakers/v1beta1/genesis.ts index 43c09bab..c9eecdf9 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/genesis.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/params.ts b/common/types/src/lcd/kyve/stakers/v1beta1/params.ts index fdd4bcdc..15a53283 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/params.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/params.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/params.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/query.ts b/common/types/src/lcd/kyve/stakers/v1beta1/query.ts index 99186d74..3dc7c9b9 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/query.proto + /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { Params } from "./params"; diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/stakers.ts b/common/types/src/lcd/kyve/stakers/v1beta1/stakers.ts index 2ea1decc..258b0a80 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/stakers.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/stakers.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/stakers.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.stakers.v1beta1"; @@ -23,8 +30,8 @@ export interface Staker { security_contact: string; /** details are some additional notes the staker finds important */ details: string; - /** commission_rewards are the rewards in $KYVE earned through commission */ - commission_rewards: string; + /** commission_rewards are the rewards through commission and storage cost */ + commission_rewards: Coin[]; } /** @@ -128,7 +135,7 @@ function createBaseStaker(): Staker { identity: "", security_contact: "", details: "", - commission_rewards: "0", + commission_rewards: [], }; } @@ -155,8 +162,8 @@ export const Staker = { if (message.details !== "") { writer.uint32(58).string(message.details); } - if (message.commission_rewards !== "0") { - writer.uint32(64).uint64(message.commission_rewards); + for (const v of message.commission_rewards) { + Coin.encode(v!, writer.uint32(66).fork()).ldelim(); } return writer; }, @@ -218,11 +225,11 @@ export const Staker = { message.details = reader.string(); continue; case 8: - if (tag !== 64) { + if (tag !== 66) { break; } - message.commission_rewards = longToString(reader.uint64() as Long); + message.commission_rewards.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -242,7 +249,9 @@ export const Staker = { identity: isSet(object.identity) ? globalThis.String(object.identity) : "", security_contact: isSet(object.security_contact) ? globalThis.String(object.security_contact) : "", details: isSet(object.details) ? globalThis.String(object.details) : "", - commission_rewards: isSet(object.commission_rewards) ? globalThis.String(object.commission_rewards) : "0", + commission_rewards: globalThis.Array.isArray(object?.commission_rewards) + ? object.commission_rewards.map((e: any) => Coin.fromJSON(e)) + : [], }; }, @@ -269,8 +278,8 @@ export const Staker = { if (message.details !== "") { obj.details = message.details; } - if (message.commission_rewards !== "0") { - obj.commission_rewards = message.commission_rewards; + if (message.commission_rewards?.length) { + obj.commission_rewards = message.commission_rewards.map((e) => Coin.toJSON(e)); } return obj; }, @@ -287,7 +296,7 @@ export const Staker = { message.identity = object.identity ?? ""; message.security_contact = object.security_contact ?? ""; message.details = object.details ?? ""; - message.commission_rewards = object.commission_rewards ?? "0"; + message.commission_rewards = object.commission_rewards?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; @@ -310,7 +319,7 @@ export const Valaccount = { if (message.points !== "0") { writer.uint32(32).uint64(message.points); } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { writer.uint32(40).bool(message.is_leaving); } return writer; @@ -391,7 +400,7 @@ export const Valaccount = { if (message.points !== "0") { obj.points = message.points; } - if (message.is_leaving === true) { + if (message.is_leaving !== false) { obj.is_leaving = message.is_leaving; } return obj; diff --git a/common/types/src/lcd/kyve/stakers/v1beta1/tx.ts b/common/types/src/lcd/kyve/stakers/v1beta1/tx.ts index c5e641ad..f7e98a4e 100644 --- a/common/types/src/lcd/kyve/stakers/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/stakers/v1beta1/tx.ts @@ -1,6 +1,13 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/stakers/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "kyve.stakers.v1beta1"; @@ -57,8 +64,8 @@ export interface MsgUpdateCommissionResponse { export interface MsgClaimCommissionRewards { /** creator ... */ creator: string; - /** amount ... */ - amount: string; + /** amounts ... */ + amounts: Coin[]; } /** MsgClaimCommissionRewardsResponse ... */ @@ -532,7 +539,7 @@ export const MsgUpdateCommissionResponse = { }; function createBaseMsgClaimCommissionRewards(): MsgClaimCommissionRewards { - return { creator: "", amount: "0" }; + return { creator: "", amounts: [] }; } export const MsgClaimCommissionRewards = { @@ -540,8 +547,8 @@ export const MsgClaimCommissionRewards = { if (message.creator !== "") { writer.uint32(10).string(message.creator); } - if (message.amount !== "0") { - writer.uint32(16).uint64(message.amount); + for (const v of message.amounts) { + Coin.encode(v!, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -561,11 +568,11 @@ export const MsgClaimCommissionRewards = { message.creator = reader.string(); continue; case 2: - if (tag !== 16) { + if (tag !== 18) { break; } - message.amount = longToString(reader.uint64() as Long); + message.amounts.push(Coin.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -579,7 +586,7 @@ export const MsgClaimCommissionRewards = { fromJSON(object: any): MsgClaimCommissionRewards { return { creator: isSet(object.creator) ? globalThis.String(object.creator) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "0", + amounts: globalThis.Array.isArray(object?.amounts) ? object.amounts.map((e: any) => Coin.fromJSON(e)) : [], }; }, @@ -588,8 +595,8 @@ export const MsgClaimCommissionRewards = { if (message.creator !== "") { obj.creator = message.creator; } - if (message.amount !== "0") { - obj.amount = message.amount; + if (message.amounts?.length) { + obj.amounts = message.amounts.map((e) => Coin.toJSON(e)); } return obj; }, @@ -600,7 +607,7 @@ export const MsgClaimCommissionRewards = { fromPartial, I>>(object: I): MsgClaimCommissionRewards { const message = createBaseMsgClaimCommissionRewards(); message.creator = object.creator ?? ""; - message.amount = object.amount ?? "0"; + message.amounts = object.amounts?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; diff --git a/common/types/src/lcd/kyve/team/module/module.ts b/common/types/src/lcd/kyve/team/module/module.ts new file mode 100644 index 00000000..f4c0c974 --- /dev/null +++ b/common/types/src/lcd/kyve/team/module/module.ts @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/module/module.proto + +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "kyve.team.module"; + +/** Module is the config object for the module. */ +export interface Module { + /** authority defines the custom module authority. If not set, defaults to the governance module. */ + authority: string; +} + +function createBaseModule(): Module { + return { authority: "" }; +} + +export const Module = { + encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Module { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModule(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.authority = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Module { + return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; + }, + + toJSON(message: Module): unknown { + const obj: any = {}; + if (message.authority !== "") { + obj.authority = message.authority; + } + return obj; + }, + + create, I>>(base?: I): Module { + return Module.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Module { + const message = createBaseModule(); + message.authority = object.authority ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/common/types/src/lcd/kyve/team/v1beta1/events.ts b/common/types/src/lcd/kyve/team/v1beta1/events.ts index 30dbe829..75994fac 100644 --- a/common/types/src/lcd/kyve/team/v1beta1/events.ts +++ b/common/types/src/lcd/kyve/team/v1beta1/events.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/events.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/team/v1beta1/genesis.ts b/common/types/src/lcd/kyve/team/v1beta1/genesis.ts index 7f61d5e0..3e2b74ce 100644 --- a/common/types/src/lcd/kyve/team/v1beta1/genesis.ts +++ b/common/types/src/lcd/kyve/team/v1beta1/genesis.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/genesis.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/team/v1beta1/query.ts b/common/types/src/lcd/kyve/team/v1beta1/query.ts index aac3427b..df9c4533 100644 --- a/common/types/src/lcd/kyve/team/v1beta1/query.ts +++ b/common/types/src/lcd/kyve/team/v1beta1/query.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/query.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/team/v1beta1/team.ts b/common/types/src/lcd/kyve/team/v1beta1/team.ts index 34e956ac..4e1ecf26 100644 --- a/common/types/src/lcd/kyve/team/v1beta1/team.ts +++ b/common/types/src/lcd/kyve/team/v1beta1/team.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/team.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/lcd/kyve/team/v1beta1/tx.ts b/common/types/src/lcd/kyve/team/v1beta1/tx.ts index cfc7ff57..19fd3bb6 100644 --- a/common/types/src/lcd/kyve/team/v1beta1/tx.ts +++ b/common/types/src/lcd/kyve/team/v1beta1/tx.ts @@ -1,3 +1,9 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.178.0 +// protoc unknown +// source: kyve/team/v1beta1/tx.proto + /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; diff --git a/common/types/src/version.ts b/common/types/src/version.ts index 313a69b4..27bca32e 100644 --- a/common/types/src/version.ts +++ b/common/types/src/version.ts @@ -1 +1 @@ -export const version = "v1.4.0" +export const version = "main" diff --git a/integrations/tendermint-bsync/package.json b/integrations/tendermint-bsync/package.json index af477532..6908793e 100644 --- a/integrations/tendermint-bsync/package.json +++ b/integrations/tendermint-bsync/package.json @@ -23,6 +23,7 @@ }, "dependencies": { "@kyvejs/protocol": "1.1.7", + "@kyvejs/sdk": "1.2.0", "axios": "^0.27.2" }, "devDependencies": { diff --git a/integrations/tendermint-bsync/src/runtime.ts b/integrations/tendermint-bsync/src/runtime.ts index c3797cfe..afa151fa 100644 --- a/integrations/tendermint-bsync/src/runtime.ts +++ b/integrations/tendermint-bsync/src/runtime.ts @@ -1,6 +1,8 @@ import { DataItem, IRuntime, Validator, VOTE } from '@kyvejs/protocol'; import { name, version } from '../package.json'; import axios from 'axios'; +import { createHashesFromTendermintBundle } from './utils/merkle'; +import { generateMerkleRoot } from '@kyvejs/sdk'; // TendermintBSync config interface IConfig { @@ -82,8 +84,12 @@ export default class TendermintBSync implements IRuntime { } async summarizeDataBundle(_: Validator, bundle: DataItem[]): Promise { - // use latest block height as bundle summary - return bundle.at(-1)?.value?.header?.height ?? ''; + const hashes: Uint8Array[] = createHashesFromTendermintBundle(bundle); + const merkleRoot: Uint8Array = generateMerkleRoot(hashes); + + return JSON.stringify({ + merkle_root: Buffer.from(merkleRoot).toString('hex'), + }); } async nextKey(_: Validator, key: string): Promise { diff --git a/integrations/tendermint-bsync/src/utils/merkle.ts b/integrations/tendermint-bsync/src/utils/merkle.ts new file mode 100644 index 00000000..579e6bcf --- /dev/null +++ b/integrations/tendermint-bsync/src/utils/merkle.ts @@ -0,0 +1,30 @@ +import * as crypto from '@cosmjs/crypto'; +import { dataItemToSha256, generateMerkleRoot } from '@kyvejs/sdk'; + +// Creates an Array of hashes from an array of data items (bundle). +// The hash of a data item consists of the Merkle root from the block and the block +// results (only two leafs) and the key of the data item. This allows the +// Trustless API to serve block and block results independently. +export function createHashesFromTendermintBundle(bundle: any[]): Uint8Array[] { + return bundle.map((dataItem) => { + const blockHashes: Uint8Array[] = [ + dataItemToSha256(dataItem.value?.block), + dataItemToSha256(dataItem.value?.block_results), + ]; + + const merkleRoot: Uint8Array = generateMerkleRoot(blockHashes); + + return tendermintDataItemToSha256(dataItem.key, merkleRoot); + }); +} + +function tendermintDataItemToSha256( + key: string, + merkleRoot: Uint8Array +): Uint8Array { + const keyBytes = crypto.sha256(Buffer.from(key, 'utf-8')); + + const combined = Buffer.concat([keyBytes, merkleRoot]); + + return crypto.sha256(combined); +} diff --git a/integrations/tendermint/package.json b/integrations/tendermint/package.json index 9bde4a1e..7598c155 100644 --- a/integrations/tendermint/package.json +++ b/integrations/tendermint/package.json @@ -23,6 +23,7 @@ }, "dependencies": { "@kyvejs/protocol": "1.1.7", + "@kyvejs/sdk": "1.2.0", "ajv": "^8.12.0", "axios": "^0.27.2", "dotenv": "^16.3.1" diff --git a/integrations/tendermint/src/runtime.ts b/integrations/tendermint/src/runtime.ts index da60d30e..1248908f 100644 --- a/integrations/tendermint/src/runtime.ts +++ b/integrations/tendermint/src/runtime.ts @@ -4,6 +4,8 @@ import axios from 'axios'; import Ajv from 'ajv'; import block_schema from './schemas/block.json'; import block_results_schema from './schemas/block_result.json'; +import { createHashesFromTendermintBundle } from './utils/merkle'; +import { generateMerkleRoot } from '@kyvejs/sdk'; const ajv = new Ajv(); @@ -105,7 +107,9 @@ export default class Tendermint implements IRuntime { if (!block_validate(item.value.block)) { throw new Error( - `Block schema validation failed: ${block_validate.errors}` + `Block schema validation failed: ${JSON.stringify( + block_validate.errors + )}` ); } @@ -114,10 +118,40 @@ export default class Tendermint implements IRuntime { if (!block_results_validate(item.value.block_results)) { throw new Error( - `Block results schema validation failed: ${block_results_validate.errors}` + `Block results schema validation failed: ${JSON.stringify( + block_results_validate.errors + )}` ); } + // check if finalize_block_events are present if every event attribute + // has a mode and that every mode attribute is either of value + // "BeginBlock" or "EndBlock" + if (item.value.block_results.finalize_block_events) { + for (const event of item.value.block_results.finalize_block_events) { + const modeAttribute = event.attributes.find( + (attribute: any) => attribute.key === 'mode' + ); + + if (!modeAttribute) { + throw new Error( + `finalize_block_events contains events with no "mode" in ${event.type}` + ); + } + + if ( + modeAttribute.value !== 'BeginBlock' && + modeAttribute.value !== 'EndBlock' + ) { + throw new Error( + `finalize_block_events contains invalid mode in ${ + event.type + }: ${JSON.stringify(modeAttribute)}` + ); + } + } + } + return true; } @@ -236,8 +270,12 @@ export default class Tendermint implements IRuntime { } async summarizeDataBundle(_: Validator, bundle: DataItem[]): Promise { - // use latest block height as bundle summary - return bundle.at(-1)?.value?.block?.block?.header?.height ?? ''; + const hashes: Uint8Array[] = createHashesFromTendermintBundle(bundle); + const merkleRoot: Uint8Array = generateMerkleRoot(hashes); + + return JSON.stringify({ + merkle_root: Buffer.from(merkleRoot).toString('hex'), + }); } async nextKey(_: Validator, key: string): Promise { diff --git a/integrations/tendermint/src/schemas/block_result.json b/integrations/tendermint/src/schemas/block_result.json index ed672b91..adcebb2e 100644 --- a/integrations/tendermint/src/schemas/block_result.json +++ b/integrations/tendermint/src/schemas/block_result.json @@ -80,7 +80,7 @@ ] }, "begin_block_events": { - "type": ["array", "null"], + "type": ["array"], "items": [ { "type": "object", @@ -147,6 +147,40 @@ } ] }, + "finalize_block_events": { + "type": ["array"], + "items": [ + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": ["string", "null"] + }, + "index": { + "type": "boolean" + } + }, + "required": ["key", "value", "index"] + } + ] + } + }, + "required": ["type", "attributes"] + } + ] + }, "validator_updates": { "type": ["array", "null"], "items": [ @@ -231,15 +265,14 @@ } }, "required": ["block", "evidence", "validator"] - } + }, + "event_plaintext": { "type": "boolean" } }, "required": [ "height", "txs_results", - "begin_block_events", - "end_block_events", "validator_updates", "consensus_param_updates" ], - "additionalProperties": false + "additionalProperties": true } diff --git a/integrations/tendermint/src/utils/merkle.ts b/integrations/tendermint/src/utils/merkle.ts new file mode 100644 index 00000000..579e6bcf --- /dev/null +++ b/integrations/tendermint/src/utils/merkle.ts @@ -0,0 +1,30 @@ +import * as crypto from '@cosmjs/crypto'; +import { dataItemToSha256, generateMerkleRoot } from '@kyvejs/sdk'; + +// Creates an Array of hashes from an array of data items (bundle). +// The hash of a data item consists of the Merkle root from the block and the block +// results (only two leafs) and the key of the data item. This allows the +// Trustless API to serve block and block results independently. +export function createHashesFromTendermintBundle(bundle: any[]): Uint8Array[] { + return bundle.map((dataItem) => { + const blockHashes: Uint8Array[] = [ + dataItemToSha256(dataItem.value?.block), + dataItemToSha256(dataItem.value?.block_results), + ]; + + const merkleRoot: Uint8Array = generateMerkleRoot(blockHashes); + + return tendermintDataItemToSha256(dataItem.key, merkleRoot); + }); +} + +function tendermintDataItemToSha256( + key: string, + merkleRoot: Uint8Array +): Uint8Array { + const keyBytes = crypto.sha256(Buffer.from(key, 'utf-8')); + + const combined = Buffer.concat([keyBytes, merkleRoot]); + + return crypto.sha256(combined); +} diff --git a/package.json b/package.json index 39ffa786..4e703929 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,9 @@ "prettier": "^2.3.0", "rimraf": "^3.0.2" }, + "resolutions": { + "axios": "^0.27.2" + }, "scripts": { "setup": "lerna clean && yarn install && lerna run build", "graph": "yarn nx graph", diff --git a/tools/kysor/package.json b/tools/kysor/package.json index 017de837..0775bba3 100644 --- a/tools/kysor/package.json +++ b/tools/kysor/package.json @@ -38,8 +38,8 @@ }, "dependencies": { "@iarna/toml": "^2.2.5", - "@kyvejs/sdk": "1.1.1", - "@kyvejs/types": "1.2.0", + "@kyvejs/sdk": "1.2.0", + "@kyvejs/types": "1.3.0", "axios": "^0.27.2", "bignumber.js": "^9.1.0", "commander": "^9.4.0", diff --git a/tools/kysor/src/commands/init.ts b/tools/kysor/src/commands/init.ts index 54ac51e5..23be8d0d 100644 --- a/tools/kysor/src/commands/init.ts +++ b/tools/kysor/src/commands/init.ts @@ -4,7 +4,7 @@ import { Command } from "commander"; import fs from "fs"; import path from "path"; -import { USER_HOME, KYSOR_DIR } from "../utils/constants"; +import { KYSOR_DIR, USER_HOME } from "../utils/constants"; const init = new Command("init").description("Init KYSOR"); diff --git a/tools/kysor/src/commands/valaccounts.ts b/tools/kysor/src/commands/valaccounts.ts index 8fee39c7..22e5d40e 100644 --- a/tools/kysor/src/commands/valaccounts.ts +++ b/tools/kysor/src/commands/valaccounts.ts @@ -7,7 +7,7 @@ import path from "path"; import prompts from "prompts"; import { IValaccountConfig } from "../types/interfaces"; -import { FILE_ACCESS, USER_HOME, KYSOR_DIR } from "../utils/constants"; +import { FILE_ACCESS, KYSOR_DIR, USER_HOME } from "../utils/constants"; const valaccounts = new Command("valaccounts").description( "Create and delete valaccounts" diff --git a/tools/kysor/src/kysor.ts b/tools/kysor/src/kysor.ts index db3956d6..92622f3e 100644 --- a/tools/kysor/src/kysor.ts +++ b/tools/kysor/src/kysor.ts @@ -9,7 +9,7 @@ import path from "path"; import { IConfig, IValaccountConfig } from "./types/interfaces"; import { getChecksum, setupLogger, startNodeProcess } from "./utils"; -import { ARCH, USER_HOME, KYSOR_DIR, PLATFORM } from "./utils/constants"; +import { ARCH, KYSOR_DIR, PLATFORM, USER_HOME } from "./utils/constants"; const INFINITY_LOOP = true; diff --git a/yarn.lock b/yarn.lock index f5b98c31..5541e62f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,615 +10,6 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@aws-crypto/crc32@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/crc32/-/crc32-3.0.0.tgz#07300eca214409c33e3ff769cd5697b57fdd38fa" - integrity sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - -"@aws-crypto/crc32c@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz#016c92da559ef638a84a245eecb75c3e97cb664f" - integrity sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - -"@aws-crypto/ie11-detection@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz#640ae66b4ec3395cee6a8e94ebcd9f80c24cd688" - integrity sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q== - dependencies: - tslib "^1.11.1" - -"@aws-crypto/sha1-browser@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz#f9083c00782b24714f528b1a1fef2174002266a3" - integrity sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw== - dependencies: - "@aws-crypto/ie11-detection" "^3.0.0" - "@aws-crypto/supports-web-crypto" "^3.0.0" - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-locate-window" "^3.0.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - -"@aws-crypto/sha256-browser@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz#05f160138ab893f1c6ba5be57cfd108f05827766" - integrity sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ== - dependencies: - "@aws-crypto/ie11-detection" "^3.0.0" - "@aws-crypto/sha256-js" "^3.0.0" - "@aws-crypto/supports-web-crypto" "^3.0.0" - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-locate-window" "^3.0.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - -"@aws-crypto/sha256-js@3.0.0", "@aws-crypto/sha256-js@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2" - integrity sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ== - dependencies: - "@aws-crypto/util" "^3.0.0" - "@aws-sdk/types" "^3.222.0" - tslib "^1.11.1" - -"@aws-crypto/supports-web-crypto@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz#5d1bf825afa8072af2717c3e455f35cda0103ec2" - integrity sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg== - dependencies: - tslib "^1.11.1" - -"@aws-crypto/util@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-3.0.0.tgz#1c7ca90c29293f0883468ad48117937f0fe5bfb0" - integrity sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w== - dependencies: - "@aws-sdk/types" "^3.222.0" - "@aws-sdk/util-utf8-browser" "^3.0.0" - tslib "^1.11.1" - -"@aws-sdk/client-s3@^3.370.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.592.0.tgz#ed9cfb1e968ecad06b716ffc20c02687ca789801" - integrity sha512-abn1XYk9HW2nXIvyD6ldwrNcF5/7a2p06OSWEr7zVTo954kArg8N0yTsy83ezznEHZfaZpdZn/DLDl2GxrE1Xw== - dependencies: - "@aws-crypto/sha1-browser" "3.0.0" - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sso-oidc" "3.592.0" - "@aws-sdk/client-sts" "3.592.0" - "@aws-sdk/core" "3.592.0" - "@aws-sdk/credential-provider-node" "3.592.0" - "@aws-sdk/middleware-bucket-endpoint" "3.587.0" - "@aws-sdk/middleware-expect-continue" "3.577.0" - "@aws-sdk/middleware-flexible-checksums" "3.587.0" - "@aws-sdk/middleware-host-header" "3.577.0" - "@aws-sdk/middleware-location-constraint" "3.577.0" - "@aws-sdk/middleware-logger" "3.577.0" - "@aws-sdk/middleware-recursion-detection" "3.577.0" - "@aws-sdk/middleware-sdk-s3" "3.587.0" - "@aws-sdk/middleware-signing" "3.587.0" - "@aws-sdk/middleware-ssec" "3.577.0" - "@aws-sdk/middleware-user-agent" "3.587.0" - "@aws-sdk/region-config-resolver" "3.587.0" - "@aws-sdk/signature-v4-multi-region" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-endpoints" "3.587.0" - "@aws-sdk/util-user-agent-browser" "3.577.0" - "@aws-sdk/util-user-agent-node" "3.587.0" - "@aws-sdk/xml-builder" "3.575.0" - "@smithy/config-resolver" "^3.0.1" - "@smithy/core" "^2.2.0" - "@smithy/eventstream-serde-browser" "^3.0.0" - "@smithy/eventstream-serde-config-resolver" "^3.0.0" - "@smithy/eventstream-serde-node" "^3.0.0" - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/hash-blob-browser" "^3.0.0" - "@smithy/hash-node" "^3.0.0" - "@smithy/hash-stream-node" "^3.0.0" - "@smithy/invalid-dependency" "^3.0.0" - "@smithy/md5-js" "^3.0.0" - "@smithy/middleware-content-length" "^3.0.0" - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-retry" "^3.0.3" - "@smithy/middleware-serde" "^3.0.0" - "@smithy/middleware-stack" "^3.0.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.3" - "@smithy/util-defaults-mode-node" "^3.0.3" - "@smithy/util-endpoints" "^2.0.1" - "@smithy/util-retry" "^3.0.0" - "@smithy/util-stream" "^3.0.1" - "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sso-oidc@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.592.0.tgz#0e5826e17a3d4db52cd38d0146e6faf520812cfe" - integrity sha512-11Zvm8nm0s/UF3XCjzFRpQU+8FFVW5rcr3BHfnH6xAe5JEoN6bJN/n+wOfnElnjek+90hh+Qc7s141AMrCjiiw== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.592.0" - "@aws-sdk/core" "3.592.0" - "@aws-sdk/credential-provider-node" "3.592.0" - "@aws-sdk/middleware-host-header" "3.577.0" - "@aws-sdk/middleware-logger" "3.577.0" - "@aws-sdk/middleware-recursion-detection" "3.577.0" - "@aws-sdk/middleware-user-agent" "3.587.0" - "@aws-sdk/region-config-resolver" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-endpoints" "3.587.0" - "@aws-sdk/util-user-agent-browser" "3.577.0" - "@aws-sdk/util-user-agent-node" "3.587.0" - "@smithy/config-resolver" "^3.0.1" - "@smithy/core" "^2.2.0" - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/hash-node" "^3.0.0" - "@smithy/invalid-dependency" "^3.0.0" - "@smithy/middleware-content-length" "^3.0.0" - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-retry" "^3.0.3" - "@smithy/middleware-serde" "^3.0.0" - "@smithy/middleware-stack" "^3.0.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.3" - "@smithy/util-defaults-mode-node" "^3.0.3" - "@smithy/util-endpoints" "^2.0.1" - "@smithy/util-middleware" "^3.0.0" - "@smithy/util-retry" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sso@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.592.0.tgz#90462e744998990079c28a083553090af9ac2902" - integrity sha512-w+SuW47jQqvOC7fonyjFjsOh3yjqJ+VpWdVrmrl0E/KryBE7ho/Wn991Buf/EiHHeJikoWgHsAIPkBH29+ntdA== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/core" "3.592.0" - "@aws-sdk/middleware-host-header" "3.577.0" - "@aws-sdk/middleware-logger" "3.577.0" - "@aws-sdk/middleware-recursion-detection" "3.577.0" - "@aws-sdk/middleware-user-agent" "3.587.0" - "@aws-sdk/region-config-resolver" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-endpoints" "3.587.0" - "@aws-sdk/util-user-agent-browser" "3.577.0" - "@aws-sdk/util-user-agent-node" "3.587.0" - "@smithy/config-resolver" "^3.0.1" - "@smithy/core" "^2.2.0" - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/hash-node" "^3.0.0" - "@smithy/invalid-dependency" "^3.0.0" - "@smithy/middleware-content-length" "^3.0.0" - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-retry" "^3.0.3" - "@smithy/middleware-serde" "^3.0.0" - "@smithy/middleware-stack" "^3.0.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.3" - "@smithy/util-defaults-mode-node" "^3.0.3" - "@smithy/util-endpoints" "^2.0.1" - "@smithy/util-middleware" "^3.0.0" - "@smithy/util-retry" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-sts@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.592.0.tgz#8a24080785355ced48ed5b49ab23d1eaf9f70f47" - integrity sha512-KUrOdszZfcrlpKr4dpdkGibZ/qq3Lnfu1rjv1U+V1QJQ9OuMo9J3sDWpWV9tigNqY0aGllarWH5cJbz9868W/w== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sso-oidc" "3.592.0" - "@aws-sdk/core" "3.592.0" - "@aws-sdk/credential-provider-node" "3.592.0" - "@aws-sdk/middleware-host-header" "3.577.0" - "@aws-sdk/middleware-logger" "3.577.0" - "@aws-sdk/middleware-recursion-detection" "3.577.0" - "@aws-sdk/middleware-user-agent" "3.587.0" - "@aws-sdk/region-config-resolver" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-endpoints" "3.587.0" - "@aws-sdk/util-user-agent-browser" "3.577.0" - "@aws-sdk/util-user-agent-node" "3.587.0" - "@smithy/config-resolver" "^3.0.1" - "@smithy/core" "^2.2.0" - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/hash-node" "^3.0.0" - "@smithy/invalid-dependency" "^3.0.0" - "@smithy/middleware-content-length" "^3.0.0" - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-retry" "^3.0.3" - "@smithy/middleware-serde" "^3.0.0" - "@smithy/middleware-stack" "^3.0.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.3" - "@smithy/util-defaults-mode-node" "^3.0.3" - "@smithy/util-endpoints" "^2.0.1" - "@smithy/util-middleware" "^3.0.0" - "@smithy/util-retry" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/core@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.592.0.tgz#d903a3993f8ba6836480314c2a8af8b7857bb943" - integrity sha512-gLPMXR/HXDP+9gXAt58t7gaMTvRts9i6Q7NMISpkGF54wehskl5WGrbdtHJFylrlJ5BQo3XVY6i661o+EuR1wg== - dependencies: - "@smithy/core" "^2.2.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/signature-v4" "^3.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - fast-xml-parser "4.2.5" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-env@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.587.0.tgz#40435be331773e4b1b665a1f4963518d4647505c" - integrity sha512-Hyg/5KFECIk2k5o8wnVEiniV86yVkhn5kzITUydmNGCkXdBFHMHRx6hleQ1bqwJHbBskyu8nbYamzcwymmGwmw== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-http@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.587.0.tgz#dc23c6d6708bc67baea54bfab0f256c5fe4df023" - integrity sha512-Su1SRWVRCuR1e32oxX3C1V4c5hpPN20WYcRfdcr2wXwHqSvys5DrnmuCC+JoEnS/zt3adUJhPliTqpfKgSdMrA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/util-stream" "^3.0.1" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-ini@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.592.0.tgz#02b85eaca21fe54d4d285009b64a8add032a042b" - integrity sha512-3kG6ngCIOPbLJZZ3RV+NsU7HVK6vX1+1DrPJKj9fVlPYn7IXsk8NAaUT5885yC7+jKizjv0cWLrLKvAJV5gfUA== - dependencies: - "@aws-sdk/credential-provider-env" "3.587.0" - "@aws-sdk/credential-provider-http" "3.587.0" - "@aws-sdk/credential-provider-process" "3.587.0" - "@aws-sdk/credential-provider-sso" "3.592.0" - "@aws-sdk/credential-provider-web-identity" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@smithy/credential-provider-imds" "^3.1.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-node@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.592.0.tgz#b8339b1bfdea39b17e5da1a502b60f0fe3dde126" - integrity sha512-BguihBGTrEjVBQ07hm+ZsO29eNJaxwBwUZMftgGAm2XcMIEClNPfm5hydxu2BmA4ouIJQJ6nG8pNYghEumM+Aw== - dependencies: - "@aws-sdk/credential-provider-env" "3.587.0" - "@aws-sdk/credential-provider-http" "3.587.0" - "@aws-sdk/credential-provider-ini" "3.592.0" - "@aws-sdk/credential-provider-process" "3.587.0" - "@aws-sdk/credential-provider-sso" "3.592.0" - "@aws-sdk/credential-provider-web-identity" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@smithy/credential-provider-imds" "^3.1.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-process@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.587.0.tgz#1e5cc562a68438a77f464adc0493b02e04dd3ea1" - integrity sha512-V4xT3iCqkF8uL6QC4gqBJg/2asd/damswP1h9HCfqTllmPWzImS+8WD3VjgTLw5b0KbTy+ZdUhKc0wDnyzkzxg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-sso@3.592.0": - version "3.592.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.592.0.tgz#340649b4f5b4fbcb816f248089979d7d38ce96d3" - integrity sha512-fYFzAdDHKHvhtufPPtrLdSv8lO6GuW3em6n3erM5uFdpGytNpjXvr3XGokIsuXcNkETAY/Xihg+G9ksNE8WJxQ== - dependencies: - "@aws-sdk/client-sso" "3.592.0" - "@aws-sdk/token-providers" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/credential-provider-web-identity@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.587.0.tgz#daa41e3cc9309594327056e431b8065145c5297a" - integrity sha512-XqIx/I2PG7kyuw3WjAP9wKlxy8IvFJwB8asOFT1xPFoVfZYKIogjG9oLP5YiRtfvDkWIztHmg5MlVv3HdJDGRw== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-bucket-endpoint@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.587.0.tgz#def5edbadf53bdfe765aa9acf12f119eb208b22f" - integrity sha512-HkFXLPl8pr6BH/Q0JpOESqEKL0ZK3sk7aSZ1S6GE4RXET7H5R94THULXqQFZzD48gZcyFooO/yNKZTqrZFaWKg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-arn-parser" "3.568.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-config-provider" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-expect-continue@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.577.0.tgz#47add47f17873a6044cb140f17033cb6e1d02744" - integrity sha512-6dPp8Tv4F0of4un5IAyG6q++GrRrNQQ4P2NAMB1W0VO4JoEu1C8GievbbDLi88TFIFmtKpnHB0ODCzwnoe8JsA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-flexible-checksums@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.587.0.tgz#74afe7bd3088adf05b2ed843ad41386e793e0397" - integrity sha512-URMwp/budDvKhIvZ4a6zIBfFTun/iDlPWXqsGKYjEtHt8jz27OSjCZtDtIeqW4WTBdKL8KZgQcl+DdaE5M1qiQ== - dependencies: - "@aws-crypto/crc32" "3.0.0" - "@aws-crypto/crc32c" "3.0.0" - "@aws-sdk/types" "3.577.0" - "@smithy/is-array-buffer" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-host-header@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.577.0.tgz#a3fc626d409ec850296740478c64ef5806d8b878" - integrity sha512-9ca5MJz455CODIVXs0/sWmJm7t3QO4EUa1zf8pE8grLpzf0J94bz/skDWm37Pli13T3WaAQBHCTiH2gUVfCsWg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-location-constraint@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.577.0.tgz#9372441a4ac5747b3176ac6378d92866a51de815" - integrity sha512-DKPTD2D2s+t2QUo/IXYtVa/6Un8GZ+phSTBkyBNx2kfZz4Kwavhl/JJzSqTV3GfCXkVdFu7CrjoX7BZ6qWeTUA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-logger@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.577.0.tgz#6da3b13ae284fb3930961f0fc8e20b1f6cf8be30" - integrity sha512-aPFGpGjTZcJYk+24bg7jT4XdIp42mFXSuPt49lw5KygefLyJM/sB0bKKqPYYivW0rcuZ9brQ58eZUNthrzYAvg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-recursion-detection@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.577.0.tgz#fff76abc6d4521636f9e654ce5bf2c4c79249417" - integrity sha512-pn3ZVEd2iobKJlR3H+bDilHjgRnNrQ6HMmK9ZzZw89Ckn3Dcbv48xOv4RJvu0aU8SDLl/SNCxppKjeLDTPGBNA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-sdk-s3@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.587.0.tgz#720620ccdc2eb6ecab0f3a6adbd28fc27fdc70ce" - integrity sha512-vtXTGEiw1E9Fax4LmcU2Z208gbrC8ShrdsSLmGcRPpu5NPOGBFBSDG5sy5EDNClrFxIl/Le8coQnD0EDBtx+uQ== - dependencies: - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-arn-parser" "3.568.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/signature-v4" "^3.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/util-config-provider" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-signing@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.587.0.tgz#593c418c09c51c0bc55f23a7a6b0fda8502a8103" - integrity sha512-tiZaTDj4RvhXGRAlncFn7CSEfL3iNPO67WSaxAq+Ls5j1VgczPhu5262cWONNoMgth3nXR1hhLC4ITSl/a6AzA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/signature-v4" "^3.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-ssec@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-ssec/-/middleware-ssec-3.577.0.tgz#9fcd74e8bf2c277b4349c537cbeceba279166f32" - integrity sha512-i2BPJR+rp8xmRVIGc0h1kDRFcM2J9GnClqqpc+NLSjmYadlcg4mPklisz9HzwFVcRPJ5XcGf3U4BYs5G8+iTyg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-user-agent@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.587.0.tgz#2a68900cfb29afbae2952d901de4fcb91850bd3d" - integrity sha512-SyDomN+IOrygLucziG7/nOHkjUXES5oH5T7p8AboO8oakMQJdnudNXiYWTicQWO52R51U6CR27rcMPTGeMedYA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@aws-sdk/util-endpoints" "3.587.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/region-config-resolver@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.587.0.tgz#ad1c15494f44dfc4c7a7bce389f8b128dace923f" - integrity sha512-93I7IPZtulZQoRK+O20IJ4a1syWwYPzoO2gc3v+/GNZflZPV3QJXuVbIm0pxBsu0n/mzKGUKqSOLPIaN098HcQ== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/signature-v4-multi-region@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.587.0.tgz#f8bb6de9135f3fafab04b9220409cd0d0549b7d8" - integrity sha512-TR9+ZSjdXvXUz54ayHcCihhcvxI9W7102J1OK6MrLgBlPE7uRhAx42BR9L5lLJ86Xj3LuqPWf//o9d/zR9WVIg== - dependencies: - "@aws-sdk/middleware-sdk-s3" "3.587.0" - "@aws-sdk/types" "3.577.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/signature-v4" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/token-providers@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.587.0.tgz#f9fd2ddfc554c1370f8d0f467c76a4c8cb904ae6" - integrity sha512-ULqhbnLy1hmJNRcukANBWJmum3BbjXnurLPSFXoGdV0llXYlG55SzIla2VYqdveQEEjmsBuTZdFvXAtNpmS5Zg== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/types@3.577.0", "@aws-sdk/types@^3.222.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.577.0.tgz#7700784d368ce386745f8c340d9d68cea4716f90" - integrity sha512-FT2JZES3wBKN/alfmhlo+3ZOq/XJ0C7QOZcDNrpKjB0kqYoKjhVKZ/Hx6ArR0czkKfHzBBEs6y40ebIHx2nSmA== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/util-arn-parser@3.568.0": - version "3.568.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-arn-parser/-/util-arn-parser-3.568.0.tgz#6a19a8c6bbaa520b6be1c278b2b8c17875b91527" - integrity sha512-XUKJWWo+KOB7fbnPP0+g/o5Ulku/X53t7i/h+sPHr5xxYTJJ9CYnbToo95mzxe7xWvkLrsNtJ8L+MnNn9INs2w== - dependencies: - tslib "^2.6.2" - -"@aws-sdk/util-endpoints@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.587.0.tgz#781e0822a95dba15f7ac8f22a6f6d7f0c8819818" - integrity sha512-8I1HG6Em8wQWqKcRW6m358mqebRVNpL8XrrEoT4In7xqkKkmYtHRNVYP6lcmiQh5pZ/c/FXu8dSchuFIWyEtqQ== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/types" "^3.0.0" - "@smithy/util-endpoints" "^2.0.1" - tslib "^2.6.2" - -"@aws-sdk/util-locate-window@^3.0.0": - version "3.568.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-locate-window/-/util-locate-window-3.568.0.tgz#2acc4b2236af0d7494f7e517401ba6b3c4af11ff" - integrity sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig== - dependencies: - tslib "^2.6.2" - -"@aws-sdk/util-user-agent-browser@3.577.0": - version "3.577.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.577.0.tgz#d4d2cdb3a2b3d1c8b35f239ee9f7b2c87bee66ea" - integrity sha512-zEAzHgR6HWpZOH7xFgeJLc6/CzMcx4nxeQolZxVZoB5pPaJd3CjyRhZN0xXeZB0XIRCWmb4yJBgyiugXLNMkLA== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/types" "^3.0.0" - bowser "^2.11.0" - tslib "^2.6.2" - -"@aws-sdk/util-user-agent-node@3.587.0": - version "3.587.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.587.0.tgz#a6bf422f307a68e16a6c19ee5d731fcc32696fb9" - integrity sha512-Pnl+DUe/bvnbEEDHP3iVJrOtE3HbFJBPgsD6vJ+ml/+IYk1Eq49jEG+EHZdNTPz3SDG0kbp2+7u41MKYJHR/iQ== - dependencies: - "@aws-sdk/types" "3.577.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/util-utf8-browser@^3.0.0": - version "3.259.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff" - integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw== - dependencies: - tslib "^2.3.1" - -"@aws-sdk/xml-builder@3.575.0": - version "3.575.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/xml-builder/-/xml-builder-3.575.0.tgz#233b2aae422dd789a078073032da1bc60317aa1d" - integrity sha512-cWgAwmbFYNCFzPwxL705+lWps0F3ZvOckufd2KKoEZUmtpVw9/txUXNrPySUXSmRTSRhoatIMABNfStWR043bQ== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" @@ -885,7 +276,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/runtime@^7.24.6": +"@babel/runtime@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== @@ -965,7 +356,7 @@ near-api-js "^0.44.2" near-seed-phrase "^0.2.0" -"@confio/ics23@^0.6.3", "@confio/ics23@^0.6.8": +"@confio/ics23@^0.6.8": version "0.6.8" resolved "https://registry.yarnpkg.com/@confio/ics23/-/ics23-0.6.8.tgz#2a6b4f1f2b7b20a35d9a0745bb5a446e72930b3d" integrity sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w== @@ -973,26 +364,6 @@ "@noble/hashes" "^1.0.0" protobufjs "^6.8.8" -"@cosmjs/amino@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.27.1.tgz#0910256b5aecd794420bb5f7319d98fc63252fa1" - integrity sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA== - dependencies: - "@cosmjs/crypto" "0.27.1" - "@cosmjs/encoding" "0.27.1" - "@cosmjs/math" "0.27.1" - "@cosmjs/utils" "0.27.1" - -"@cosmjs/amino@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.31.3.tgz#0f4aa6bd68331c71bd51b187fa64f00eb075db0a" - integrity sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw== - dependencies: - "@cosmjs/crypto" "^0.31.3" - "@cosmjs/encoding" "^0.31.3" - "@cosmjs/math" "^0.31.3" - "@cosmjs/utils" "^0.31.3" - "@cosmjs/amino@^0.32.3": version "0.32.3" resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.32.3.tgz#b81d4a2b8d61568431a1afcd871e1344a19d97ff" @@ -1003,35 +374,6 @@ "@cosmjs/math" "^0.32.3" "@cosmjs/utils" "^0.32.3" -"@cosmjs/crypto@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.27.1.tgz#271c853089a3baf3acd6cf0b2122fd49f8815743" - integrity sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg== - dependencies: - "@cosmjs/encoding" "0.27.1" - "@cosmjs/math" "0.27.1" - "@cosmjs/utils" "0.27.1" - bip39 "^3.0.2" - bn.js "^5.2.0" - elliptic "^6.5.3" - js-sha3 "^0.8.0" - libsodium-wrappers "^0.7.6" - ripemd160 "^2.0.2" - sha.js "^2.4.11" - -"@cosmjs/crypto@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.31.3.tgz#c752cb6d682fdc735dcb45a2519f89c56ba16c26" - integrity sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ== - dependencies: - "@cosmjs/encoding" "^0.31.3" - "@cosmjs/math" "^0.31.3" - "@cosmjs/utils" "^0.31.3" - "@noble/hashes" "^1" - bn.js "^5.2.0" - elliptic "^6.5.4" - libsodium-wrappers-sumo "^0.7.11" - "@cosmjs/crypto@^0.32.3": version "0.32.3" resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.32.3.tgz#787f8e659709678722068ee1ddf379f65051a25e" @@ -1045,24 +387,6 @@ elliptic "^6.5.4" libsodium-wrappers-sumo "^0.7.11" -"@cosmjs/encoding@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.27.1.tgz#3cd5bc0af743485eb2578cdb08cfa84c86d610e1" - integrity sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw== - dependencies: - base64-js "^1.3.0" - bech32 "^1.1.4" - readonly-date "^1.0.0" - -"@cosmjs/encoding@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.31.3.tgz#2519d9c9ae48368424971f253775c4580b54c5aa" - integrity sha512-6IRtG0fiVYwyP7n+8e54uTx2pLYijO48V3t9TLiROERm5aUAIzIlz6Wp0NYaI5he9nh1lcEGJ1lkquVKFw3sUg== - dependencies: - base64-js "^1.3.0" - bech32 "^1.1.4" - readonly-date "^1.0.0" - "@cosmjs/encoding@^0.32.3": version "0.32.3" resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.32.3.tgz#e245ff511fe4a0df7ba427b5187aab69e3468e5b" @@ -1072,36 +396,14 @@ bech32 "^1.1.4" readonly-date "^1.0.0" -"@cosmjs/json-rpc@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.27.1.tgz#ce0a6157f57a76e964587ceb9027884bc4ffe701" - integrity sha512-AKvsllGr6oN5kiroatIeIIxRdCFetLd8LCWV04RRNkoJ2OefDNb46VlWEQ+gI3ay5GgfVjB9qAcfvbJyrcEv+A== - dependencies: - "@cosmjs/stream" "0.27.1" - xstream "^11.14.0" - -"@cosmjs/json-rpc@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.31.3.tgz#11e5cf0f6d9ab426dff470bb8d68d5d31cd6ab13" - integrity sha512-7LVYerXjnm69qqYR3uA6LGCrBW2EO5/F7lfJxAmY+iII2C7xO3a0vAjMSt5zBBh29PXrJVS6c2qRP22W1Le2Wg== +"@cosmjs/json-rpc@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.32.3.tgz#ccffdd7f722cecfab6daaa7463843b92f5d25355" + integrity sha512-JwFRWZa+Y95KrAG8CuEbPVOSnXO2uMSEBcaAB/FBU3Mo4jQnDoUjXvt3vwtFWxfAytrWCn1I4YDFaOAinnEG/Q== dependencies: - "@cosmjs/stream" "^0.31.3" + "@cosmjs/stream" "^0.32.3" xstream "^11.14.0" -"@cosmjs/math@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.27.1.tgz#be78857b008ffc6b1ed6fecaa1c4cd5bc38c07d7" - integrity sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ== - dependencies: - bn.js "^5.2.0" - -"@cosmjs/math@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.31.3.tgz#767f7263d12ba1b9ed2f01f68d857597839fd957" - integrity sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A== - dependencies: - bn.js "^5.2.0" - "@cosmjs/math@^0.32.3": version "0.32.3" resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.32.3.tgz#16e4256f4da507b9352327da12ae64056a2ba6c9" @@ -1109,151 +411,76 @@ dependencies: bn.js "^5.2.0" -"@cosmjs/proto-signing@0.27.1", "@cosmjs/proto-signing@^0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.27.1.tgz#1f8f662550aab012d957d02f43c77d914c2ae0db" - integrity sha512-t7/VvQivMdM1KgKWai/9ZCEcGFXJtr9Xo0hGcPLTn9wGkh9tmOsUXINYVMsf5D/jWIm1MDPbGCYfdb9V1Od4hw== - dependencies: - "@cosmjs/amino" "0.27.1" - "@cosmjs/crypto" "0.27.1" - "@cosmjs/math" "0.27.1" - cosmjs-types "^0.4.0" - long "^4.0.0" - protobufjs "~6.10.2" - -"@cosmjs/proto-signing@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.31.3.tgz#20440b7b96fb2cd924256a10e656fd8d4481cdcd" - integrity sha512-24+10/cGl6lLS4VCrGTCJeDRPQTn1K5JfknzXzDIHOx8THR31JxA7/HV5eWGHqWgAbudA7ccdSvEK08lEHHtLA== - dependencies: - "@cosmjs/amino" "^0.31.3" - "@cosmjs/crypto" "^0.31.3" - "@cosmjs/encoding" "^0.31.3" - "@cosmjs/math" "^0.31.3" - "@cosmjs/utils" "^0.31.3" - cosmjs-types "^0.8.0" - long "^4.0.0" - -"@cosmjs/socket@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.27.1.tgz#c7a3eceb15efb9874a048c3238d1f0b185185742" - integrity sha512-bKCRsaSXh/TA7efxVCogzS2K3cgC40Ge2itFYmTfgpOE+++52FchCblVCsCYwMNDLS497RP4P0GbeC1VEBToMA== +"@cosmjs/proto-signing@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.32.3.tgz#91ae149b747d18666a6ccc924165b306431f7c0d" + integrity sha512-kSZ0ZUY0DwcRT0NcIn2HkadH4NKlwjfZgbLj1ABwh/4l0RgeT84QCscZCu63tJYq3K6auwqTiZSZERwlO4/nbg== dependencies: - "@cosmjs/stream" "0.27.1" - isomorphic-ws "^4.0.1" - ws "^7" - xstream "^11.14.0" + "@cosmjs/amino" "^0.32.3" + "@cosmjs/crypto" "^0.32.3" + "@cosmjs/encoding" "^0.32.3" + "@cosmjs/math" "^0.32.3" + "@cosmjs/utils" "^0.32.3" + cosmjs-types "^0.9.0" -"@cosmjs/socket@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.31.3.tgz#52086380f4de2fc3514b90b0484b4b1c4c50e39e" - integrity sha512-aqrDGGi7os/hsz5p++avI4L0ZushJ+ItnzbqA7C6hamFSCJwgOkXaOUs+K9hXZdX4rhY7rXO4PH9IH8q09JkTw== +"@cosmjs/socket@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.32.3.tgz#fa5c36bf58e87c0ad865d6318ecb0f8d9c89a28a" + integrity sha512-F2WwNmaUPdZ4SsH6Uyreq3wQk7jpaEkb3wfOP951f5Jt6HCW/PxbxhKzHkAAf6+Sqks6SPhkbWoE8XaZpjL2KA== dependencies: - "@cosmjs/stream" "^0.31.3" + "@cosmjs/stream" "^0.32.3" isomorphic-ws "^4.0.1" ws "^7" xstream "^11.14.0" -"@cosmjs/stargate@^0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.27.1.tgz#0abc1f91e5cc421940c920f16a22c6c93cc774d5" - integrity sha512-7hAIyNd6NbhQA51w9mPVyMYw515Hpj0o7SXMaqbc7nxs3hkJNMONQ9RakyMm0U/WeCd6ObcSaPEcdkqbfkc+mg== - dependencies: - "@confio/ics23" "^0.6.3" - "@cosmjs/amino" "0.27.1" - "@cosmjs/encoding" "0.27.1" - "@cosmjs/math" "0.27.1" - "@cosmjs/proto-signing" "0.27.1" - "@cosmjs/stream" "0.27.1" - "@cosmjs/tendermint-rpc" "0.27.1" - "@cosmjs/utils" "0.27.1" - cosmjs-types "^0.4.0" - long "^4.0.0" - protobufjs "~6.10.2" - xstream "^11.14.0" - -"@cosmjs/stargate@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.31.3.tgz#a2b38e398097a00f897dbd8f02d4d347d8fed818" - integrity sha512-53NxnzmB9FfXpG4KjOUAYAvWLYKdEmZKsutcat/u2BrDXNZ7BN8jim/ENcpwXfs9/Og0K24lEIdvA4gsq3JDQw== +"@cosmjs/stargate@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.32.3.tgz#5a92b222ada960ebecea72cc9f366370763f4b66" + integrity sha512-OQWzO9YWKerUinPIxrO1MARbe84XkeXJAW0lyMIjXIEikajuXZ+PwftiKA5yA+8OyditVmHVLtPud6Pjna2s5w== dependencies: "@confio/ics23" "^0.6.8" - "@cosmjs/amino" "^0.31.3" - "@cosmjs/encoding" "^0.31.3" - "@cosmjs/math" "^0.31.3" - "@cosmjs/proto-signing" "^0.31.3" - "@cosmjs/stream" "^0.31.3" - "@cosmjs/tendermint-rpc" "^0.31.3" - "@cosmjs/utils" "^0.31.3" - cosmjs-types "^0.8.0" - long "^4.0.0" - protobufjs "~6.11.3" + "@cosmjs/amino" "^0.32.3" + "@cosmjs/encoding" "^0.32.3" + "@cosmjs/math" "^0.32.3" + "@cosmjs/proto-signing" "^0.32.3" + "@cosmjs/stream" "^0.32.3" + "@cosmjs/tendermint-rpc" "^0.32.3" + "@cosmjs/utils" "^0.32.3" + cosmjs-types "^0.9.0" xstream "^11.14.0" -"@cosmjs/stream@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.27.1.tgz#02f40856c0840e34ef11054da9e84e8196d37593" - integrity sha512-cEyEAVfXEyuUpKYBeEJrOj8Dp/c+M6a0oGJHxvDdhP5gSsaeCPgQXrh7qZFBiUfu3Brmqd+e/bKZm+068l9bBw== +"@cosmjs/stream@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.32.3.tgz#7522579aaf18025d322c2f33d6fb7573220395d6" + integrity sha512-J2zVWDojkynYifAUcRmVczzmp6STEpyiAARq0rSsviqjreGIfspfuws/8rmkPa6qQBZvpQOBQCm2HyZZwYplIw== dependencies: xstream "^11.14.0" -"@cosmjs/stream@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.31.3.tgz#53428fd62487ec08fc3886a50a3feeb8b2af2e66" - integrity sha512-8keYyI7X0RjsLyVcZuBeNjSv5FA4IHwbFKx7H60NHFXszN8/MvXL6aZbNIvxtcIHHsW7K9QSQos26eoEWlAd+w== +"@cosmjs/tendermint-rpc@^0.32.3": + version "0.32.3" + resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.32.3.tgz#f0406b9f0233e588fb924dca8c614972f9038aff" + integrity sha512-xeprW+VR9xKGstqZg0H/KBZoUp8/FfFyS9ljIUTLM/UINjP2MhiwncANPS2KScfJVepGufUKk0/phHUeIBSEkw== dependencies: - xstream "^11.14.0" - -"@cosmjs/tendermint-rpc@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.27.1.tgz#66f4a04d1b9ac5849ea2981c2e67bc229996a85a" - integrity sha512-eN1NyBYIiFutDNleEaTfvIJ3S3KA1gP45UHaLhSETm8KyiaUqg/b0Mj6sp7J3h4BhgwLq2zn/TDtIn0k5luedg== - dependencies: - "@cosmjs/crypto" "0.27.1" - "@cosmjs/encoding" "0.27.1" - "@cosmjs/json-rpc" "0.27.1" - "@cosmjs/math" "0.27.1" - "@cosmjs/socket" "0.27.1" - "@cosmjs/stream" "0.27.1" - axios "^0.21.2" - readonly-date "^1.0.0" - xstream "^11.14.0" - -"@cosmjs/tendermint-rpc@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.31.3.tgz#d1a2bc5b3c98743631c9b55888589d352403c9b3" - integrity sha512-s3TiWkPCW4QceTQjpYqn4xttUJH36mTPqplMl+qyocdqk5+X5mergzExU/pHZRWQ4pbby8bnR7kMvG4OC1aZ8g== - dependencies: - "@cosmjs/crypto" "^0.31.3" - "@cosmjs/encoding" "^0.31.3" - "@cosmjs/json-rpc" "^0.31.3" - "@cosmjs/math" "^0.31.3" - "@cosmjs/socket" "^0.31.3" - "@cosmjs/stream" "^0.31.3" - "@cosmjs/utils" "^0.31.3" - axios "^0.21.2" + "@cosmjs/crypto" "^0.32.3" + "@cosmjs/encoding" "^0.32.3" + "@cosmjs/json-rpc" "^0.32.3" + "@cosmjs/math" "^0.32.3" + "@cosmjs/socket" "^0.32.3" + "@cosmjs/stream" "^0.32.3" + "@cosmjs/utils" "^0.32.3" + axios "^1.6.0" readonly-date "^1.0.0" xstream "^11.14.0" -"@cosmjs/utils@0.27.1": - version "0.27.1" - resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.27.1.tgz#1c8efde17256346ef142a3bd15158ee4055470e2" - integrity sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg== - -"@cosmjs/utils@^0.31.3": - version "0.31.3" - resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.31.3.tgz#f97bbfda35ad69e80cd5c7fe0a270cbda16db1ed" - integrity sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA== - "@cosmjs/utils@^0.32.3": version "0.32.3" resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.32.3.tgz#5dcaee6dd7cc846cdc073e9a7a7f63242f5f7e31" integrity sha512-WCZK4yksj2hBDz4w7xFZQTRZQ/RJhBX26uFHmmQFIcNUUVAihrLO+RerqJgk0dZqC42wstM9pEUQGtPmLcIYvg== -"@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== +"@cosmostation/extension-client@^0.1.15": + version "0.1.15" + resolved "https://registry.yarnpkg.com/@cosmostation/extension-client/-/extension-client-0.1.15.tgz#cdc6d8fce42217704c1c0d5814f0ee7ce27e8dab" + integrity sha512-HlXYJjFrNpjiV/GUKhri1UL8/bhlOIFFLpRF78YDSqq16x0+plIqx5CAvEusFcKTDpVfpeD5sfUHiKvP7euNFg== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -2123,37 +1350,37 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@keplr-wallet/common@0.12.100": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/common/-/common-0.12.100.tgz#42ac3cf8ac2e04d2a330da956d0b7f399df2f223" - integrity sha512-bifoNpGj13h9DMPjXD4skmh0wE+rXq+tjiGX4t0PyVyXNzu54OrYgDSMP2ghiBCYFZQdKaka9yswV22Xq2zW4w== +"@keplr-wallet/common@0.12.103": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/common/-/common-0.12.103.tgz#a9b8268f3f353e76f641bc58079f49720377baff" + integrity sha512-+QH6vwyJsDZeLuoS3vAvJ4ofuum1AUiqxkDN+qAZoJ1TASsgS50CCA1cB9x79ORuisU/OC+GhCqZSnqEEe0bZw== dependencies: - "@keplr-wallet/crypto" "0.12.100" - "@keplr-wallet/types" "0.12.100" + "@keplr-wallet/crypto" "0.12.103" + "@keplr-wallet/types" "0.12.103" buffer "^6.0.3" delay "^4.4.0" -"@keplr-wallet/cosmos@^0.12.44": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.12.100.tgz#a0222d8edba71a47ddb538972201fbe86b7dacd7" - integrity sha512-cERt91x/lqJu1FkvHBaQznrrknOVukc/WCr2XvX/8swibzm5m1VHZ974QsWPby1NT2iCPWCRE20HJohmq/YJzw== +"@keplr-wallet/cosmos@^0.12.96": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.12.103.tgz#f315ff009f88a3233940d38072d67c5a59f99601" + integrity sha512-h5l1dwQdr1S9qcQ/CgxY6H3L/FVkTjxOwC4zjrMUA80f4RkmiTOJlL/Zl+Pb6ftIB1E5/AQJJhqaS47wzrw8fg== dependencies: "@ethersproject/address" "^5.6.0" - "@keplr-wallet/common" "0.12.100" - "@keplr-wallet/crypto" "0.12.100" - "@keplr-wallet/proto-types" "0.12.100" - "@keplr-wallet/simple-fetch" "0.12.100" - "@keplr-wallet/types" "0.12.100" - "@keplr-wallet/unit" "0.12.100" + "@keplr-wallet/common" "0.12.103" + "@keplr-wallet/crypto" "0.12.103" + "@keplr-wallet/proto-types" "0.12.103" + "@keplr-wallet/simple-fetch" "0.12.103" + "@keplr-wallet/types" "0.12.103" + "@keplr-wallet/unit" "0.12.103" bech32 "^1.1.4" buffer "^6.0.3" long "^4.0.0" protobufjs "^6.11.2" -"@keplr-wallet/crypto@0.12.100": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.12.100.tgz#9d04f9edcb19f3da3c35f024267d6f6868fac30c" - integrity sha512-uMljlV+tjo0VQD1e83+/QYy6y2lTUVeFrQMUgEXQ7wclNBUc5+XK8pTK5RkNqmvgAHscnWA52BQBhh4RYlpNQA== +"@keplr-wallet/crypto@0.12.103": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.12.103.tgz#3ace10eae25568392306f6902055b458d909c59a" + integrity sha512-JYbqrqbNhun+WkMgB3WH3CK3RRJkTT2aCvkjoD4NndncRwUKHn5tvwQyEabNojpv66A8svJ/CdXz75H5ZVTmOg== dependencies: "@ethersproject/keccak256" "^5.5.0" bip32 "^2.0.6" @@ -2164,32 +1391,32 @@ elliptic "^6.5.3" sha.js "^2.4.11" -"@keplr-wallet/proto-types@0.12.100": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.12.100.tgz#b96e631cb7c09c94c637521f76ee6b34c3fca98e" - integrity sha512-VW9C0MGWXerhpFPgAeBCbmn+6XLqnIogpRDvNmCLZsMS/scrprDZwtvCqJNbjn5evLL5gogKvmoFq1N1mk1OIw== +"@keplr-wallet/proto-types@0.12.103": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.12.103.tgz#452ac5018eacf80ba7933187a28f99ffe0b672f3" + integrity sha512-9lMpqrMfjJL0HZjuZtkVgQJwGFUCBjPiruLwQLwhVIq5PGvgOqJbN0giWozTUIa6BNw1Z7djeJD2OCwIy2+25w== dependencies: long "^4.0.0" protobufjs "^6.11.2" -"@keplr-wallet/simple-fetch@0.12.100": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/simple-fetch/-/simple-fetch-0.12.100.tgz#0a5016eb02a64d475b3350710ed1a989a4a7650f" - integrity sha512-YzeTuXd4yi4yksb8/axJx8NIAhLVqPW3IfwbRO4Lzwt73X54eDiM82qnRmKI/rjF7oFzZpd40DttO4vwRXkGDA== +"@keplr-wallet/simple-fetch@0.12.103": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/simple-fetch/-/simple-fetch-0.12.103.tgz#046ebe4c1ed07e02e04b05a6635f9bc36c02c2e0" + integrity sha512-Q4H6xaztJrei0blO5o47LeUi54TG3Vk+O/xqpfEhZ65yuylxNOplrKpuC1dE6PXOGdtemen9q/ks2OVa0bX9LA== -"@keplr-wallet/types@0.12.100", "@keplr-wallet/types@^0.12.44": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.12.100.tgz#24493416645bc5ed8d318846ab9f2b038412ec3a" - integrity sha512-yFjySqthWWFv+dKqXCu7waZvIQCkvNGcVJGax2ddjFC6B+hQ9hfB7IKTH3TUOFztac7zb/DgYArKBskeYQUvUA== +"@keplr-wallet/types@0.12.103", "@keplr-wallet/types@^0.12.44": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.12.103.tgz#ec2c55c42ed76868a634d47ce4d05ea96784a977" + integrity sha512-S0rcBLUBlOWNE6e8ri1IxCrlVk41ST+68Ge9gNHixwkjDrTURV+BIJjlp1EYL6Kf/D2JcqKMtxkZ9dJcxi8KGQ== dependencies: long "^4.0.0" -"@keplr-wallet/unit@0.12.100": - version "0.12.100" - resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.12.100.tgz#54452a06ff14a1f364df4bb591e2716798f5774b" - integrity sha512-MspLUa3Dg4wPi22u2jV7aL+JLi1WrTzHKw/Ry75q8ZceattV0Lz0oQ9WtYaPJu6YOe6xCYym731gYMdDIFcbtw== +"@keplr-wallet/unit@0.12.103": + version "0.12.103" + resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.12.103.tgz#72180670f21f48db5f71b48103598ab5ed97c81d" + integrity sha512-KQh4D+TAi4ei8avri6Ujo7w7NgComYkpyCjv7PnclpRaHKngM0fFrd5ZlCnu8Rhy9o8Rv0FNb5EVakyG0qLCjw== dependencies: - "@keplr-wallet/types" "0.12.100" + "@keplr-wallet/types" "0.12.103" big-integer "^1.6.48" utility-types "^3.10.0" @@ -2737,470 +1964,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@smithy/abort-controller@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.0.0.tgz#5815f5d4618e14bf8d031bb98a99adabbb831168" - integrity sha512-p6GlFGBt9K4MYLu72YuJ523NVR4A8oHlC5M2JO6OmQqN8kAc/uh1JqLE+FizTokrSJGg0CSvC+BrsmGzKtsZKA== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/chunked-blob-reader-native@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-3.0.0.tgz#f1104b30030f76f9aadcbd3cdca4377bd1ba2695" - integrity sha512-VDkpCYW+peSuM4zJip5WDfqvg2Mo/e8yxOv3VF1m11y7B8KKMKVFtmZWDe36Fvk8rGuWrPZHHXZ7rR7uM5yWyg== - dependencies: - "@smithy/util-base64" "^3.0.0" - tslib "^2.6.2" - -"@smithy/chunked-blob-reader@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/chunked-blob-reader/-/chunked-blob-reader-3.0.0.tgz#e5d3b04e9b273ba8b7ede47461e2aa96c8aa49e0" - integrity sha512-sbnURCwjF0gSToGlsBiAmd1lRCmSn72nu9axfJu5lIx6RUEgHu6GwTMbqCdhQSi0Pumcm5vFxsi9XWXb2mTaoA== - dependencies: - tslib "^2.6.2" - -"@smithy/config-resolver@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.1.tgz#4e0917e5a02139ef978a1ed470543ab41dd3626b" - integrity sha512-hbkYJc20SBDz2qqLzttjI/EqXemtmWk0ooRznLsiXp3066KQRTvuKHa7U4jCZCJq6Dozqvy0R1/vNESC9inPJg== - dependencies: - "@smithy/node-config-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - tslib "^2.6.2" - -"@smithy/core@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.2.0.tgz#f1b0837b7afa5507a9693c1e93da6ca9808022c1" - integrity sha512-ygLZSSKgt9bR8HAxR9mK+U5obvAJBr6zlQuhN5soYWx/amjDoQN4dTkydTypgKe6rIbUjTILyLU+W5XFwXr4kg== - dependencies: - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-retry" "^3.0.3" - "@smithy/middleware-serde" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - tslib "^2.6.2" - -"@smithy/credential-provider-imds@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.0.tgz#7e58b78aa8de13dd04e94829241cd1cbde59b6d3" - integrity sha512-q4A4d38v8pYYmseu/jTS3Z5I3zXlEOe5Obi+EJreVKgSVyWUHOd7/yaVCinC60QG4MRyCs98tcxBH1IMC0bu7Q== - dependencies: - "@smithy/node-config-provider" "^3.1.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - tslib "^2.6.2" - -"@smithy/eventstream-codec@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-3.0.0.tgz#81d30391220f73d41f432f65384b606d67673e46" - integrity sha512-PUtyEA0Oik50SaEFCZ0WPVtF9tz/teze2fDptW6WRXl+RrEenH8UbEjudOz8iakiMl3lE3lCVqYf2Y+znL8QFQ== - dependencies: - "@aws-crypto/crc32" "3.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-hex-encoding" "^3.0.0" - tslib "^2.6.2" - -"@smithy/eventstream-serde-browser@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.0.tgz#94721b01f01d8b7eb1db5814275a774ed4d38190" - integrity sha512-NB7AFiPN4NxP/YCAnrvYR18z2/ZsiHiF7VtG30gshO9GbFrIb1rC8ep4NGpJSWrz6P64uhPXeo4M0UsCLnZKqw== - dependencies: - "@smithy/eventstream-serde-universal" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/eventstream-serde-config-resolver@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.0.tgz#420447d1d284d41f7f070a5d92fc3686cc922581" - integrity sha512-RUQG3vQ3LX7peqqHAbmayhgrF5aTilPnazinaSGF1P0+tgM3vvIRWPHmlLIz2qFqB9LqFIxditxc8O2Z6psrRw== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/eventstream-serde-node@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.0.tgz#6519523fbb429307be29b151b8ba35bcca2b6e64" - integrity sha512-baRPdMBDMBExZXIUAoPGm/hntixjt/VFpU6+VmCyiYJYzRHRxoaI1MN+5XE+hIS8AJ2GCHLMFEIOLzq9xx1EgQ== - dependencies: - "@smithy/eventstream-serde-universal" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/eventstream-serde-universal@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.0.tgz#cb8441a73fbde4cbaa68e4a21236f658d914a073" - integrity sha512-HNFfShmotWGeAoW4ujP8meV9BZavcpmerDbPIjkJbxKbN8RsUcpRQ/2OyIxWNxXNH2GWCAxuSB7ynmIGJlQ3Dw== - dependencies: - "@smithy/eventstream-codec" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/fetch-http-handler@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.0.1.tgz#dacfdf6e70d639fac4a0f57c42ce13f0ed14ff22" - integrity sha512-uaH74i5BDj+rBwoQaXioKpI0SHBJFtOVwzrCpxZxphOW0ki5jhj7dXvDMYM2IJem8TpdFvS2iC08sjOblfFGFg== - dependencies: - "@smithy/protocol-http" "^4.0.0" - "@smithy/querystring-builder" "^3.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - tslib "^2.6.2" - -"@smithy/hash-blob-browser@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-3.0.0.tgz#63ef4c98f74c53cbcad8ec73387c68ec4708f55b" - integrity sha512-/Wbpdg+bwJvW7lxR/zpWAc1/x/YkcqguuF2bAzkJrvXriZu1vm8r+PUdE4syiVwQg7PPR2dXpi3CLBb9qRDaVQ== - dependencies: - "@smithy/chunked-blob-reader" "^3.0.0" - "@smithy/chunked-blob-reader-native" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/hash-node@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.0.tgz#f44b5fff193e241c1cdcc957b296b60f186f0e59" - integrity sha512-84qXstNemP3XS5jcof0el6+bDfjzuvhJPQTEfro3lgtbCtKgzPm3MgiS6ehXVPjeQ5+JS0HqmTz8f/RYfzHVxw== - dependencies: - "@smithy/types" "^3.0.0" - "@smithy/util-buffer-from" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/hash-stream-node@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-3.0.0.tgz#b395a8a0d2427e4a8effc56135b37cb299339f8f" - integrity sha512-J0i7de+EgXDEGITD4fxzmMX8CyCNETTIRXlxjMiNUvvu76Xn3GJ31wQR85ynlPk2wI1lqoknAFJaD1fiNDlbIA== - dependencies: - "@smithy/types" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/invalid-dependency@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.0.tgz#21cb6b5203ee15321bfcc751f21f7a19536d4ae8" - integrity sha512-F6wBBaEFgJzj0s4KUlliIGPmqXemwP6EavgvDqYwCH40O5Xr2iMHvS8todmGVZtuJCorBkXsYLyTu4PuizVq5g== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/is-array-buffer@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz#9a95c2d46b8768946a9eec7f935feaddcffa5e7a" - integrity sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ== - dependencies: - tslib "^2.6.2" - -"@smithy/md5-js@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-3.0.0.tgz#6a2d1c496f4d4476a0fc84f7724d79b234c3eb13" - integrity sha512-Tm0vrrVzjlD+6RCQTx7D3Ls58S3FUH1ZCtU1MIh/qQmaOo1H9lMN2as6CikcEwgattnA9SURSdoJJ27xMcEfMA== - dependencies: - "@smithy/types" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/middleware-content-length@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.0.tgz#084b3d22248967885d496eb0b105d9090e8ababd" - integrity sha512-3C4s4d/iGobgCtk2tnWW6+zSTOBg1PRAm2vtWZLdriwTroFbbWNSr3lcyzHdrQHnEXYCC5K52EbpfodaIUY8sg== - dependencies: - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/middleware-endpoint@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.1.tgz#49e8defb8e892e70417bd05f1faaf207070f32c7" - integrity sha512-lQ/UOdGD4KM5kLZiAl0q8Qy3dPbynvAXKAdXnYlrA1OpaUwr+neSsVokDZpY6ZVb5Yx8jnus29uv6XWpM9P4SQ== - dependencies: - "@smithy/middleware-serde" "^3.0.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - "@smithy/url-parser" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - tslib "^2.6.2" - -"@smithy/middleware-retry@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.3.tgz#8e9af1c9db4bc8904d73126225211b42b562f961" - integrity sha512-Wve1qzJb83VEU/6q+/I0cQdAkDnuzELC6IvIBwDzUEiGpKqXgX1v10FUuZGbRS6Ov/P+HHthcAoHOJZQvZNAkA== - dependencies: - "@smithy/node-config-provider" "^3.1.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/service-error-classification" "^3.0.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - "@smithy/util-retry" "^3.0.0" - tslib "^2.6.2" - uuid "^9.0.1" - -"@smithy/middleware-serde@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.0.tgz#786da6a6bc0e5e51d669dac834c19965245dd302" - integrity sha512-I1vKG1foI+oPgG9r7IMY1S+xBnmAn1ISqployvqkwHoSb8VPsngHDTOgYGYBonuOKndaWRUGJZrKYYLB+Ane6w== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/middleware-stack@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.0.tgz#00f112bae7af5fc3bd37d4fab95ebce0f17a7774" - integrity sha512-+H0jmyfAyHRFXm6wunskuNAqtj7yfmwFB6Fp37enytp2q047/Od9xetEaUbluyImOlGnGpaVGaVfjwawSr+i6Q== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/node-config-provider@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.0.tgz#e962987c4e2e2b8b50397de5f4745eb21ee7bdbb" - integrity sha512-ngfB8QItUfTFTfHMvKuc2g1W60V1urIgZHqD1JNFZC2tTWXahqf2XvKXqcBS7yZqR7GqkQQZy11y/lNOUWzq7Q== - dependencies: - "@smithy/property-provider" "^3.1.0" - "@smithy/shared-ini-file-loader" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/node-http-handler@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.0.0.tgz#e771ea95d03e259f04b7b37e8aece8a4fffc8cdc" - integrity sha512-3trD4r7NOMygwLbUJo4eodyQuypAWr7uvPnebNJ9a70dQhVn+US8j/lCnvoJS6BXfZeF7PkkkI0DemVJw+n+eQ== - dependencies: - "@smithy/abort-controller" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/querystring-builder" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/property-provider@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.0.tgz#b78d4964a1016b90331cc0c770b472160361fde7" - integrity sha512-Tj3+oVhqdZgemjCiWjFlADfhvLF4C/uKDuKo7/tlEsRQ9+3emCreR2xndj970QSRSsiCEU8hZW3/8JQu+n5w4Q== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/protocol-http@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.0.0.tgz#04df3b5674b540323f678e7c4113e8abd8b26432" - integrity sha512-qOQZOEI2XLWRWBO9AgIYuHuqjZ2csyr8/IlgFDHDNuIgLAMRx2Bl8ck5U5D6Vh9DPdoaVpuzwWMa0xcdL4O/AQ== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/querystring-builder@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.0.tgz#48a9aa7b700e8409368c21bc0adf7564e001daea" - integrity sha512-bW8Fi0NzyfkE0TmQphDXr1AmBDbK01cA4C1Z7ggwMAU5RDz5AAv/KmoRwzQAS0kxXNf/D2ALTEgwK0U2c4LtRg== - dependencies: - "@smithy/types" "^3.0.0" - "@smithy/util-uri-escape" "^3.0.0" - tslib "^2.6.2" - -"@smithy/querystring-parser@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.0.tgz#fa1ed0cee408cd4d622070fa874bc50ac1a379b7" - integrity sha512-UzHwthk0UEccV4dHzPySnBy34AWw3V9lIqUTxmozQ+wPDAO9csCWMfOLe7V9A2agNYy7xE+Pb0S6K/J23JSzfQ== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/service-error-classification@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.0.tgz#06a45cb91b15b8b0d5f3b1df2b3743d2ca42f5c4" - integrity sha512-3BsBtOUt2Gsnc3X23ew+r2M71WwtpHfEDGhHYHSDg6q1t8FrWh15jT25DLajFV1H+PpxAJ6gqe9yYeRUsmSdFA== - dependencies: - "@smithy/types" "^3.0.0" - -"@smithy/shared-ini-file-loader@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.0.tgz#a4cb9304c3be1c232ec661132ca88d177ac7a5b1" - integrity sha512-dAM7wSX0NR3qTNyGVN/nwwpEDzfV9T/3AN2eABExWmda5VqZKSsjlINqomO5hjQWGv+IIkoXfs3u2vGSNz8+Rg== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/signature-v4@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.0.0.tgz#f536d0abebfeeca8e9aab846a4042658ca07d3b7" - integrity sha512-kXFOkNX+BQHe2qnLxpMEaCRGap9J6tUGLzc3A9jdn+nD4JdMwCKTJ+zFwQ20GkY+mAXGatyTw3HcoUlR39HwmA== - dependencies: - "@smithy/is-array-buffer" "^3.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.0" - "@smithy/util-uri-escape" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/smithy-client@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.1.1.tgz#9aa770edd9b6277dc4124c924c617a436cdb670e" - integrity sha512-tj4Ku7MpzZR8cmVuPcSbrLFVxmptWktmJMwST/uIEq4sarabEdF8CbmQdYB7uJ/X51Qq2EYwnRsoS7hdR4B7rA== - dependencies: - "@smithy/middleware-endpoint" "^3.0.1" - "@smithy/middleware-stack" "^3.0.0" - "@smithy/protocol-http" "^4.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-stream" "^3.0.1" - tslib "^2.6.2" - -"@smithy/types@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.0.0.tgz#00231052945159c64ffd8b91e8909d8d3006cb7e" - integrity sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw== - dependencies: - tslib "^2.6.2" - -"@smithy/url-parser@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.0.tgz#5fdc77cd22051c1aac6531be0315bfcba0fa705d" - integrity sha512-2XLazFgUu+YOGHtWihB3FSLAfCUajVfNBXGGYjOaVKjLAuAxx3pSBY3hBgLzIgB17haf59gOG3imKqTy8mcrjw== - dependencies: - "@smithy/querystring-parser" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-base64@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-base64/-/util-base64-3.0.0.tgz#f7a9a82adf34e27a72d0719395713edf0e493017" - integrity sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ== - dependencies: - "@smithy/util-buffer-from" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-body-length-browser@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz#86ec2f6256310b4845a2f064e2f571c1ca164ded" - integrity sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ== - dependencies: - tslib "^2.6.2" - -"@smithy/util-body-length-node@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz#99a291bae40d8932166907fe981d6a1f54298a6d" - integrity sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA== - dependencies: - tslib "^2.6.2" - -"@smithy/util-buffer-from@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz#559fc1c86138a89b2edaefc1e6677780c24594e3" - integrity sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA== - dependencies: - "@smithy/is-array-buffer" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-config-provider@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz#62c6b73b22a430e84888a8f8da4b6029dd5b8efe" - integrity sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ== - dependencies: - tslib "^2.6.2" - -"@smithy/util-defaults-mode-browser@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.3.tgz#6fff11a6c407ca1d5a1dc009768bd09271b199c2" - integrity sha512-3DFON2bvXJAukJe+qFgPV/rorG7ZD3m4gjCXHD1V5z/tgKQp5MCTCLntrd686tX6tj8Uli3lefWXJudNg5WmCA== - dependencies: - "@smithy/property-provider" "^3.1.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - bowser "^2.11.0" - tslib "^2.6.2" - -"@smithy/util-defaults-mode-node@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.3.tgz#0b52ba9cb1138ee9076feba9a733462b2e2e6093" - integrity sha512-D0b8GJXecT00baoSQ3Iieu3k3mZ7GY8w1zmg8pdogYrGvWJeLcIclqk2gbkG4K0DaBGWrO6v6r20iwIFfDYrmA== - dependencies: - "@smithy/config-resolver" "^3.0.1" - "@smithy/credential-provider-imds" "^3.1.0" - "@smithy/node-config-provider" "^3.1.0" - "@smithy/property-provider" "^3.1.0" - "@smithy/smithy-client" "^3.1.1" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-endpoints@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.0.1.tgz#4ea8069bfbf3ebbcbe106b5156ff59a7a627b7dd" - integrity sha512-ZRT0VCOnKlVohfoABMc8lWeQo/JEFuPWctfNRXgTHbyOVssMOLYFUNWukxxiHRGVAhV+n3c0kPW+zUqckjVPEA== - dependencies: - "@smithy/node-config-provider" "^3.1.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-hex-encoding@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz#32938b33d5bf2a15796cd3f178a55b4155c535e6" - integrity sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ== - dependencies: - tslib "^2.6.2" - -"@smithy/util-middleware@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.0.tgz#64d775628b99a495ca83ce982f5c83aa45f1e894" - integrity sha512-q5ITdOnV2pXHSVDnKWrwgSNTDBAMHLptFE07ua/5Ty5WJ11bvr0vk2a7agu7qRhrCFRQlno5u3CneU5EELK+DQ== - dependencies: - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-retry@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.0.tgz#8a0c47496aab74e1dfde4905d462ad636a8824bb" - integrity sha512-nK99bvJiziGv/UOKJlDvFF45F00WgPLKVIGUfAK+mDhzVN2hb/S33uW2Tlhg5PVBoqY7tDVqL0zmu4OxAHgo9g== - dependencies: - "@smithy/service-error-classification" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-stream@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.0.1.tgz#3cf527bcd3fec82c231c38d47dd75f3364747edb" - integrity sha512-7F7VNNhAsfMRA8I986YdOY5fE0/T1/ZjFF6OLsqkvQVNP3vZ/szYDfGCyphb7ioA09r32K/0qbSFfNFU68aSzA== - dependencies: - "@smithy/fetch-http-handler" "^3.0.1" - "@smithy/node-http-handler" "^3.0.0" - "@smithy/types" "^3.0.0" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-buffer-from" "^3.0.0" - "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-uri-escape@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz#e43358a78bf45d50bb736770077f0f09195b6f54" - integrity sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg== - dependencies: - tslib "^2.6.2" - -"@smithy/util-utf8@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-3.0.0.tgz#1a6a823d47cbec1fd6933e5fc87df975286d9d6a" - integrity sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA== - dependencies: - "@smithy/util-buffer-from" "^3.0.0" - tslib "^2.6.2" - -"@smithy/util-waiter@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-3.0.0.tgz#26bcc5bbbf1de9360a7aeb3b3919926fc6afa2bc" - integrity sha512-+fEXJxGDLCoqRKVSmo0auGxaqbiCo+8oph+4auefYjaNxjOLKSY2MxVQfRzo65PaZv4fr+5lWg+au7vSuJJ/zw== - dependencies: - "@smithy/abort-controller" "^3.0.0" - "@smithy/types" "^3.0.0" - tslib "^2.6.2" - "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" @@ -3227,11 +1990,11 @@ "@wallet-standard/features" "^1.0.3" "@solana/web3.js@^1.36.0": - version "1.92.3" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.92.3.tgz#8880b446c0ec30fc552e1d501bd8db2780a1f70c" - integrity sha512-NVBWvb9zdJIAx6X+caXaIICCEQfQaQ8ygykCjJW4u2z/sIKcvPj3ZIIllnx0MWMc3IxGq15ozGYDOQIMbwUcHw== + version "1.93.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.93.0.tgz#4b6975020993cec2f6626e4f2bf559ca042df8db" + integrity sha512-suf4VYwWxERz4tKoPpXCRHFRNst7jmcFUaD65kII+zg9urpy5PeeqgLV6G5eWGzcVzA9tZeXOju1A1Y+0ojEVw== dependencies: - "@babel/runtime" "^7.24.6" + "@babel/runtime" "^7.24.7" "@noble/curves" "^1.4.0" "@noble/hashes" "^1.4.0" "@solana/buffer-layout" "^4.0.1" @@ -3244,7 +2007,7 @@ fast-stable-stringify "^1.0.0" jayson "^4.1.0" node-fetch "^2.7.0" - rpc-websockets "^8.0.1" + rpc-websockets "^9.0.0" superstruct "^1.0.4" "@supercharge/promise-pool@^2.1.0": @@ -3252,6 +2015,13 @@ resolved "https://registry.yarnpkg.com/@supercharge/promise-pool/-/promise-pool-2.4.0.tgz#6050eea8c2d7f92ddd4ddc582ee328b15c034ad3" integrity sha512-O9CMipBlq5OObdt1uKJGIzm9cdjpPWfj+a+Zw9EgWKxaMNHKC7EU7X9taj3H0EGQNLOSq2jAcOa3EzxlfHsD6w== +"@swc/helpers@^0.5.11": + version "0.5.11" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.11.tgz#5bab8c660a6e23c13b2d23fcd1ee44a2db1b0cb7" + integrity sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A== + dependencies: + tslib "^2.4.0" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -3330,13 +2100,6 @@ dependencies: "@types/node" "*" -"@types/cli-progress@^3.9.2": - version "3.11.5" - resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.5.tgz#9518c745e78557efda057e3f96a5990c717268c3" - integrity sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g== - dependencies: - "@types/node" "*" - "@types/clone@^2.1.1": version "2.1.4" resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.4.tgz#9680f886c935dcf596273f1218abb71efb01531a" @@ -3490,11 +2253,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^13.7.0": - version "13.13.52" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7" - integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ== - "@types/node@^16.9.2": version "16.18.98" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.98.tgz#3554bb7911ea2bbc3a528be0776d6ab16b7674d2" @@ -3555,6 +2313,11 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/uuid@^9.0.2": version "9.0.8" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba" @@ -3567,6 +2330,13 @@ dependencies: "@types/node" "*" +"@types/ws@^8.2.2": + version "8.5.10" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" + integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -3728,33 +2498,22 @@ abbrev@^1.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abstract-level@^1.0.2, abstract-level@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.4.tgz#3ad8d684c51cc9cbc9cf9612a7100b716c414b57" - integrity sha512-eUP/6pbXBkMbXFdx4IH2fVgvB7M0JvR7/lIL33zcs0IBcwjdzSSl31TOJsaCzmKSSDF9h8QYSOJux4Nd4YJqFg== - dependencies: - buffer "^6.0.3" - catering "^2.1.0" - is-buffer "^2.0.5" - level-supports "^4.0.0" - level-transcoder "^1.0.1" - module-error "^1.0.1" - queue-microtask "^1.2.3" - acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" -acorn@^8.4.1, acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.11.0, acorn@^8.4.1, acorn@^8.9.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c" + integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== add-stream@^1.0.0: version "1.0.0" @@ -4027,21 +2786,7 @@ at-least-node@^1.0.0: version "5.4.7" resolved "https://github.com/Irys-xyz/avsc#a730cc8018b79e114b6a3381bbb57760a24c6cef" -axios@^0.21.2, axios@^0.21.3: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - -axios@^0.25.0: - version "0.25.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a" - integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== - dependencies: - follow-redirects "^1.14.7" - -axios@^0.27.2: +axios@^0.21.3, axios@^0.25.0, axios@^0.27.2, axios@^1.0.0, axios@^1.6.0: version "0.27.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== @@ -4049,15 +2794,6 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.0.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" - integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -4251,7 +2987,7 @@ bip39@3.0.2: pbkdf2 "^3.0.9" randombytes "^2.0.1" -bip39@^3.0.2, bip39@^3.0.3: +bip39@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== @@ -4308,11 +3044,6 @@ borsh@^0.7.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" -bowser@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" - integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -4340,16 +3071,6 @@ brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - browserslist@^4.22.2: version "4.23.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" @@ -4549,20 +3270,15 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001629: - version "1.0.30001632" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz#964207b7cba5851701afb4c8afaf1448db3884b6" - integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg== + version "1.0.30001634" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001634.tgz#aa563c8e7aeaf552f7ead60371bc8d803425deaa" + integrity sha512-fbBYXQ9q3+yp1q1gBk86tOFs4pyn/yxFm5ZNP18OXJDfA3txImOY9PhfxVggZ4vRHDqoU8NrKU81eN0OtzOgRA== capability@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/capability/-/capability-0.2.5.tgz#51ad87353f1936ffd77f2f21c74633a4dea88801" integrity sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg== -catering@^2.1.0, catering@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" - integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== - chalk@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -4641,17 +3357,6 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== -classic-level@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.4.1.tgz#169ecf9f9c6200ad42a98c8576af449c1badbaee" - integrity sha512-qGx/KJl3bvtOHrGau2WklEZuXhS3zme+jf+fsu6Ej7W7IP/C49v7KNlWIsT1jZu0YnfzSIYDGcEWpCa1wKGWXQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "^2.2.2" - node-gyp-build "^4.3.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -4943,21 +3648,10 @@ cosmiconfig@^8.2.0: parse-json "^5.2.0" path-type "^4.0.0" -cosmjs-types@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.4.1.tgz#3b2a53ba60d33159dd075596ce8267cfa7027063" - integrity sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog== - dependencies: - long "^4.0.0" - protobufjs "~6.11.2" - -cosmjs-types@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.8.0.tgz#2ed78f3e990f770229726f95f3ef5bf9e2b6859b" - integrity sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg== - dependencies: - long "^4.0.0" - protobufjs "~6.11.2" +cosmjs-types@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.9.0.tgz#c3bc482d28c7dfa25d1445093fdb2d9da1f6cfcc" + integrity sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ== create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" @@ -5349,9 +4043,9 @@ ejs@^3.1.7: jake "^10.8.5" electron-to-chromium@^1.4.796: - version "1.4.796" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz#48dd6ff634b7f7df6313bd27aaa713f3af4a2b29" - integrity sha512-NglN/xprcM+SHD2XCli4oC6bWe6kHoytcyLKCWXmRL854F0qhPhaYgUswUsglnPxYaNQIg2uMY4BvaomIf3kLA== + version "1.4.802" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz#49b397eadc95a49b1ac33eebee146b8e5a93773f" + integrity sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA== elliptic@6.5.4: version "6.5.4" @@ -5661,6 +4355,11 @@ eventemitter3@^4.0.4, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + execa@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" @@ -5815,13 +4514,6 @@ fast-stable-stringify@^1.0.0: resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== -fast-xml-parser@4.2.5: - version "4.2.5" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz#a6747a09296a6cb34f2ae634019bf1738f3b421f" - integrity sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g== - dependencies: - strnum "^1.0.5" - fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -5957,15 +4649,15 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.14.0, follow-redirects@^1.14.7, follow-redirects@^1.14.9, follow-redirects@^1.15.6: +follow-redirects@^1.14.9: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.0.tgz#5eb496c4ebf3bcc4572e8908a45a72f5a1d2d658" + integrity sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" @@ -6696,11 +5388,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-buffer@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - is-ci@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -7938,28 +6625,6 @@ lerna@^7.1.1: yargs "16.2.0" yargs-parser "20.2.4" -level-supports@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" - integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== - -level-transcoder@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" - integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== - dependencies: - buffer "^6.0.3" - module-error "^1.0.1" - -level@^8.0.0: - version "8.0.1" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.1.tgz#737161db1bc317193aca4e7b6f436e7e1df64379" - integrity sha512-oPBGkheysuw7DmzFQYyFe8NAia5jFLAgEnkgWnK3OXAuJr8qFT+xBQIwokAZPME2bhPFzS8hlYcL16m8UZrtwQ== - dependencies: - abstract-level "^1.0.4" - browser-level "^1.0.1" - classic-level "^1.2.0" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -8007,18 +6672,6 @@ libsodium-wrappers-sumo@^0.7.11: dependencies: libsodium-sumo "^0.7.13" -libsodium-wrappers@^0.7.6: - version "0.7.13" - resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz#83299e06ee1466057ba0e64e532777d2929b90d3" - integrity sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw== - dependencies: - libsodium "^0.7.13" - -libsodium@^0.7.13: - version "0.7.13" - resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.13.tgz#230712ec0b7447c57b39489c48a4af01985fb393" - integrity sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw== - lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -8480,11 +7133,6 @@ modify-values@^1.0.1: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -module-error@^1.0.1, module-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" - integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -8530,20 +7178,15 @@ mute-stream@^1.0.0, mute-stream@~1.0.0: integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== nan@^2.13.2: - version "2.19.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" - integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== + version "2.20.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" + integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw== napi-build-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== -napi-macros@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" - integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== - natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -8601,9 +7244,9 @@ neo-async@^2.6.2: integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== node-abi@^3.3.0: - version "3.63.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.63.0.tgz#9bfbe68b87357f8b508554608b323e9b1052d045" - integrity sha512-vAszCsOUrUxjGAmdnM/pq7gUgie0IRteCQMX6d4A534fQCR93EJU5qgzBvU6EkFfK27s0T3HEV3BOyJIr7OMYw== + version "3.65.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.65.0.tgz#ca92d559388e1e9cab1680a18c1a18757cdac9d3" + integrity sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA== dependencies: semver "^7.3.5" @@ -9476,7 +8119,7 @@ promzard@^1.0.0: dependencies: read "^3.0.1" -protobufjs@^6.11.2, protobufjs@^6.11.4, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: +protobufjs@^6.11.2, protobufjs@^6.8.8: version "6.11.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== @@ -9495,35 +8138,11 @@ protobufjs@^6.11.2, protobufjs@^6.11.4, protobufjs@^6.8.8, protobufjs@~6.11.2, p "@types/node" ">=13.7.0" long "^4.0.0" -protobufjs@~6.10.2: - version "6.10.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.3.tgz#11ed1dd02acbfcb330becf1611461d4b407f9eef" - integrity sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg== - 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" - protocols@^2.0.0, protocols@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -9558,7 +8177,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -queue-microtask@^1.2.2, queue-microtask@^1.2.3: +queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== @@ -9810,7 +8429,7 @@ rimraf@^4.4.1: dependencies: glob "^9.2.0" -ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: +ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -9818,12 +8437,16 @@ ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: hash-base "^3.0.0" inherits "^2.0.1" -rpc-websockets@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-8.0.1.tgz#fa76db08badc0b2f5cd66b5496debd2c404c94b1" - integrity sha512-PptrPRK40uQvifq5sCcObmqInVcZXhy+RRrirzdE5KUPvDI47y1wPvfckD2QzqngOU9xaPW/dT+G+b+wj6M1MQ== +rpc-websockets@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.1.tgz#a69c83ffd5e26bdd6117f5b434ae68133c4805b6" + integrity sha512-JCkdc/TfJBGRfmjIFK7cmqX79nwPWUd9xCM0DAydRbdLShsW3j/GV2gmPlaFa8V1+2u4V/O47fm4ZR5+F6HyDw== dependencies: - eventemitter3 "^4.0.7" + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" uuid "^8.3.2" ws "^8.5.0" optionalDependencies: @@ -9835,13 +8458,6 @@ run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -10311,11 +8927,6 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" -strnum@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" - integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== - strong-log-transformer@2.1.0, strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -10615,12 +9226,12 @@ tsconfig-paths@^4.1.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.11.1, tslib@^1.8.1: +tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== @@ -10877,7 +9488,7 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^9.0.0, uuid@^9.0.1: +uuid@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==